Title: ErrorReportActivity draws under the status bar on targetSdk 35 (forced edge-to-edge) · Issue #2053 · NativeScript/android · GitHub
Open Graph Title: ErrorReportActivity draws under the status bar on targetSdk 35 (forced edge-to-edge) · Issue #2053 · NativeScript/android
X Title: ErrorReportActivity draws under the status bar on targetSdk 35 (forced edge-to-edge) · Issue #2053 · NativeScript/android
Description: Environment CLI: 9.x Android Runtime: @nativescript/android 9.1.1 (also verified unchanged in 9.1.2-next.2026-09-22) Device: Android 15+ (API 35) Describe the bug The debug crash screen (com.tns.ErrorReportActivity) renders its top error...
Open Graph Description: Environment CLI: 9.x Android Runtime: @nativescript/android 9.1.1 (also verified unchanged in 9.1.2-next.2026-09-22) Device: Android 15+ (API 35) Describe the bug The debug crash screen (com.tns.Er...
X Description: Environment CLI: 9.x Android Runtime: @nativescript/android 9.1.1 (also verified unchanged in 9.1.2-next.2026-09-22) Device: Android 15+ (API 35) Describe the bug The debug crash screen (com.tns.Er...
Opengraph URL: https://github.com/NativeScript/android/issues/2053
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"ErrorReportActivity draws under the status bar on targetSdk 35 (forced edge-to-edge)","articleBody":"**Environment**\n- CLI: 9.x\n- Android Runtime: @nativescript/android 9.1.1 (also verified unchanged in 9.1.2-next.2026-09-22)\n- Device: Android 15+ (API 35)\n\n**Describe the bug**\nThe debug crash screen (`com.tns.ErrorReportActivity`) renders its top error banner under the OS status bar when the app targets SDK 35, making the first line of the error message unreadable.\n\nAndroid 15 forces edge-to-edge for apps with `targetSdkVersion 35`, so the activity's window draws behind the status bar. The screen has never handled window insets:\n\n- `framework/app/src/debug/res/layout/error_activity.xml` pins `errorException` (the red message `TextView`) to the top of the parent `RelativeLayout` with only `paddingVertical=10dp` — no `android:fitsSystemWindows`, no inset margin.\n- `framework/app/src/debug/java/com/tns/ErrorReportActivity.java` sets a hardcoded `Theme_AppCompat_NoActionBar` and `ErrorReport.buildUI()` calls `setContentView` with no `WindowCompat`/`OnApplyWindowInsetsListener` handling.\n\n**To Reproduce**\n1. `ns run android` on an API 35 emulator/device (template already sets `targetSdkVersion 35`)\n2. Throw an uncaught JS exception (e.g. `throw new Error('...')` on startup)\n3. The crash screen's first line is obscured by the status bar\n\n**Expected behavior**\nThe `errorException` banner is offset below the status bar.\n\n**Possible fix**\nAdd `android:fitsSystemWindows=\"true\"` to the root `RelativeLayout` in `error_activity.xml`, or apply a `ViewCompat.setOnApplyWindowInsetsListener` in `ErrorReport.buildUI()` that pads the content by the `statusBars` inset.\n\nRelated: #1833 tracks the same root cause for normal app content, but `ErrorReportActivity` is a separate plain `AppCompatActivity` and won't inherit a fix applied to `NativeScriptActivity`'s content view.","author":{"url":"https://github.com/aleclarson","@type":"Person","name":"aleclarson"},"datePublished":"2026-09-25T22:18:40Z","url":"https://github.com/NativeScript/android/issues/2053"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:81b5cbf5-00b9-3cdc-b2ad-f67761f99508 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 850C:A20F9:1635DA2:1D6F281:6B01309C |
| html-safe-nonce | edff0fb06e94c88097b8abd83ba161119d2f0186f37c91225058aa3ed7c02d1a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NTBDOkEyMEY5OjE2MzVEQTI6MUQ2RjI4MTo2QjAxMzA5QyIsInZpc2l0b3JfaWQiOiI4ODkwMDUxODM3Mzk5NDc4NDI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 8b4e5033cd10ff53b03bdff7c4a58ca7d3ecd3189608bd90c86606317233d444 |
| hovercard-subject-tag | issue:5589166745 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/NativeScript/android/2053/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4b605a869b317410d58860fc8b7becfcfe1c00d234e4fa0e6ed7b87115845621/NativeScript/android/issues/2053 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4b605a869b317410d58860fc8b7becfcfe1c00d234e4fa0e6ed7b87115845621/NativeScript/android/issues/2053 |
| og:image:alt | Environment CLI: 9.x Android Runtime: @nativescript/android 9.1.1 (also verified unchanged in 9.1.2-next.2026-09-22) Device: Android 15+ (API 35) Describe the bug The debug crash screen (com.tns.Er... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | aleclarson |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| go-import | github.com/NativeScript/android git https://github.com/NativeScript/android.git |
| octolytics-dimension-user_id | 7392261 |
| octolytics-dimension-user_login | NativeScript |
| octolytics-dimension-repository_id | 29137950 |
| octolytics-dimension-repository_nwo | NativeScript/android |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 29137950 |
| octolytics-dimension-repository_network_root_nwo | NativeScript/android |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width