在布局的时候发现宽高都使用fill_parent后,图片还是不能充满屏幕,需要使用追加一个
android:scaleType="fitXY"
属性,将图片沿XY方向拉伸。
布局代码:
<RelativeLayout 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"
tools:context="${relativePackage}.${activityClass}" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scaleType="fitXY"
android:id="@+id/splashImageView"
android:src="@drawable/lt_splash"
/>
</RelativeLayout>