Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.78 KB | None | 0 0
  1. requestWindowFeature(Window.FEATURE_NO_TITLE);
  2.  
  3. if (VERSION.SDK_INT >= VERSION_CODES.JELLY_BEAN) {
  4. View decorView = getWindow().getDecorView();
  5. int uiOptions = View.SYSTEM_UI_FLAG_FULLSCREEN;
  6. decorView.setSystemUiVisibility(uiOptions);
  7. } else
  8. getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
  9.  
  10. <LayoutSizeChangedSensorFrameLayout>
  11. <RelativeLayout>
  12.  
  13. #1
  14. <LinearLayout vertical, aligned to parent-top>
  15. <ImageView/>
  16. <TextView/>
  17. <CirclePageIndicator/>
  18. </LinearLayout>
  19.  
  20. #2
  21. <ImageView aligned to parent-bottom, and below #1 />
  22. <ViewPager aligned to the ImageView from all sides/>
  23.  
  24. #3
  25. <LinearLayout vertical, aligned to the parent-bottom>
  26. <TextView/>
  27. <EditText/>
  28. <Button/>
  29. </LinearLayout>
  30.  
  31. </RelativeLayout>
  32. </LayoutSizeChangedSensorFrameLayout>
  33.  
  34. <style name="AppTheme.Material" parent="@style/Theme.AppCompat.Light.DarkActionBar">
  35. ...
  36. <item name="windowActionBar">false</item>
  37. <item name="android:windowNoTitle">true</item>
  38. <item name="android:windowActionBar">false</item>
  39. <item name="windowNoTitle">true</item>
  40. <item name="android:windowTranslucentNavigation" tools:ignore="NewApi">true</item>
  41. <item name="android:windowTranslucentStatus" tools:ignore="NewApi">true</item>
  42. <item name="android:navigationBarColor" tools:ignore="NewApi">@android:color/transparent</item>
  43. </style>
  44.  
  45. //No title bar is set for the activity
  46. requestWindowFeature(Window.FEATURE_NO_TITLE);
  47. //Full screen is set for the Window
  48. getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
  49. WindowManager.LayoutParams.FLAG_FULLSCREEN);
  50.  
  51. <style name="CustomTheme" parent="Theme.AppCompat.Light.NoActionBar">
  52. <item name="android:windowFullscreen">true</item>
  53. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement