Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[GUIDE] Tips for themers :)

OP ZduneX25

19th December 2011, 08:31 PM   |  #1  
ZduneX25's Avatar
OP Recognized Themer
Thanks Meter: 4,948
 
3,959 posts
Join Date:Joined: Nov 2010
Donate to Me
More
Hi guys it's time to share some of my tips with all themers

1) transparent/custom settings - from meziu and miui

a) transparent
open themes.xml with a good text editor

Code:
<style name="Theme" parent="@android:style/Theme">
    <item name="android:colorBackground">@android:color/transparent</item>
    <item name="android:windowBackground">@drawable/background_own</item>
    <item name="android:windowShowWallpaper">true</item>
</style>
Now you have to fix blank screen in video-camera and small popups:

Code:
<style name="Theme.NoTitleBar" parent="@android:style/Theme">
    <item name="android:windowShowWallpaper">false</item>
</style>

<style name="Theme.Black" parent="@android:style/Theme">
    <item name="android:colorBackground">@android:color/black</item>
    <item name="android:windowBackground">@drawable/background_own</item>
    <item name="android:windowShowWallpaper">false</item>
</style>

<style name="Theme.Light" parent="@android:style/Theme">
    <item name="android:windowShowWallpaper">false</item>
</style>

<style name="Theme.Translucent" parent="@android:style/Theme">
    <item name="android:windowShowWallpaper">false</item>
</style>

<style name="Theme.NoDisplay" parent="@android:style/Theme">
    <item name="android:windowShowWallpaper">false</item>
</style>

<style name="Theme.Panel" parent="@android:style/Theme">
    <item name="android:windowShowWallpaper">false</item>
</style>
It's time to fix email, cos it looks weird with transparent bg:
themes.xml:
Code:
<style name="ThemeNoTitleBar.Email" parent="@android:style/Theme.NoTitleBar">
    <item name="android:colorBackground">@android:color/black</item>
    <item name="android:windowBackground">@android:color/black</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>
com_android_email.xml:
Code:
<resource-redirections>
    <item name="style/ThemeNoTitleBar">@style/ThemeNoTitleBar.Email</item>
</resource-redirections>
Finally we should fix youtube, cos nobody likes transparent bg during watching video clips in full screen mode
themes.xml:
Code:
<style name="Theme.Youtube" parent="@android:style/Theme">
    <item name="android:windowBackground">@android:color/black</item>
</style>
com_google_android_youtube.xml:
Code:
<resource-redirections>
    <item name="style/Theme">@style/Theme.Youtube</item>
</resource-redirections>
b) custom

Code:
<style name="Theme" parent="@android:style/Theme">
    <item name="android:colorBackground">@android:color/transparent</item>
    <item name="android:windowBackground">@drawable/background_own</item>
</style>
Nothing else needs to be fixed


2) description color - also known from miui (orange) and meizu (blue)
open colors.xml with a good text editor

Code:
<resources>
    <color name="dim_foreground_dark">#ff_your_color</color>
    <color name="dim_foreground_dark_disabled">#80_your_color</color>
    <color name="dim_foreground_light_inverse">#ff_your_color</color>
    <color name="dim_foreground_light_inverse_disabled">#80_your_color</color>
</resources>

3) big ics window title
open themes.xml with a good text editor

Code:
<style name="Theme" parent="@android:style/Theme">
    <item name="android:windowTitleSize">50.0dip</item>
</style>

<style name="TextAppearance.WindowTitle" parent="@android:style/TextAppearance">
    <item name="android:textSize">21.0sp</item>
    <item name="android:textStyle">normal</item>
    <item name="android:textColor">#ffffffff</item>
</style>

4) ics blue popup title
open themes.xml with a good text editor

Code:
<style name="Theme.Dialog" parent="@android:style/Theme">
    <item name="android:textColorPrimary">@color/primary_text_dark_holo</item>
