The goal of the theme template is to provide a comprehensive base for new and veteran themers alike. The overall design of the template's theme will match the system theme on the current version of Cyanogen. Community themers are encouraged to not only use this as a jump off point, but to actively help improve the template by submitting enhancements or new overlays that improve the coverage.
When contributing new (or adding to) styles to the template, make sure to adhere to some basic rules:
-
Whitespace
Make sure that XML is clear of unnecessary whitespaces and does not use tab indentation. CyanogenMod standard indentation is 4 spaces. -
Proper Naming
Make sure that assets are added with the correct names or follow our proposed naming scheme. -
Use of Common Overlay
Cyanogen themes can make use of the common folder to reference values and styles that might be used across multiple overlays. By collecting all of this information into the common overlay, themes are easier to edit in the future and reduce size by not duplicating resources repeatedly. -
Copyright
Make sure to include the CyanogenMod copyright header in XML files. -
Overlay Coverage
Check your overlay thoroughly and make sure that you haven't changed any values incorrectly or caused readability issues. -
Add Comments
Add comments to style and color XMLs that explains what the values will be affecting if not immediately apparent.
-
Theme Debugger is a great tool to quickly see many of the framework assets.
-
Android SVG to VectorDrawable is a great resource to convert an SVG into a usable Android vector drawable XML.
When developing a new theme, you might find that your theme (or components) may fail to install. The theme engine is pretty good about providing relevant information in the log.
To quickly see the error messages related to a failed install, you can set up a Logcat filter. This will show you only the relevant information and skip all the other noise, allowing you to quickly see the error.
If you are using Android Studio, Android DDMS will be available directly within the IDE. You can set up the filter from the menu in the top right.
If you are using a different IDE, Android DDMS can be accessed in the Android SDK. You'll find it in the /tools directory.
Copyright (C) 2015 The CyanogenMod Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note: At this time, we are not accepting Google or third-party app overlays. The template should be covering frameworks and core apps only. This may change in the future.