Android ViewFlipper内的全屏图像
我的xml布局中有一个包含图像的ViewFlipper。我想全屏显示这个图像。无论我对图像使用哪个刻度类型,我都无法使图像全屏显示 这是我的布局:Android ViewFlipper内的全屏图像,android,image,fullscreen,viewflipper,Android,Image,Fullscreen,Viewflipper,我的xml布局中有一个包含图像的ViewFlipper。我想全屏显示这个图像。无论我对图像使用哪个刻度类型,我都无法使图像全屏显示 这是我的布局: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layo
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ViewFlipper android:layout_height="fill_parent" android:id="@+id/flipperView" android:layout_width="fill_parent">
<FrameLayout android:id="@+id/frameLayout1" android:layout_height="fill_parent" android:layout_width="fill_parent">
<ImageView android:src="@drawable/my_drawable" android:id="@+id/bcImageView" android:layout_width="fill_parent" android:layout_gravity="center" android:scaleType="fitCenter" android:layout_height="wrap_content"></ImageView>
</FrameLayout>
</ViewFlipper>
</LinearLayout>
我还尝试使用:
mViewFlipper.setClipChildren(false);
mViewFlipper.setMinimumHeight(300);
具有不同的最小高度值,但没有
你知道为什么图像没有全屏显示吗?将你的图像视图的
android:layout\u height=“wrap\u content”
更改为android:layout\u height=“fill\u parent”
将你的图像视图的android:layout\u height=“wrap\u content”
更改为android:layout\u height=“fill\u parent”
在布局中尝试设置您的ImageView.setScaleType(ImageView.ScaleType.FIT_XY)
这对我很有效,解决了我的问题。尝试设置yourImageView.setScaleType(ImageView.ScaleType.FIT_XY)代码>这对我很有效,解决了我的问题。你有没有让它起作用?有类似的问题吗,我完全重新设计了UI。我在考虑同样的事情!你用过这个吗?有类似的问题吗,我完全重新设计了UI。我在考虑同样的事情!
mViewFlipper.setClipChildren(false);
mViewFlipper.setMinimumHeight(300);