Skip to content

Commit 8a9a58c

Browse files
authored
Apply edge to edge to all sdk versions (#1339)
1 parent 90f86f8 commit 8a9a58c

File tree

1 file changed

+6
-8
lines changed
  • src/main/resources/native/android/android_project/app/src/main/java/com/gluonhq/helloandroid

1 file changed

+6
-8
lines changed

src/main/resources/native/android/android_project/app/src/main/java/com/gluonhq/helloandroid/MainActivity.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,12 @@ protected void onCreate(Bundle savedInstanceState) {
9898
setContentView(mViewGroup);
9999
instance = this;
100100

101-
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) { // <= 34
102-
// Enable edge-to-edge display, extending the app to the full extension of the screen.
103-
// The system bars are now on top of the application, and necessary padding should be
104-
// applied to the top (AppBar) and bottom, to avoid overlaps.
105-
// The DisplayService in Attach can be used to track the insets of the system bars
106-
// and the StatusBarService can be used to set a dark or light appearance of the status bar
107-
WindowCompat.enableEdgeToEdge(getWindow());
108-
} // else, >= 35 has edge-to-edge enabled by default
101+
// Enable edge-to-edge display, extending the app to the full extension of the screen.
102+
// The system bars are now on top of the application, and necessary padding should be
103+
// applied to the top (AppBar) and bottom, to avoid overlaps.
104+
// The DisplayService in Attach can be used to track the insets of the system bars
105+
// and the StatusBarService can be used to set a dark or light appearance of the status bar
106+
WindowCompat.enableEdgeToEdge(getWindow());
109107

110108
imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
111109
Log.v(TAG, "onCreate done");

0 commit comments

Comments
 (0)