Code Monkey home page Code Monkey logo

android_packages_themes_template's Introduction

AndroidManifest.xml

There are several entries in addition to the standard Android package information that must be present in your manifest for your theme to behave as expected. All of the following should be inside the main <manifest></manifest> tags.

<uses-feature android:required="true"
    android:name="org.cyanogenmod.theme" />

This entry indicates that the package should only be installable on devices that support the CM Theme Engine.

<uses-sdk android:minSdkVersion="19"
    android:targetSdkVersion="19" />

The CM Theme Engine is only available in versions of CyanogenMod that use SDK v19 and above. This entry will prevent your package from asking for additional unneccesary permissions.

<application android:hasCode="false"
    android:icon="@drawable/ic_launcher"
    android:label="Your Theme Name" />

This entry will place an item in the Installed Apps list on Android, and sets the app icon to be used (from res/drawable).

<meta-data android:name="org.cyanogenmod.theme.name"
    android:value="Theme Name" />

<meta-data android:name="org.cyanogenmod.theme.author"
    android:value="Your Name" />

These two entries are required for the Theme Engine to recognize your APK as a theme.

Assets

Theme assets should be placed into the directory assets/ with the following structure:

assets/
     ├──alarms/
     │          └──foo.{ mp3, ogg, wav, ... }
     ├──bootanimation/
     │          └──bootanimation.zip
     ├──fonts/
     │          ├──foo.ttf
     │          ├──{ ... }
     │          └──fonts.xml
     ├──icons/
     │          └──res/
     │                    ├──drawable-{ hdpi, xhdpi, ... }/
     │                    │          ├──foo.png
     │                    │          └──{ ... }
     │                    └──xml/
     │                              └──appfilter.xml
     ├──images/
     │          ├──lockscreen_preview.jpg
     │          ├──styles_preview.jpg
     │          └──wallpaper_preview.jpg
     ├──lockscreen/
     │          └──foo.{ jpg, png, webp, ... }
     ├──notifications/
     │          └──foo.{ mp3, wav, ... }
     ├──overlays/
     │         ├──foo.package.name/
     │         │            └──res/
     │         │                     ├──drawable-{ hdpi, xhdpi, ... }/
     │         │                     │            ├──some_resource.{ jpg, png, ... }
     │         │                     │            └──{ ... }
     │         │                     ├──{ ... }
     │         │                     ├──drawable/
     │         │                     │            ├──some_resource.xml
     │         │                     │            └──{ ... }
     │         │                     └──values/
     │         │                                   ├──colors.xml
     │         │                                   └──styles.xml
     │         ├──{ ... }
     │         └──common/
     │                       └──res/
     │                                ├──drawable-{ hdpi, xhdpi, ... }/
     │                                │            ├──some_resource.{ jpg, png, ... }
     │                                │            └──{ ... }
     │                                ├──{ ... }
     │                                ├──drawable/
     │                                │            ├──some_resource.xml
     │                                │            └──{ ... }
     │                                └──values/
     │                                              ├──colors.xml
     │                                              └──styles.xml
     ├──ringtones/
     │         └──foo.{ mp3, ogg, wav, ... }
     └──wallpapers/
                └──foo.{ jpg, png, ... }

Directory Description
alarms/
ringtones/
notifications/
Each of these directories should contain a single audio file to be set as the respective system sound.
lockscreen/
wallpapers/
Each of these directories should contain a single image file to be used as the respective wallpaper (lockscreen or home screen). Support for providing multiple wallpaper options in a single theme may be implemented in the future.
bootanimation/ This directory should contain a single, standard format multi-part boot animation zip file. For help creating boot animations, visit this thread on XDA: http://forum.xda-developers.com/showthread.php?t=1852621
images/ This directory should contain three images, to be displayed in the Theme Chooser:

All 3 images must be 600px wide by 1080px tall.

lockscreen_preview.jpg must be a cropped version of your lockscreen wallpaper.

wallpaper_preview.jpg must be a cropped version of your home screen wallpaper.

style_preview.jpg must be a screenshot displaying an actual example of your theme's overlay style in-use.
icons/ This directory uses the de-facto standard format for icon theming that's been in use for some time among Launchers. Icons are placed in DPI-named directories and are then referenced in xml/appfilters.xml.

Don’t forget to put everything inside icons/res/

To learn more about how to set up the file structure for icons and how to theme icons in Android, see the ICONS section of this thread on XDA: http://forum.xda-developers.com/showthread.php?t=1649891
overlays/ Contains drawables and values for each package or system component to be themed. Drawables and components within XMLs are a 1-to-1 replacement for elements defined in installed packages.

Additionally contains a common/ directory which is used to define assets that can be reused across multiple applications. To reference an item from common/, preface an element's src= with @*common:

android_packages_themes_template's People

Contributors

euclidgeo avatar neatchee avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.