How do I create a full screen mode in XML irregardless of how small what contents are in it?
Here\'s my \"show.xml\" code:
As the other answer doesn't work for me:
<style name="AppTheme.Fullscreen">
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
Add this style to your styles.xml
<activity
android:name=".TitlesActivity"
android:theme="@style/AppTheme.Fullscreen">
Make sure your activity in the AndroidManifest.xml refers to your theme.
Afaik you can't do fullscreen in xml. You have two choices:
AndroidManifest.xml
in activity's sectionandroid:theme="@android:style/Theme.NoTitleBar.Fullscreen"
onCreate()
before calling setContentView
requestWindowFeature( Window.FEATURE_NO_TITLE );
getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN );