Follow Us On:
FacebookGooglePlusTwitterYoutubeRSS
THIS IS THE SECOND INSTALLMENT OF THE ANDROID THEME DEVELOPMENT SERIES. FOR THE FIRST ONE, CLICK HERE.

THEMING RELATED WITH PNGs

1) Popups :-

Popups.

Present in : – framework_name\res\drawables-mdpi\

Name of the PNGs are : -

  • popup_bottom_bright.9.png
  • popup_bottom_dark.9.png
  • popup_bottom_medium.9.png
  • popup_center.dark.9.png
  • popup_center_medium.9.png
  • popup_full_bright.9.png
  • popup_top_bright.9.png
  • popup_top_dark.9.png

Please note that these are .9.PNGs. And they need to be .9.PNGs only. Normal PNGs will not work.
How to port from another ROM : – These .9.PNGs don’ t require porting usually. Just take it from the theme you are trying to port and place it in your \res\drawable-mdpi\ folder using WinRAR.
Note : – This is to be done after you have completed editing and compiling the APK. Using WinRAR.

2) Backgrounds of menus : -

Menu Background.

Present in : – framework_name\res\drawable-mdpi : -

Name of the PNGs are : -

  • menu_background.9.png : – This the background for one grid element.
  • menu_background_fill_parent_width.9.png : – This is the background of the whole grid element.
  • menu_more_bg.9.png : – The background of the menus when you select “More” menu.
  • menu_separator.9.png : – The separators(grid lines) between the various menus.

Please note that these are .9.PNGs. And they need to be .9.PNGs only. Normal PNGs will not work.
How to port from another ROM : – These .9.PNGs don’ t require porting usually. Just take it from the theme you are trying to port and place it in your \res\drawable-mdpi\ folder using WinRAR.
Note : – This is to be done after you have completed editing and compiling the APK. Using WinRAR.

3) Notification bar and notification background(All related PNGs) : -

Notification Bar and Drawer.

First six PNGs present in : – framework_name\res\drawable-ldpi except divider_horizontal_bright which is in framework_name\res\drawable-mdpi.

Last six PNGs present in : – twframe_name\res\drawable-ldpi or drawable-mdpi.

Names of the PNGs are : -

  • statusbar_background.9.png : – Can be a normal or a .9.PNG. Preferably a .9. As its black in most themes, no need to port. But if you want to you will have to follow method described below(Give me some time for the method).
  • status_bar_item_background_normal.9.png : – Background of the notifications on statusbar in idle condition. If you want to you will have to follow method described below.
  • status_bar_item_background_pressed.9.png : – Background of the notifications on the statusbar when the notification is selected. If you want to you will have to follow method described below.
  • divider_horizontal_bright.9.png : – The line which divides the notifications. Can be copied directly from the theme to be ported.
  • stat_sys_battery_[XX] : – These are the battery PNGs during normal use. Where [XX] refers to number between 0 and 100.
  • stat_sys_battery_chargeanim[XX] : – These are the battery charging PNGs. Here [XX] refers to a number between 0 and 100.
  • Other status bar PNGs : – All of them are of the form stat_sys_[X]_[Y]. By looking at the PNG itself you can identify which is for what.
  • quick_panel_music_bg.9.png : – This PNG is in twframework-res.apk\drawable-mdpi. This is the PNG for the music quick panel in the notification drawer. If you want to port this PNG from other theme then you will have to follow method described below.
  • quick_panel_list_bg_01.9.png : – This PNG is in twframework-res.apk\drawable-mdpi. This is the background for the titles such as “Ongoing”, “NoNotifications”, etc. It is a .9.PNG. Can be directly resized and used.
  • Quick panel icons : – These PNGs are in twframework-res.apk\drawable-ldpi. These are of the formquick_panel_icon_[NAME]_on/off. Are normal PNGs. Can be resized directly and placed in APK using WinRAR.
  • status_bar_header_background_01 : – This is present in twframework-res.apk\drawable-ldpi. This is the background for the quick panel. Is a normal PNG. Can be resized directly and placed in APK using WinRAR.
  • Unused notification drawer area : – The unused area in the notifications drawer is covered bystatus_bar_background.9.png.This is present in twframework-res.apk\drawable-ldpi. If porting from a theme, then you will have to use the method described below.
  • status_bar_close_on : – Present in twframewor-res.apk\drawable-ldpi. This is the PNG which defines the bottom of the notifications drawer.

 

EDITING/PORTING .9.PNGS

 

Let’ s start off with the basics of what is a .9.PNG. Well there is a nice quick read about it here.

