- 0 Talk
-
Theming
This document covers the basics of theming the Android Operating System.
| This article is need of cleanup. You can help out Simply-Android by re-organizing parts of the article, checking grammar and spelling, and doing other helpful things to correct the article.
|
Contents |
Tips
Edit
- themes can be applied via MetaMorph.
- themes can also be applied via adb (pushing files).
- images that can be edited or replaced for framework-res or an app will be found in drawable folders inside the apk.
- your device is either LDPI (240x320), MDPI (320x480), or HDPI (480x800). LDPI is the smallest resolution, the mid-side resolutions are MDPI & higher are HDPI.
- framework-res.apk can always be edited (it cannot be odex'd).
General Information
Edit
Only de-odex'd ROMs can be themed.
- odexed ROMs give the user more internal memory for apps, etc. You cannot use themes with odexed ROMs.
- deodexed ROMs gives the user a little less memory & a little more freedom & allows to theme or use themes.
framework-res.apk
- this is where all the "UI" or look of your device is located(ex. statusbar icons, lockscreen)
.xml's are located here as well for the text color of some elements in the UI(ex. notification in pulldown color). services.jar
- this controls the text color many elements in the UI in Android(ex. clock, buttons)
Change notification text from black to white
Edit
path-to-decompiled-framework-res/res/layout/status_bar.xml
<?xml version="1.0" encoding="UTF-8"?>
<com.android.server.status.StatusBarView
android:orientation="vertical"
android:background="@drawable/statusbar_background"
android:focusable="true"
android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout
android:orientation="horizontal"
android:id="@id/icons"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.android.server.status.IconMerger
android:gravity="center_vertical"
android:orientation="horizontal"
android:id="@id/notificationIcons"
android:paddingLeft="6.0dip"
android:layout_width="0.0dip"
android:layout_height="fill_parent"
android:layout_weight="1.0"
android:layout_alignParentLeft="true" />
<LinearLayout
android:gravity="center_vertical"
android:orientation="horizontal"
android:id="@id/statusIcons"
android:paddingRight="6.0dip"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_alignParentRight="true" />
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:id="@id/ticker"
android:paddingLeft="6.0dip"
android:animationCache="false"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageSwitcher
android:id="@id/tickerIcon"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="8.0dip">
<com.android.server.status.AnimatedImageView
android:layout_width="25.0dip" android:layout_height="25.0dip" />
<com.android.server.status.AnimatedImageView
android:layout_width="25.0dip" android:layout_height="25.0dip" />
</ImageSwitcher>
<com.android.server.status.TickerView
android:id="@id/tickerText"
android:paddingTop="2.0dip"
android:paddingRight="10.0dip"
android:layout_width="0.0dip"
android:layout_height="wrap_content"
android:layout_weight="1.0">
<TextView
android:textColor="#ffffffff"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true" />
<TextView
android:textColor="#ffffffff"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:singleLine="true" />
</com.android.server.status.TickerView>
</LinearLayout>
<com.android.server.status.DateView
android:textSize="16.0sp"
android:textStyle="bold"
android:textColor="?textColorPrimaryInverse"
android:gravity="left|center"
android:id="@id/date"
android:background="@drawable/statusbar_background"
android:paddingLeft="6.0px"
android:paddingRight="6.0px"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:singleLine="true" />
</com.android.server.status.StatusBarView>
Change the clock color from black to white
Edit
0.Open the services.jar file with something such as winrar or 7zip or whatever you prefer
0a.Copy out the classes.dex file to your SDK/tools folder
1. run following from command line:
java -jar baksmali.jar -o classout/ classes.dex
2. Locate the line in classout/smali/com/android/server/status/StatusBarIcon.smali that says: ".line 47". Under this line it should have something like:
const/high16 v6, -0x100
3. Change this to say:
const v6, -0x1
4. Now back to the command line:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
5. rename the new-classes.dex file to classes.dex
6. Open the services.jar file with your archiving tool again from step 0 and replace the existing classes.dex file with our new classes.dex we just created.
7. From command line run:
adb remount
8. also from command line:
adb push services.jar /system/framework/
7. Finally run:
adb reboot
Change system font
Edit
Note that it would probably be a good idea to use a sans font for all DroidSans replacements, and to use a serif font for DroidSerif replacements. You can, however, use either font type for both DroidSans and DroidSerif replacements.
- Select font(s) to use
- Rename the normal (non-italicized, non-bolded) sans font to "DroidSans.ttf" and the serif font to "DroidSerif-Regular.ttf"
- Rename the bolded sans font to "DroidSans-Bold.ttf" and the bolded serif font to "DroidSerif-Bold.ttf"
- Rename the italicized serif font to "DroidSerif-Italic.ttf"
- Rename the bolded and italicized serif font to "DroidSerif-BoldItalic.ttf"
- Rename any font you want to "Clockopia.ttf" (this is used for the lockscreen clock font)
- Go to your root directory
- Create a folder named "fonts" (without the quotes)
- Copy your fonts into this folder
- Create a Nandroid backup before proceeding
- Plug your phone into your PC and open the CMD prompt
- Do the following commands:
C:/adb remount adb push /fonts /system/fonts adb reboot
12. Your phone will reboot with your new font(s)
If you do not have adb installed, please see What is adb and how to install it
Free fonts available from: