Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
hiii

Ataul Munim ataulm

💭
hiii
View GitHub Profile
@ataulm
ataulm / adb-demo.sh
Last active May 1, 2019
Clean status bar for Android
View adb-demo.sh
#!/bin/sh
# source: https://android.jlelse.eu/clean-your-status-bar-like-a-pro-76c89a1e2c2f
# Add these aliases to your `~/.profile`
# alias demoOn='sh /Users/<username>/scripts/adb-demo.sh on'
# alias demoOff='sh /Users/<username>/scripts/adb-demo.sh off'
CMD=$1
if [[ $CMD != "on" && $CMD != "off" ]]; then
View themes.xml
<style name="Theme.Monzo.Light" parent="Base.Theme.Monzo">
<item name="android:colorBackground">@color/off_white</item>
<item name="colorOnBackground">@color/navy</item>
<item name="colorSurface">@color/white</item>
<item name="colorOnSurface">@color/navy</item>
<item name="colorPrimary">@color/off_white</item>
<item name="colorOnPrimary">@color/navy</item>
<!-- ... -->
</style>
View themes_base.xml
<style name="Base.Theme.Monzo" parent="Platform.Theme.Monzo">
<!-- ... -->
<item name="tabStyle">@style/Widget.Monzo.TabLayoutLegacy</item>
<item name="textInputStyle">@style/Widget.Monzo.TextInputLayout</item>
<item name="toolbarStyle">@style/Widget.Monzo.Toolbar</item>
<!-- ... -->
</style>
View res_values-v23_themes.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Platform.V23.Theme.Monzo" parent="Platform.V21.Theme.Monzo">
<!-- Attributes which are only available from API 23 -->
</style>
<style name="Platform.Theme.Monzo" parent="Platform.V23.Theme.Monzo" />
</resources>
View values_theme_attrs.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="preferredStatusBarColor" format="color" />
<attr name="preferDarkStatusBarIcons" format="boolean" />
</resources>
View themes.xml
<style name="Theme.Monzo.Light" parent="Base.Theme.Monzo">
<item name="preferredStatusBarColor">@color/off_white_darker</item>
<item name="preferDarkStatusBarIcons">true</item>
<!-- ... -->
</style>
<style name="Theme.Monzo.Dark" parent="Base.Theme.Monzo">
<item name="preferredStatusBarColor">@color/navy_darker</item>
<item name="preferDarkStatusBarIcons">false</item>
<!-- ... -->
View res_values-v23_themes.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Platform.V23.Theme.Monzo" parent="Platform.V21.Theme.Monzo">
<!-- Controls whether status bar icons are light/dark - `minSdkVersion 23`-->
<item name="android:windowLightStatusBar">?attr/preferDarkStatusBarIcons</item>
<!-- Available on `21`, but we'll only set them alongside the above to avoid hard-to-read icons -->
<item name="android:statusBarColor">?attr/preferredStatusBarColor</item>
</style>
View themes.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Base.Theme.Monzo" parent="Platform.Theme.Monzo">
<item name="checkboxStyle">@style/Widget.Monzo.CompoundButton.CheckBox</item>
<!-- ... -->
</style>
</resources>
View widgets.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Widget.Monzo.CompoundButton.CheckBox" parent="Widget.MaterialComponents.CompoundButton.CheckBox">
<item name="android:textColor">?attr/mdsColorContentPrimary</item>
<item name="materialThemeOverlay">@style/ThemeOverlay.Monzo.CompoundButton.CheckBox</item>
</style>
<style name="ThemeOverlay.Monzo.CompoundButton.CheckBox" parent="">
<item name="colorSecondary">?attr/mdsColorPrimary</item>
View mds_content_primary_12.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:alpha="0.12" android:color="?attr/mdsColorContentPrimary" />
</selector>