I am trying to implement a theme that has a fully transparent action and status bar with an opaque navigation bar. Basically something similar to the example provided on the Google Material Design website .

Here is some XML code that I wrote to create a topic that is pretty close -
<style name="MyTheme.Transparent" parent="android:Theme.Material.Light.DarkActionBar"> <item name="android:windowTranslucentStatus">true</item> <item name="android:windowTranslucentNavigation">false</item> <item name="android:colorPrimary">@android:color/transparent</item> <item name="android:colorPrimaryDark">@android:color/transparent</item> <item name="android:windowContentOverlay">@null</item> <item name="android:windowActionBarOverlay">true</item> <item name="android:statusBarColor">@android:color/transparent</item> </style>
However, as you can see in this image, the content appears behind the navigation bar below. That would be nice in a design where the user has to scroll vertically, however I don't want to do this! I want all content to fit without any scrolling.
I decided that I could add a simple
android:layout_alignParentBottom="true"
in the lowest form in the XML layout to push it. But it does not work! Instead, it aligns to the bottom of the navigation bar, but that's not what I want - it should be aligned at the top of the screen.
Then I realized that I could do some kind of field offset from the bottom, however, an attribute similar to? attr / actionBarSize does not seem to exist for the navigation bar. I would like to avoid choosing arbitrary values (especially since they differ depending on the orientation and can probably change in the future)
In the subject, I know that you can add -
<item name="android:fitsSystemWindows">true</item>
Which view does this (for the navigation bar at least), but then the image will be pushed out under the action bar. It seems that I can get the desired result for the navigation bar or the action bar, but never in both cases. It's almost as if Google doesn't even want people to do this, but they gave this example on the Material website.
Are there any ways around these issues?