Fandom

Simply-Android Wiki

Theming

31pages on
this wiki
Add New Page
Talk0 Share

This document covers the basics of theming the Android Operating System.

TipsEdit

  • 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 InformationEdit

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 whiteEdit

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 whiteEdit

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 fontEdit

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.

  1. Select font(s) to use
  2. Rename the normal (non-italicized, non-bolded) sans font to "DroidSans.ttf" and the serif font to "DroidSerif-Regular.ttf"
  3. Rename the bolded sans font to "DroidSans-Bold.ttf" and the bolded serif font to "DroidSerif-Bold.ttf"
  4. Rename the italicized serif font to "DroidSerif-Italic.ttf"
  5. Rename the bolded and italicized serif font to "DroidSerif-BoldItalic.ttf"
  6. Rename any font you want to "Clockopia.ttf" (this is used for the lockscreen clock font)
  7. Go to your root directory
  8. Create a folder named "fonts" (without the quotes)
  9. Copy your fonts into this folder
  10. Create a Nandroid backup before proceeding
  11. Plug your phone into your PC and open the CMD prompt
  12. 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:

Californiafonts.com

1001 Free Fonts

See alsoEdit

Change Clock Text Color [Video]

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.