mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 20:57:24 +01:00
parent
16f6be3613
commit
4876eaafcc
@ -154,6 +154,14 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onWindowFocusChanged(boolean hasFocus) {
|
||||||
|
super.onWindowFocusChanged(hasFocus);
|
||||||
|
if (hasFocus) {
|
||||||
|
setSystemUiVisibility();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
public boolean dispatchKeyEvent(KeyEvent event) {
|
||||||
int action = event.getAction();
|
int action = event.getAction();
|
||||||
@ -360,12 +368,15 @@ public class ReaderActivity extends BaseRxActivity<ReaderPresenter> {
|
|||||||
uiFlags = 0;
|
uiFlags = 0;
|
||||||
uiFlags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
|
uiFlags |= View.SYSTEM_UI_FLAG_HIDE_NAVIGATION;
|
||||||
if (statusBarHidden) {
|
if (statusBarHidden) {
|
||||||
uiFlags |= View.SYSTEM_UI_FLAG_FULLSCREEN;
|
uiFlags |= View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||||
uiFlags |= View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
|
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||||
|
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||||
|
| View.SYSTEM_UI_FLAG_FULLSCREEN;
|
||||||
}
|
}
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
|
||||||
uiFlags |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
uiFlags |= View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setSystemUiVisibility() {
|
public void setSystemUiVisibility() {
|
||||||
getWindow().getDecorView().setSystemUiVisibility(uiFlags);
|
getWindow().getDecorView().setSystemUiVisibility(uiFlags);
|
||||||
|
Loading…
Reference in New Issue
Block a user