Skip to content

Commit 4d6fad0

Browse files
author
Oskari Leppäaho
committed
Hide the on-screen buttons when EditBox destroyed
1 parent c5e5bb5 commit 4d6fad0

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

1014 Bytes
Binary file not shown.

src/androidProj/nativeeditplugin/src/main/java/com/bkmin/android/NativeEditPlugin.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,23 @@ public void run() {
7878
RelativeLayout.LayoutParams.MATCH_PARENT);
7979
topViewGroup.addView(mainLayout, rlp);
8080
SetInitialized();
81+
82+
// This is needed to hide the on-screen buttons on some Android devices when the EditBox is destroyed.
83+
rootView.setOnSystemUiVisibilityChangeListener (new View.OnSystemUiVisibilityChangeListener() {
84+
@Override
85+
public void onSystemUiVisibilityChange(int visibility) {
86+
if ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0) {
87+
rootView.setSystemUiVisibility(
88+
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
89+
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
90+
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
91+
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
92+
| View.SYSTEM_UI_FLAG_FULLSCREEN
93+
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
94+
}
95+
}
96+
});
97+
8198
Log.i(LOG_TAG, "InitEditBoxPlugin okay");
8299
}
83100
});

0 commit comments

Comments
 (0)