Android的画廊全屏 [英] Android Gallery fullscreen

查看:231
本文介绍了Android的画廊全屏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何实现全屏画廊?即图像拉伸,以填补所有的屏幕?

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);

这篇关于Android的画廊全屏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