Android studio 在平板电脑上运行时,背景图像未占据整个屏幕
背景图像Android studio 在平板电脑上运行时,背景图像未占据整个屏幕,android-studio,user-interface,gridview,layout,scrollview,Android Studio,User Interface,Gridview,Layout,Scrollview,背景图像 android:background="@drawable/jhyti" 当应用程序安装在平板电脑上时,不会占用整个屏幕。 我使用的是滚动视图,布局参数为 <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:scaleType="centerCrop" android:background="@drawable
android:background="@drawable/jhyti"
当应用程序安装在平板电脑上时,不会占用整个屏幕。
我使用的是滚动视图,布局参数为
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
android:background="@drawable/jhyti"
android:orientation="vertical">
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent">
如何使背景图像占据整个屏幕?更改xml文件中的scaletype以及相对布局中的宽度和高度
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="fitXY"
android:background="@drawable/jhyti"
android:orientation="vertical">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
ImageView simpleImageView=
(ImageView)findViewById(R.id.simpleImageView);
simpleImageView.setScaleType(ImageView.ScaleType.FIT_XY);