画面サイズが約 800x1280 の Samsung Galaxy Tab 10.1 で、このレイアウトを画面全体に表示しようとしています。
res/layout-hdpi と res/layout に次の xml があり、@drawable/background は res/drawable と res/drawable-hdpi の両方にあり、hdpi の背景画像は 800x1280 サイズです。
ただし、次をレンダリングすると、画面全体を占有することはできません。ScrollView を取り除き、relativelayout を linearlayout に変更し、layout_height="match_parent" を設定しようとしましたが、何も変わりません... プロジェクトをクリーンアップし、再ロードする前にデバイスからアプリをアンインストールしようとしました...何も機能していないようです。誰かが何が起こっているのか説明してくれますか? 私は本当に重要な何かを見逃していると思います。
(注: これは私の kindle fire と、画面サイズが 600x1024 っぽい 7 インチのタブレットで問題なく動作します)
<?xml version="1.0" encoding="utf-8"?>
<ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/background">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/game_relativelayout_top_textview_definition_and_example"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/game_screen_image_box"
android:id="@+id/game_linearlayout_top_textview_definition_and_example"
android:orientation="vertical"
>
<TextView
android:id="@+id/game_textview_definition"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_double"
android:layout_marginLeft="@dimen/padding_quadruple"
android:layout_marginRight="@dimen/padding_quadruple"
android:gravity="center_horizontal"
android:textSize="@dimen/font_size_slight_larger"
android:textColor="@android:color/black"
android:text="@string/filler" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_double"
android:src="@drawable/details_page_screen_divider"
android:contentDescription="@string/filler" />
<TextView
android:id="@+id/game_textview_example"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_double"
android:layout_marginLeft="@dimen/padding_quadruple"
android:layout_marginRight="@dimen/padding_quadruple"
android:gravity="center_horizontal"
android:textSize="@dimen/font_size_slight_larger"
android:textStyle="italic"
android:textColor="@android:color/black"
android:text="@string/filler" />
</LinearLayout>
<ImageView
android:id="@+id/game_imageview_thumbs_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="@dimen/padding_quadruple"
android:layout_marginBottom="@dimen/padding_quadruple"
android:src="@drawable/game_screen_image_thumbs_down"
android:contentDescription="@string/filler"
/>
<ImageView
android:id="@+id/game_imageview_thumbs_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/game_imageview_thumbs_down"
android:layout_alignParentBottom="true"
android:layout_marginRight="@dimen/padding_double"
android:layout_marginBottom="@dimen/padding_quadruple"
android:src="@drawable/game_screen_image_thumbs_up"
android:contentDescription="@string/filler"
/>
</RelativeLayout>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/game_imageview_timer_foreground"
android:src="@drawable/game_screen_image_timer_foreground"
android:contentDescription="@string/filler"
android:layout_below="@id/game_relativelayout_top_textview_definition_and_example"
/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/game_imageview_timer_background"
android:src="@drawable/game_screen_image_timer_background"
android:contentDescription="@string/filler"
android:layout_below="@id/game_relativelayout_top_textview_definition_and_example"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_below="@id/game_imageview_timer_foreground"
android:layout_marginTop="@dimen/padding_single">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/game_button_answer_choice_1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="@dimen/font_size_regular"
android:text="@string/filler"
android:background="@drawable/game_screen_button_top_left"/>
<Button
android:id="@+id/game_button_answer_choice_2"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="@dimen/font_size_regular"
android:text="@string/filler"
android:background="@drawable/game_screen_button_top_right"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<Button
android:id="@+id/game_button_answer_choice_3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="@dimen/font_size_regular"
android:text="@string/filler"
android:background="@drawable/game_screen_button_bottom_left"/>
<Button
android:id="@+id/game_button_answer_choice_4"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textSize="@dimen/font_size_regular"
android:text="@string/filler"
android:background="@drawable/game_screen_button_bottom_right"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
</ScrollView>