Android Gallery fullscreen

Igor Filippov picture Igor Filippov · Mar 15, 2011 · Viewed 7.5k times · Source

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

Answer

Marcos Vasconcelos picture Marcos Vasconcelos · Mar 15, 2011

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