dimanche 8 février 2015

[GUIDE] How to create CM12 Themes using Eclipse/Android Studio topic








Quote:









Hello everyone, I'm back once again from my cave and providing this active community with something beneficial. Lately I wanted to get back into Theming, this time for CM12 but the guides out there aren't what I'm looking for. They have potential and is a great way to start but for me... It just wasn't working out. I'm going to keep this tutorial simple and on point whilst proving useful information as well, however this time I will NOT be explaining how to theme. That is something you're going to have to learn yourself. But you may ask me or other users on how to theme certain content and if you need help. Don't hesitate to ask us, we're here to help.





Quote:









What this guide will help you with -
- Creating and coding a simple Theme base from scratch. - Creating resource folders and needed .xml's for the theme to register correctly. - How to harness the power of Kryptonite. - Provided code and resources.






Quote:









- A good image editing software, I use Photoshop(Paid) and Paint.NET(Free). Gimp is also another good software. - Android Studio or Eclipse. (Eclipse preferred) - And your special Iron Man underwear.






Quote:









Section One

0. Create an Icon for your theme (512px x 512px) then convert it to different DPI's here. 1. Open your preferred IDE and create a new Android Project. 2. Name your App (Theme Name) and give it an appropriate packagename (com.yourname.appname). 3. Skip the icon and use API 21 as target and compiler. 4. Finish creating your project.





Quote:









Section Two

1. Navigate to your workspace folder. 2. Open your project folder and delete the following. - Res folder - The folder inside src folder (Should be labeled as package name) - Your Manifest file.





Quote:









Section Three

1. Download my theme_package. 2. Extract the folder and move everything into your workspace directory. 3. Overwrite assets folder when prompted. 4. Go back to your IDE and refresh your project folder to apply changes.





Quote:









Section Four

1. Open your AndroidManifest.xml file and delete everything. 2. Go here and copy the code and replace it with yours. 3. Apply all the changes stated in the code. (Package Name) 4. Save everything.





Quote:









Section Five

To theme create a folder in the /assets/overlays folder. Give the folder the packagename of the app you're theming (com.android.whatever). remember the structure of theming is exactly the same contained in the app you're theming. For example, if you theme ic_launcher.png (icon) from /res/drawable-xxhdpi then create a folder inside of com.android.whatever called res then create a folder inside res called drawable-xxhdpi. Then drop in your themed image into the folder and you're done. The same goes for any asset file or .xml code. Note you cannot modify the code within the application as there is no way to do so, so please don't ask.





Quote:









If you think this guide helped. Then hit the thanks button!










Aucun commentaire:

Enregistrer un commentaire