</style>
primary_text_dark_holo.xml
Code:
<selector
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false" android:color="#80ffffff" />
    <item android:state_window_focused="false" android:color="#ff33b5e5" />
    <item android:state_pressed="true" android:color="#ff000000" />
    <item android:state_selected="true" android:color="#ff000000" />
    <item android:state_focused="true" android:color="#ff000000" />
    <item android:color="#ff33b5e5" />
</selector>

5) withe text for buttons only
open themes.xml with a good text editor

Code:
<style name="Widget.Button" parent="@android:style/Widget">
    <item name="android:textAppearance">?android:textAppearanceSmallInverse</item>
    <item name="android:textColor">@color/primary_text_light_holo</item>
    <item name="android:gravity">center</item>
    <item name="android:background">@android:drawable/btn_default</item>
    <item name="android:focusable">true</item>
    <item name="android:clickable">true</item>
</style>
primary_text_light_holo.xml
Code:
<selector
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false" android:color="@color/white_disabled" />
    <item android:state_window_focused="false" android:color="@color/white" />
    <item android:state_pressed="true" android:color="@color/white" />
    <item android:state_selected="true" android:color="@color/white" />
    <item android:color="@color/white" />
</selector>

6) selected text color
open themes.xml with a good text editor

Code:
<style name="TextAppearance" parent="@android:style/TextAppearance">
    <item name="android:textSize">16.0sp</item>
    <item name="android:textStyle">normal</item>
    <item name="android:textColor">?android:textColorPrimary</item>
    <item name="android:textColorHighlight">#ff33b5e5</item>
    <item name="android:textColorHint">?android:textColorHint</item>
    <item name="android:textColorLink">#ff33b5e5</item>
</style>

7) light text on dark popups - it's new I used it for my ICS theme

a) 1st window
open themes.xml with a good text editor

Code:
<style name="TextAppearance.Large.Inverse" parent="@android:style/TextAppearance.Large">
    <item name="android:textColor">#ffffffff</item>
    <item name="android:textColorHint">#ff000000</item>
</style>
b) 2nd window - thanks to donhu for finding xml


select_dialog_item.xml
Code:
<TextView android:textAppearance="?android:textAppearanceLarge" android:textColor="@color/primary_text_light_holo_only" android:ellipsize="marquee" android:gravity="center_vertical" android:id="@android:id/text1" android:paddingLeft="14.0dip" android:paddingRight="15.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="?android:listPreferredItemHeight"
  xmlns:android="http://schemas.android.com/apk/res/android" />
select_dialog_multichoice.xml
Code:
<CheckedTextView android:textAppearance="?android:textAppearanceLarge" android:textColor="@color/primary_text_light_holo_only" android:ellipsize="marquee" android:gravity="center_vertical" android:id="@android:id/text1" android:paddingLeft="12.0dip" android:paddingRight="7.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:checkMark="@drawable/btn_check" android:minHeight="?android:listPreferredItemHeight"
  xmlns:android="http://schemas.android.com/apk/res/android" />
select_dialog_singlechoice.xml
Code:
<CheckedTextView android:textAppearance="?android:textAppearanceLarge" android:textColor="@color/primary_text_light_holo_only" android:ellipsize="marquee" android:gravity="center_vertical" android:id="@android:id/text1" android:paddingLeft="12.0dip" android:paddingRight="7.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:checkMark="@drawable/btn_radio" android:minHeight="?android:listPreferredItemHeight"
  xmlns:android="http://schemas.android.com/apk/res/android" />
primary_text_light_holo_only.xml
Code:
<selector
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_enabled="false" android:color="#ffe6e6e6" />
    <item android:color="#ffffffff" />
</selector>
c) 3th window
open themes.xml with a good text editor

Code:
<style name="Widget.DropDownItem.Spinner" parent="@android:style/Widget.DropDownItem">
    <item name="android:textAppearance">@style/TextAppearance.Widget.DropDownItem.Holo</item>
    <item name="android:checkMark">@drawable/btn_radio</item>
