私のImageViewは奇妙な理由から、画面中央に画像を表示しています。ImageViewが常に正しく表示されない場合の対応
私は私のアプリで縦向きを強制し、ここで私のレイアウトのための私のXMLコードです:だから
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent" android:gravity="center">
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:id="@+id/image_view"
android:layout_weight="1.0"/>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/message"
android:gravity="center_horizontal"
android:padding="10dip"/>
<Button
android:layout_gravity="center_horizontal"
android:layout_width="fill_parent"
android:textStyle="bold" android:id="@+id/action_button" android:selectAllOnFocus="false" android:layout_height="100dip" android:text="Click here to preform actions"/>
</LinearLayout>
、ページが画面の幅、以下のテキストを拡張し、途中で画像として表示されるはずですそれとその下のボタン。しかし、何らかの理由で、画像は画面の中央左に小さな箱のサムネイルとして表示されます。