开发者

Android Gallery fullscreen

开发者 https://www.devze.com 2023-02-17 11:05 出处:网络
H开发者_JS百科ow do I implement a fullscreen gallery? i.e. image stretches to fill all the screen?To make it fullscreen:

H开发者_JS百科ow do I implement a fullscreen gallery? i.e. image stretches to fill all the screen?


To make it fullscreen:

        <activity android:name="YourActivity" 
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">

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


Use this in Activity Manifest.xml

Give property like this

 android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen"
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号