Android 如何将我的ImageView高度设置为与屏幕分辨率或全屏相同?
这是我的XML文件,用于设置与屏幕分辨率相同的高度。但是,当我运行这个应用程序时,我的屏幕上留下了黑色空间。有人能帮我吗Android 如何将我的ImageView高度设置为与屏幕分辨率或全屏相同?,android,eclipse,imageview,height,Android,Eclipse,Imageview,Height,这是我的XML文件,用于设置与屏幕分辨率相同的高度。但是,当我运行这个应用程序时,我的屏幕上留下了黑色空间。有人能帮我吗 <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="fill_pa
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:background="#000000"
android:orientation="vertical" >
<ImageView
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:src="@drawable/info"
android:scaleType = "fitCenter"
/>
</RelativeLayout>
将
android:scaleType
值设置为fitXY
而不是fitCenter
android:scaleType = "fitXY"