Skip to content

Commit

Permalink
Made statusbar color transparent for RouterActivity (Android 5+)
Browse files Browse the repository at this point in the history
  • Loading branch information
litetex committed Jun 4, 2022
1 parent 2985258 commit be5af0b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
22 changes: 16 additions & 6 deletions app/src/main/res/values-v21/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,31 @@
<style name="Base" parent="Base.V21"/>

<!-- Light Theme -->
<style name="Base.V21.LightTheme" parent="Base.V19.LightTheme">
<style name="Base.V21.LightTheme" parent="Base.V19.LightTheme" />

</style>
<style name="Base.LightTheme" parent="Base.V21.LightTheme" />

<!-- Dark Theme -->
<style name="Base.V21.DarkTheme" parent="Base.V19.DarkTheme">
<style name="Base.V21.DarkTheme" parent="Base.V19.DarkTheme" />

</style>
<style name="Base.DarkTheme" parent="Base.V21.DarkTheme" />

<!-- Black Theme -->
<style name="Base.V21.BlackTheme" parent="Base.V19.BlackTheme">
<style name="Base.V21.BlackTheme" parent="Base.V19.BlackTheme" />

</style>
<style name="Base.BlackTheme" parent="Base.V21.BlackTheme" />

<!-- Router Activity -->
<style name="Base.V21.RouterActivityThemeLight" parent="Base.RouterActivityThemeLight">
<item name="android:statusBarColor">@android:color/transparent</item>
</style>

<style name="RouterActivityThemeLight" parent="Base.V21.RouterActivityThemeLight" />

<style name="Base.V21.RouterActivityThemeDark" parent="Base.RouterActivityThemeDark">
<item name="android:statusBarColor">@android:color/transparent</item>
</style>

<style name="RouterActivityThemeDark" parent="Base.V21.RouterActivityThemeDark" />

</resources>
9 changes: 7 additions & 2 deletions app/src/main/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -130,20 +130,25 @@
<item name="colorAccent">@color/black_settings_accent_color</item>
</style>

<style name="RouterActivityThemeLight" parent="LightTheme">
<!-- Router Activity -->
<style name="Base.RouterActivityThemeLight" parent="LightTheme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@null</item>
</style>

<style name="RouterActivityThemeDark" parent="DarkTheme">
<style name="RouterActivityThemeLight" parent="Base.RouterActivityThemeLight" />

<style name="Base.RouterActivityThemeDark" parent="DarkTheme">
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:colorBackgroundCacheHint">@null</item>
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowAnimationStyle">@null</item>
</style>

<style name="RouterActivityThemeDark" parent="Base.RouterActivityThemeDark" />

</resources>

0 comments on commit be5af0b

Please sign in to comment.