</style>

<style name="TextAppearance.Widget.DropDownItem.Holo" parent="@android:style/TextAppearance.Widget">
    <item name="android:textColor">#ffffffff</item>
</style>

8) other app windows

a) widgetpicker - settings.apk


appwidgetpicker.xml
Code:
<RelativeLayout android:orientation="horizontal" android:paddingTop="2.0dip" android:paddingBottom="2.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <ImageView android:id="@id/appwidgetpicker_imageview" android:layout_width="48.0dip" android:layout_height="48.0dip" android:layout_marginLeft="10.0dip" android:layout_marginTop="2.0dip" android:layout_marginBottom="2.0dip" android:src="@drawable/icon" />
    <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginLeft="10.0dip" android:layout_marginTop="2.0dip" android:layout_marginBottom="2.0dip" android:layout_toRightOf="@id/appwidgetpicker_imageview" android:layout_centerVertical="true">
        <TextView android:textSize="20.0dip" android:textColor="?android:textAppearanceLargeInverse" android:id="@id/appwidgetpicker_textview" android:layout_width="fill_parent" android:layout_height="wrap_content" />
        <TextView android:textSize="13.0dip" android:textColor="?android:textAppearanceLargeInverse" android:id="@id/appwidgetpicker_count" android:layout_width="fill_parent" android:layout_height="wrap_content" />
    </LinearLayout>
</RelativeLayout>
b) smiley menu - mms.apk/talk.apk


smiley_menu_item.xml
Code:
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="?android:listPreferredItemHeight"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <ImageView android:layout_gravity="center_vertical" android:id="@id/smiley_icon" android:layout_width="20.0dip" android:layout_height="20.0dip" android:layout_marginLeft="18.0dip" />
    <TextView android:textAppearance="?android:textAppearanceLargeInverse" android:layout_gravity="center_vertical" android:id="@id/smiley_name" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="15.0dip" android:singleLine="true" android:layout_weight="1.0" />
    <TextView android:textAppearance="?android:textAppearanceLargeInverse" android:layout_gravity="center_vertical" android:id="@id/smiley_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="10.0dip" android:singleLine="true" />
</LinearLayout>
c) alarm background - deskclock.apk


clock_selector.xml
Code:
<selector
  xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_pressed="false" android:drawable="@android:color/transparent" />
    <item android:state_pressed="true" android:drawable="@drawable/list_selector_background_pressed" />
</selector>
alarm_time.xml
Code:
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content"
  xmlns:android="http://schemas.android.com/apk/res/android">
    <com.android.deskclock.DontPressWithParentLayout android:gravity="center" android:orientation="vertical" android:id="@id/indicator" android:background="@drawable/clock_selector" style="@style/alarm_list_left_column">
        <CheckBox android:layout_gravity="center" android:id="@id/clock_onoff" android:background="@drawable/indicator_clock_onoff" android:focusable="false" android:clickable="false" android:duplicateParentState="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:button="@null" />
        <ImageView android:layout_gravity="center" android:id="@id/bar_onoff" android:paddingTop="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_indicator_off" />
    </com.android.deskclock.DontPressWithParentLayout>
    <ImageView android:gravity="fill_vertical" android:background="@android:color/transparent" android:paddingTop="4.0dip" android:paddingBottom="4.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/divider_vertical_dark" android:scaleType="fitXY" />
    <com.android.deskclock.DigitalClock android:gravity="center_vertical" android:orientation="vertical" android:id="@id/digitalClock" android:paddingLeft="16.0dip" android:paddingRight="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_weight="1.0">
        <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="true">
            <TextView android:textSize="28.0sp" android:textColor="?android:textColorPrimary" android:id="@id/timeDisplay" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:includeFontPadding="false" />
            <TextView android:textAppearance="?android:textAppearanceSmall" android:textStyle="bold" android:textColor="?android:textColorPrimary" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" />
            <TextView android:textAppearance="?android:textAppearanceSmall" android:textStyle="bold" android:textColor="?android:textColorTertiary" android:gravity="right" android:id="@id/label" android:paddingLeft="8.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_weight="1.0" />
        </LinearLayout>
        <TextView android:textAppearance="?android:textAppearanceSmall" android:textColor="?android:textColorSecondary" android:id="@id/daysOfWeek" android:layout_width="fill_parent" android:layout_height="wrap_content" android:includeFontPadding="false" />
    </com.android.deskclock.DigitalClock>
