У меня есть два макета, который будет только фоном, а другой, который будет в центре его, займет примерно половину экрана. У меня есть код, который, как я думал, будет делать, но представление, которое я включаю, охватывает весь экран, когда приложение запускается, и я не могу понять, почему это происходит.FrameLayout внутри RelativeLayout
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<include
android:layout_width="500dp"
android:layout_height="500dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
layout="@layout/activity_main" />
</RelativeLayout>
второй XML
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="#00000000" >
<FrameLayout
android:id="@+id/frmPreview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center" >
</FrameLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="left"
android:gravity="center_vertical"
android:orientation="vertical" >
</LinearLayout>
<ImageView
android:id="@+id/imgShoot"
android:layout_width="100dp"
android:layout_height="100dp"
android:layout_gravity="bottom|center"
android:background="@drawable/aperture_closing" />
, на каком устройстве можно проверить этот код? – TheFlash