xml代码如下
<?xml version="1.0" encoding="utf-8"?><FrameLayout android:id="@+id/FrameLayout01"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView android:id="@+id/ImageView01"
android:src="@drawable/p1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</ImageView>
</FrameLayout>虽然layout_width我设定的是fill_parent,但图片并没有自动拉伸填充满整个屏幕,顶部和底部都是黑条。请问下这是为什么啊?怎么样让图片自动拉伸以适应屏幕大小?
<?xml version="1.0" encoding="utf-8"?><FrameLayout android:id="@+id/FrameLayout01"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<ImageView android:id="@+id/ImageView01"
android:src="@drawable/p1"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
</ImageView>
</FrameLayout>虽然layout_width我设定的是fill_parent,但图片并没有自动拉伸填充满整个屏幕,顶部和底部都是黑条。请问下这是为什么啊?怎么样让图片自动拉伸以适应屏幕大小?
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货