1
メインレイアウト内に相対レイアウトが1つあるレイアウトがあります。このレイアウトはメインレイアウトの中央に表示されます。一部のデバイスではほとんどの部分をカバーしています私はそれがすべての画面(つまり、すべてのエミュレータ)の同じ部分をカバーする必要があります。レイアウトを使用することができます:体重?どんな良いアイデアですか?異なる画面にもかかわらず画面をカバーするためのビューを作成する方法
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
style="@style/ViewScreenTheme"
android:orientation="vertical"
android:background="@drawable/background"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<RelativeLayout android:id="@+id/header"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<Button android:id="@+id/help_button"
android:layout_alignParentRight="true"
style="@style/ButtonText"
android:layout_margin="1dp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:background="@drawable/help_button"
android:paddingLeft="10px"
android:paddingRight="10px"
android:layout_marginRight="10px"/>
</RelativeLayout>
<RelativeLayout android:id="@+id/root"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center_horizontal"
android:layout_below="@+id/header"
android:layout_marginTop="2dp"
android:layout_marginBottom="0dp"
android:paddingTop="10dp"
android:paddingBottom="10dp">
<RelativeLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="384dp"
android:background="#0fff"
android:id="@+id/canvas_layout">
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
</LinearLayout>
私はすべての画面の一部をカバーする最後の相対レイアウトであるcanvas_layoutが必要です。
xmlファイルのコードを提供pls – Jin35
レイアウトXMLファイルを投稿する必要があります。 –
xmlファイルを追加しました。 –