画面の下部に画像が配置された画面が必要です。画像自体は(リソースから)固定されています。これは非常に大きく、各デバイスの幅に合わせて縮小されています。私は次のように simple を使用しようとしましlayout_alignParentBottom
た:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/LayoutLoading"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/startup" >
<ImageView
android:id="@+id/ImageView01"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:scaleType="fitCenter"
android:src="@drawable/loading" />
</RelativeLayout>
はい、これはうまくいきませんでした。画像の正確な高さを ( の代わりにwrap_content
) 指定しない限り、ImageView
は下部に配置されません。これはおそらく、実際の画像が画面サイズよりも大きく、画面の幅に縮小した後にのみ「短く」なるという事実によるものです。
ImageView
それで、問題は、デバイスのサイズに関係なく、画面の下部にとどまるようにするにはどうすればよいですか?