</LinearLayout>

All I ask for is tying some credits using it
Last edited by ZduneX25; 20th December 2011 at 09:53 PM.
The Following 137 Users Say Thank You to ZduneX25 For This Useful Post: [ View ]
20th December 2011, 12:02 PM   |  #2  
DaXmax's Avatar
Recognized Themer
Flag Singapore
Thanks Meter: 10,034
 
10,693 posts
Join Date:Joined: Sep 2008
More
This is useful! Thanks, anyway, will some of this mod will work on ICS??

Sent from my Galaxy S i9000 with ICS Build 10 + 1.5ghz OC!!!
Last edited by DaXmax; 20th December 2011 at 02:08 PM.
20th December 2011, 12:29 PM   |  #3  
Vertumus's Avatar
Recognized Themer
Flag Belgrade
Thanks Meter: 12,817
 
4,774 posts
Join Date:Joined: Sep 2010
Donate to Me
More
What to say to u mate, u r just awesome. Thank u very much for everything you did for me + this

All the best,
Vert
The Following 2 Users Say Thank You to Vertumus For This Useful Post: [ View ]
20th December 2011, 01:01 PM   |  #4  
arzbhatia's Avatar
Recognized Themer
Thanks Meter: 1,825
 
1,311 posts
Join Date:Joined: Jun 2011
Donate to Me
More
Isn't this guy just amazing?

Great work Ma man.
The Following User Says Thank You to arzbhatia For This Useful Post: [ View ]
20th December 2011, 01:35 PM   |  #5  
Senior Member
Thanks Meter: 90
 
394 posts
Join Date:Joined: Nov 2010
You're AWESOME Zdune, THANKS!!!
The Following User Says Thank You to mds96 For This Useful Post: [ View ]
20th December 2011, 02:09 PM   |  #6  
DaXmax's Avatar
Recognized Themer
Flag Singapore
Thanks Meter: 10,034
 
10,693 posts
Join Date:Joined: Sep 2008
More
Quote:
Originally Posted by arzbhatia

Isn't this guy just amazing?

Great work Ma man.

His 100% a themer machine lol...

Sent from my Galaxy S i9000 with ICS Build 10 + 1.5ghz OC!!!
20th December 2011, 02:51 PM   |  #7  
nitinvaid's Avatar
Recognized Themer
Flag New Delhi
Thanks Meter: 4,358
 
4,775 posts
Join Date:Joined: Mar 2011
Donate to Me
More
it is only possible in CM7
how to change black setting background in stock android 2.3 roms
20th December 2011, 03:46 PM   |  #8  
Criketj's Avatar
Member
Thanks Meter: 61
 
33 posts
Join Date:Joined: Aug 2010
Very Useful ! Thanks guy
20th December 2011, 03:56 PM   |  #9  
nitinvaid's Avatar
Recognized Themer
Flag New Delhi
Thanks Meter: 4,358
 
4,775 posts
Join Date:Joined: Mar 2011
Donate to Me
More
and please post tutorial for how to change
poweroff menu text background
20th December 2011, 04:05 PM   |  #10  
DaRk_dOg's Avatar
Recognized Themer
Thanks Meter: 2,310
 
892 posts
Join Date:Joined: Oct 2010
More
Just awesome!

This should be a sticky thread


Regards, D_d

The Following User Says Thank You to DaRk_dOg For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes