-5

I have 2 activities: A and B

A uses style: Appcompat.Light.DarkActionBar windowActionBar false, windowNoTitle true.

B uses style: Theme.Translucent windowActionBar false, windowNoTitle false.

I used A to call B, but when B appeared on the screen, activity A seem like change to fullscreen.

How can i only show activity B without affecting A?enter image description here

Preetika Kaur
  • 1,991
  • 2
  • 16
  • 23
Harry T.
  • 3,478
  • 2
  • 21
  • 41

1 Answers1

1

I think you have to configure dynamically.this is small snippet of code you follow like this. This code is not exact.

if (Build.VERSION.SDK_INT < 16)
{
    // Hide the status bar
    getWindow().setFlag(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
    // Hide the action bar
    getSupportActionBar().hide();
}
else
{
    // Hide the status bar
    getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN);
    / Hide the action bar
    getActionBar().hide();
}

Or you can refer from Here

Prabindh
  • 3,356
  • 2
  • 23
  • 25
RAJAN
  • 126
  • 1
  • 1
  • 12
  • My question is how to keep the StatusBar there, not hiding. But with your code, i think i found the way to fix it. Tks anyway. – Harry T. Sep 27 '16 at 06:00