About the Full Screen And No Titlebar from manifest

后端 未结 5 1071
北海茫月
北海茫月 2020-12-01 11:53

I want to set my application to full screen view. I got the idea to set it in an individual activity using FullScreen and NoTitlebar, but i want to

相关标签:
5条回答
  • 2020-12-01 12:14

    If your Manifest.xml has the default android:theme="@style/AppTheme"

    Go to res/values/styles.xml and change

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    

    to

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    

    And the ActionBar is disappeared!

    0 讨论(0)
  • 2020-12-01 12:18

    Try using these theme: Theme.AppCompat.Light.NoActionBar

    Mi Style XML file looks like these and works just fine:

    <resources>
    
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>
    

    0 讨论(0)
  • 2020-12-01 12:22

    To set your App or any individual activity display in Full Screen mode, insert the code

    <application 
        android:icon="@drawable/icon" 
        android:label="@string/app_name" 
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
    

    in AndroidManifest.xml, under application or activity tab.

    0 讨论(0)
  • 2020-12-01 12:27

    Another way: add windowNoTitle and windowFullscreen attributes directly to the theme (you can find styles.xml file in res/values/ directory):

    <!-- Application theme. -->
    <style name="AppTheme" parent="AppBaseTheme">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowFullscreen">true</item>
    </style>
    

    in the manifest file, in application specify your theme

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
    
    0 讨论(0)
  • 2020-12-01 12:37

    In AndroidManifest.xml, set android:theme="@android:style/Theme.NoTitleBar.Fullscreen"in application tag.

    Individual activities can override the default by setting their own theme attributes.

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