Hello everyone.
This is my first post on this cool forum!
I’m trying to solve a problem with a fullscreen window.
Now, the Android processing app is not fullscreen.
The upper part is ActionBar black.
In Android Studio I’m trying to change this and extend the window to full screen “really full” by keeping the ActionBar.
I’m trying to remove it and enlarge the window to really full screen.
I set the Theme, I set the flags I know. And it succeeds (not quite).
The ActionBar disappears, it’s transparent (as in screenshots),
…but the window itself remains the same size, it doesn’t expand, it’s not fullscreen.
Action Bar is translucent , behind it is my phone wallpaper
ActionBar is hidded, but window size not changed
Do I have to change something in…
PFragment.class here? …or what else to set?
Please give me some advice if anyone has already faced this problem.
Thanks.
MainActivity set all know me flags :
(transculen, fullscreen, no actionbar theme in style… added to Activity)
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS, WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
View decorView = getWindow().getDecorView();
decorView.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN);
FrameLayout frame = new FrameLayout(this);
frame.setId(CompatUtils.getUniqueViewId());
setContentView(frame, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT));
////PROCESSING
sketch = new AAA();
PFragment fragment = new PFragment(sketch);
fragment.setView(frame, this);
}