Guest User

Untitled

a guest
Jan 12th, 2018
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.34 KB | None | 0 0
  1. getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN);
  2.  
  3. protected void onCreate(Bundle savedInstanceState) {
  4. super.onCreate(savedInstanceState);
  5. getWindow().requestFeature(Window.FEATURE_ACTION_BAR);
  6. getActionBar().hide();
  7. setContentView(R.layout.test_activity);
  8.  
  9. <activity
  10. android:name=".activity.SplashActivity"
  11. android:screenOrientation="portrait"
  12. android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
  13. <intent-filter>
  14. <action android:name="android.intent.action.MAIN" />
  15. <category android:name="android.intent.category.LAUNCHER" />
  16. </intent-filter>
  17. </activity>
  18.  
  19. <style name="SplashTheme" parent="Theme.AppCompat.NoActionBar">
  20.  
  21. <item name="colorPrimary">@color/colorPrimary</item>
  22. <item name="colorPrimaryDark">@color/colorPrimary</item>
  23. <item name="colorAccent">@color/colorAccent</item>
  24. <item name="android:windowBackground">@color/colorPrimary</item>
  25.  
  26. </style>
  27.  
  28. <activity
  29. android:name=".ActivityName"
  30. android:theme="@style/SplashTheme"> // apply splash them here
  31.  
  32. <intent-filter>
  33. <action android:name="android.intent.action.MAIN" />
  34. <category android:name="android.intent.category.LAUNCHER" />
  35. </intent-filter>
  36. </activity>
Add Comment
Please, Sign In to add comment