我如何实现全屏画廊?即图像拉伸,以填补所有的屏幕?
How do I implement a fullscreen gallery? i.e. image stretches to fill all the screen?
要使它全屏:
<activity android:name="YourActivity"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
,使图像填充,你应该去做你的适配器上的屏幕上,创建具有MATCH_PARENT x MATCH_PARENT和你在getView创建您的ImageView视图你应该让填补所有的空间:
To make the images fill the screen you should do it on your adapter, creating a View with MATCH_PARENT x MATCH_PARENT and in your ImageView you created on getView you should make it fill all the space:
yourImageView.setScaleType(ImageView.ScaleType.FIT_XY);