Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
Component used: androidx.core:core-splashscreen
Version used: 1.0.0
Devices/Android versions reproduced on:
Issue Description
When using the Splashscreen API with an app that uses a
NavigationView
(within aDrawerLayout
) that has anandroid:fitsSystemWindows=true
attribute set , the header is not rendered properly. It has no top padding and is displayed under the system bar.The attached screenshots and demo project highlight the issue. The project is a minimal reproduction using the "Navigation Drawer Activity" template available in the New Project wizard in Android Studio. The only addition I made was to set the
<item name="android:windowTranslucentStatus">true</item>
in the main theme (Theme.SplashDemo
), and addandroid:fitsSystemWindows="true"
to theDrawerLayout
andNavigationView
.When I build and run the project without using the splashscreen API, it produces a working nav drawer as shown in the "working_drawer" screenshot that is attached.
Then, I added the splashscreen API, setup a basic splash screen theme, per the documentation , and called
installSplashscreen()
in the Activity'sonCreate
.Now, when I build and run the app, the nav drawer is not rendered correctly. When opened, the header is rendered without any top padding to fit the system windows. You can see the "android icon" is rendered underneath the top status bar.
This issue may be related to Issue 251434334 . The attached demo project produces and shows both issues.
Below are the steps to reproduce the issue using the attached demo app.
Prerequisites
The demo app has been downloaded, unzipped, and opened in Android Studio.
Steps to Reproduce
Expected Results
The Menu displays properly (see attached "working_drawer" screenshot), showing the Android Icon in the header with appropriate padding to not be obscured by the top status bar.
Actual Results
The Menu is not displayed properly (see attached "broken_drawer" screenshot). The Android Icon in the header has no padding, and is displayed under and obscured by the top status bar.