Advertisement
Guest User

Untitled

a guest
Aug 29th, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.31 KB | None | 0 0
  1. getActionBar().hide();
  2.  
  3. <style name="NoActionBar" parent="@android:style/Theme.Holo.Light">
  4. <item name="android:windowActionBar">false</item>
  5. <item name="android:windowNoTitle">true</item>
  6. </style>
  7.  
  8. <activity android:theme="@style/NoActionBar" ... />
  9.  
  10. <activity
  11. android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
  12. ....
  13. >
  14.  
  15. <application
  16. .
  17. .
  18. android:theme="@android:style/Theme.Holo.Light.NoActionBar"
  19. . >
  20.  
  21. public class xxxActivity extends ActionBarActivity{
  22.  
  23. public class xxxActivity extends Activity {
  24.  
  25. ActionBar actionBar = getSupportActionBar();
  26. actionBar.hide();
  27.  
  28. this.requestWindowFeature(Window.FEATURE_NO_TITLE);
  29.  
  30. protected void onCreate(Bundle savedInstanceState) {
  31. super.onCreate(savedInstanceState);
  32. setContentView(R.layout.activity_my);
  33. getSupportActionBar().hide();
  34. }
  35.  
  36. <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.Light.DarkActionBar">
  37. <item name="windowActionBar">false</item>
  38. <item name="windowNoTitle">true</item>
  39. <item name="android:windowFullscreen">true</item>
  40. </style>
  41.  
  42. android:theme="@style/AppTheme.NoActionBar"
  43.  
  44. <style name="NoActionBar" parent="@style/Theme.AppCompat.Light">
  45. <item name="android:windowNoTitle">true</item>
  46. </style>
  47.  
  48. <activity android:theme="@style/NoActionBar" ... />
  49.  
  50. <style name="AppTheme" parent="Theme.AppCompat.NoActionBar">
  51. <!-- Customize your theme here. -->
  52. </style>
  53.  
  54. requestWindowFeature(Window.FEATURE_NO_TITLE);
  55. getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 0);
  56.  
  57. <style name="MyTheme" parent="android:Theme.Material.Light.NoActionBar">
  58.  
  59. style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar>
  60.  
  61. <style name="AppTheme" parent="AppBaseTheme">
  62. <item name="android:windowActionBarOverlay">true</item>
  63. <item name="android:actionBarStyle">@style/NoActionBarStyle</item>
  64. <item name="android:windowContentOverlay">@null</item>
  65. </style>
  66. <style name="NoActionBarStyle" parent="android:Widget.Holo.ActionBar">
  67. <item name="android:backgroundSplit">@null</item>
  68. <item name="android:displayOptions"></item>
  69. </style>
  70.  
  71. ActionBar actionBar = getSupportActionBar();
  72. actionBar.hide();
  73.  
  74. <activity
  75. android:name=".MainActivity"
  76. android:theme="@android:style/Theme.Holo.NoActionBar"
  77. android:label="@string/app_name" >
  78.  
  79. protected void onCreate(Bundle savedInstanceState) {
  80. super.onCreate(savedInstanceState);
  81. android.support.v7.app.ActionBar actionBar = getSupportActionBar();
  82. if (actionBar != null) {
  83. actionBar.hide();
  84. }
  85. setContentView(R.layout.activity_main);
  86.  
  87. requestWindowFeature(Window.FEATURE_NO_TITLE);
  88. setContentView(R.layout.activity_main);
  89.  
  90. <!-- custom application theme. -->
  91. <style name="MarkitTheme" parent="Theme.AppCompat.Light.NoActionBar">
  92. <!-- Customize your theme here. -->
  93. <item name="colorPrimary">@color/colorPrimary</item>
  94. <item name="colorPrimaryDark">@color/colorPrimary</item>
  95. <item name="colorAccent">@color/colorAccent</item>
  96.  
  97. <item name="android:windowNoTitle">true</item>
  98. </style>
  99.  
  100. <activity android:name=".MainActivity"
  101. android:theme="@style/MarkitTheme">
  102.  
  103. android:label="@string/empty_string"
  104.  
  105. <string name="empty_string">""</string>
  106.  
  107. <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"></style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement