GeezerVison is showing github.com — SDK version 35 breaks the layout. It is stretched behind the status bar and the system bottom buttons. · Issue #1833 · NativeScript/android
SDK version 35 breaks the layout. It is stretched behind the status bar and the system bottom buttons. #1833
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 8.9.2
- Cross-platform modules: none
- Android Runtime: 8.9.1
- iOS Runtime (if applicable): n/a
- Plugin(s): n/a
Describe the bug
The layout is stretched behind the status bar and the system soft buttons. In the "tabs" layout, the tabs remain behind the Android system soft buttons.
To Reproduce
Install the Angular tabs template. Modify the "app.gradle" with
compileSdkVersion 35
buildToolsVersion "35"
targetSdkVersion 35
Expected behavior
Sample project
Additional context
Reacted by xieweilyg, Samuel Rodríguez, Rafael Figueiredo, Luís Lopes, Dominik Pollok, Lucas Habrich, Silvio, Rob and fcpc-fcpc
Reacted by saskra and Silvio
Activity
ZeeshanFareed123 commented on Aug 8, 2025
Adding this to your application will fix it in all classes:
registerActivityLifecycleCallbacks(object : ActivityLifecycleCallbacks {
override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) {
// 1️⃣ Opt out of the old fitsSystemWindows behaviour
WindowCompat.setDecorFitsSystemWindows(activity.window, false)
// 2️⃣ Grab the root content view
val content = activity.findViewById<View>(android.R.id.content)
// 3️⃣ Listen for all system‐bar insets and apply them as padding
ViewCompat.setOnApplyWindowInsetsListener(content) { view, insets ->
val sysBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
view.updatePadding(
top = 0, // DON'T push content below status bar (content goes under it)
bottom = sysBars.bottom // DO push content above the nav/gesture bar
)
WindowInsetsCompat.CONSUMED
}
ViewCompat.requestApplyInsets(content)
}
// the rest can be no‑ops
override fun onActivityStarted(activity: Activity) = Unit
override fun onActivityResumed(activity: Activity) = Unit
override fun onActivityPaused(activity: Activity) = Unit
override fun onActivityStopped(activity: Activity) = Unit
override fun onActivitySaveInstanceState(activity: Activity, outState: Bundle) = Unit
override fun onActivityDestroyed(activity: Activity) = Unit
})
or you can simply add this line separately:
WindowCompat.setDecorFitsSystemWindows(window, true)
See this Article: https://medium.com/androiddevelopers/insets-handling-tips-for-android-15s-edge-to-edge-enforcement-872774e8839b
silviosan commented on Sep 4, 2025
Are there any news regarding the progress of solving this problem?
Metadata
Metadata
Development
No branches or pull requestsIssue actions