-
Notifications
You must be signed in to change notification settings - Fork 3
(cmte) Getting your theme ready for full creative mode support
- Important Commons Tweaks
- Framework Tweaks
- Settings Tweaks
- SystemUI Tweaks
- Adding Theme Ready Overlays in conjunction with Stock Overlays
-
So how does this all work? If you are a CMTE themer who has been around, by now you should know that there is something called a commons framework that allows themers to have a unified package to call from, without repeating values. For example, you can call a value @*common:color/theme_color, from a package like com.android.systemui, and it can also be called from any other package. To set your theme up with dashboard, you must have these values in a values-v1 folder in /assets/overlays/common/res/values-v1/ in any file, as dashboard will use a higher level API to override your values.
-
I have named the creative mode values to represent exactly what works where under what feature for dashboard. Note: YOU DON'T HAVE TO ADD ALL OF THESE if you don't want to.
<color name="creative_mode_accent">@android:color/white</color> <color name="creative_mode_accent_secondary">#ff777777</color> <color name="creative_mode_accent_light">#ff777777</color> <color name="creative_mode_app_background">#ff000000</color> <color name="creative_mode_light_background">#ffd7d7d7</color> <color name="creative_mode_dialog_color_dark">#bf000000</color> <color name="creative_mode_dialog_color_light">#bfeeeeee</color> <color name="creative_mode_main_color">#ff212021</color> <color name="creative_mode_main_color_dark">#ff212021</color> <color name="creative_mode_notification_primary">#ffffffff</color> <color name="creative_mode_notification_secondary">#ffaeaeae</color> <color name="creative_mode_ripple">#4a777777</color><color name="creative_mode_settings_icon_tint">@android:color/white</color><color name="creative_mode_qs_background_color">#cc000000</color> <color name="creative_mode_qs_header_color">#ff1f1f1f</color> <color name="creative_mode_qs_icon_color">#ffffffff</color> <color name="creative_mode_qs_icon_color_disabled">#4dffffff</color> <color name="creative_mode_qs_tile_text">@android:color/white</color> <color name="creative_mode_notification_background">#e6212021</color> -
To glance at what kind of commons folder I use (coined the cdt base activator), please click this link: https://github.com/nicholaschum/ProjektDashboard/tree/cmte/sample-theme/common/res
You can take a look at how things are referenced here (https://github.com/nicholaschum/ProjektDashboard/tree/cmte/sample-theme/android/res) in accordance to my commons framework folder (https://github.com/nicholaschum/ProjektDashboard/tree/cmte/sample-theme/common/res), which ultimately gets linked back to the creative values.
Please note, main_color and main_color_dark are your actionbar colors, colorPrimary and colorPrimaryDark, respectfully.
<color name="creative_mode_main_color">#ff212021</color>
<color name="creative_mode_main_color_dark">#ff212021</color>
You can take a look at how things are referenced here (https://github.com/nicholaschum/ProjektDashboard/tree/cmte/sample-theme/com.android.settings/res) in accordance to my commons framework folder (https://github.com/nicholaschum/ProjektDashboard/tree/cmte/sample-theme/common/res), which ultimately gets linked back to the creative values.
Please note that if you want to add support for tintable Settings icon colors, you must structure EACH drawable in this way (e.g. ic_settings_storage.png from the normal AOSP system) -> ic_settings_storage.xml -> ic_settings_storage_your_name.png so the XML will take priority with the tint.
A normal tinted icon would look like this:
<?xml version="1.0" encoding="utf-8"?>
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/ic_settings_storage_cdt"
android:tint="@*common:color/creative_mode_settings_icon_tint"/>
So you can see that the tint is overriding the ic_settings_storage_cdt drawable. Again, if your design is something like JayRod's BSC with Chrome accents and you don't want Settings icons to be tinted, that's perfectly fine, if the user picks a tint color, it won't break the theme in any way once it is built.
There are indeed other values for Settings that gets themed, but it adds them in their usual spot, for example the color value "system_accent_color" is added into the values-v10 to values-v12 folder, so I would please ask for you if you want to keep this option open, to not use any values above these API folders.
You can take a look at how things are referenced here (https://github.com/nicholaschum/ProjektDashboard/tree/cmte/sample-theme/com.android.systemui/res) in accordance to my commons framework folder (https://github.com/nicholaschum/ProjektDashboard/tree/cmte/sample-theme/common/res), which ultimately gets linked back to the creative values.
All you have to do is create a duplicate overlay for e.g. "com.google.android.apps.plus" (G+), and add Theme Ready tweaks into the duplicated overlay folder, then name it accordingly to the list below, for example, "themable.google.plus".
- Google Plus (themable.google.plus)
- Google App (themable.google.app)
- Gmail (themable.gmail)
- Youtube (themable.youtube)
- Play Store (themable.vending)
- Hangouts (themable.hangouts)
- Google Photos (themable.google.photos)
To begin theming these apps: http://forum.xda-developers.com/android/apps-games/apps-themeable-hangouts-layers-cmte-t3113192





