-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,946
  • 2
  • 14
  • 23
Truong Hieu
  • 3,309
  • 2
  • 20
  • 37

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,240
  • 2
  • 22
  • 24
RAJAN
  • 126
  • 1
  • 1
  • 11
  • 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. – Truong Hieu Sep 27 '16 at 06:00