Android Gallery fullscreen

后端 未结 2 2012
粉色の甜心
粉色の甜心 2021-01-12 17:30

How do I implement a fullscreen gallery? i.e. image stretches to fill all the screen?

相关标签:
2条回答
  • 2021-01-12 18:08

    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);
    
    0 讨论(0)
  • 2021-01-12 18:28

    Use this in Activity Manifest.xml

    give property like this

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

    Thanks.

    0 讨论(0)
提交回复
热议问题