So what is the problem with .9.PNGs?? You will get info about it in my pastebin here.

**HOW TO EDIT (DECOMPILE METHOD) : -

  1. Firstly, if you want to edit properly these PNGs, then you have to do it when the APK is in decompiled form. So decompile APK first.
  2. Also, if you are porting a theme, decompile the APK from that theme also.
  3. I am assuming the name of the PNG to be “btn_default_pressed.9.png”. Open btn_default_pressed.9.png from the base theme using GIMP and also open the same PNG from the theme you want to port.
  4. Note the the dimensions of the btn_default_pressed.9.png of our theme and the resize the same PNG from the theme you want to port accordingly.
  5. Notice the borders of the .9.PNG of our base theme. You will notice some black solid lines. Now these are the lines that define the PNG. And these should not be touched or edited.
  6. Now go to the PNG that you resized earlier. Using the rectangular select tool in GIMP, select the area of the PNG excluding the 1 px borders. And then copy it.(Figure 2.4 and 2.5).
  7. Then go to the “btn_default_pressed.9.png” of our framework and then select the same area (i.e. excluding the 1 px borders) and press DELETE. The area will become empty.(Figure 2.6).
  8. Then press CTRL+V(Paste).(Figure 2.6).
  9. Save it. While saving you will be asked to export image. Select “Merge visible layers” and save.
  10. There you have it. 1 PNG ported. Similarly, you can port other .9.PNGs. The important ones. Capish??
Theming, .9. PNGs.
Editing .9.PNGs.
Editing .9.PNGs.

THIS IS THE SECOND INSTALLMENT OF THE THEME DEVELOPMENT SERIES. FOR THE FIRST ONE, CLICK HERE.

5) Setting menu text colour to white in menus for black background : -

Menu and extended menu text.

Files to be edited : – styles.xml in \projects\framework_name\res\values\.

* Goto \projects\framework_name\res\values.
* Open styles.xml in notepad++.
* Press CTRL+F and search for “TextAppearance.Widget.IconMenu.Item”.
* The searched part will be like as shown in the following : – (more…)

NOTE : – THIS GUIDE CONTAINS VARIOUS METHODS WHICH I PERSONALLY USE TO THEME. THERE ARE SOME OTHER DIFFERENT WAYS IN WHICH YOU CAN DO THIS.

 

WHAT ALL YOU NEED TO THEME??

 

  • APK Manager 5.0.2/APK Multitool : – Will be used for decompiling/compiling frameworks.
  • APKTool : – This you need to place in your \windows\ folder.
  • Java SDK : – This is necessary for the decompiling/compiling process. Also required in many patches for frameworks.
  • GIMP : – This is the image editing software which we are going to use to edit/resize PNGs.
  • Android SDK : – Again not of much use in this guide if using APKManager 5.0.2 (necessary if you are using APKMultitool) but always good to have for learning.
  • WinRAR : – This will be used for opening the APKs for adding PNGs after editing.
  • Notepad++ : – This we will use for opening the various XML/smali files for editing code.
  • Unedited base framework : – Its necessary that its unedited because it may lead to errors(like error compiling .9.PNGs)
  • Hex Colours : – You’ ll need hex colour values for using them in various XMLs. This here is a nice website for that.
  • Lots of patience : – Now this skill you have to develop on your own.

 

HOW TO SETUP EVERYTHING FOR MAKING/PORTING THEME??

 

1) Download APK Manager 5.0.2 from the above mentioned link. Extract the contents to any of your drives.

2) Download APKTool (Main program as well as the dependancies for you respective OS). Extract both the .tars contents to :\windows\.

3) Download the latest version (7u2 currently) of JDK(Java SDK) from the site mentioned above and install it.

4) GIMP, Notepad++ : – Download from above mentioned site and install them.

5) WinRAR : – I guess you should be able to get this on your own.

6) Unedited base framework : – Any framework that is compile-able (Stock frameworks are always compile-able).

7) Android SDK : – Download either the zip or .exe from above mentioned site and set it up accordingly. (Note : – This step can be skipped)
(more…)

page 1 of 1
Stay Updated via your Android
Welcome to AndroidNova.org

Welcome to the AndroidNova Universe where everyone is updated with the latest happenings in the Android World. Right from the latest news to the newest devices, apps, games, AndroidNova amasses its visitors with the knowledge and expertise that no other Android blog can provide. We Welcome everyone for a Delightful journey in the Android Galaxy. Join us and we guarantee a thrilling yet Wonderful journey in the universe of Android.

Find Us on Facebook
Advertisement
.