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] Transparant status bar background and pull-down menu

OP majdinj

2nd January 2013, 06:13 PM   |  #1  
majdinj's Avatar
OP Recognized Contributor / Themer
Flag AlAhsa
Thanks Meter: 3,019
 
980 posts
Join Date:Joined: Nov 2006
More
It is not only transparent, it could be any color as well that you can achieve by playing with hex color codes!!!

I am trying to help those who want to play with status bar background, text color and pull-down menu background (this will not include how to change status bar and pull-down menu icons)..
I will also try to show you how to get transparency up-to my knowledge
So here we go..

You will need:
1. Apktool or APK-Tool Manager for decompiling and recompiling
2. Backsmali/Smali program from here "use it to edit smali part in this tutorial"
3. Color hex code picker (like color picker, or photoshop).
4. ARGB hex converter to set transparency of alpha value.
5. Notepad++ for xml and smali editing.

Quote:

First you need to decompile SystemUI.apk, and framwork-res.apk

Initially, you need to choose the color you want.. This is how RGB color hex code picker in photoshop..



Then change transparency with ARGB hex converter..



Where 00 = 100% transparency (i.e, completely transparent), 3F = 75% transparency, 7F = 50% transparency, BF = 25% transparency, FF = 0% transparency (i.e, completely opaque)

Now lets the chaos begins!!


1) For status bar:


- Go to SystemUI.apk\res\values and open drawables.xml and focus on this line:
Code:
    <item type="drawable" name="status_bar_background">#ff1e1e1e</item>
change ff value to (00 -> 100% transparency, 3f -> 75% transparency, 7f -> 50% transparency, bf -> 25% transparency)
The other value (1e1e1e) is RBG for grey color, if you want it black it will be (000000).
So:
#00000000 - black with 100% transparency
#3F000000 - black with 75% transparency
#7F000000 - black with 50% transparency
#BF000000 - black with 25% transparency


2) For pull-down menu:
This one has 6 parts..
First part: top bar of pull-menu



- Go to SystemUI.apk\res\layout and open tw_status_bar_expanded_header.xml, look for this line:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="39.0dip" android:baselineAligned="false"
so change ff value to which value that represent the transparency you like as mentioned in section above (00 -> 100% transparency, 3f -> 75% transparency, 7f -> 50% transparency, bf -> 25% transparency)
- Also for Settings background in top bar of pull-menu, edit this line in tw_status_bar_expanded_header.xml (the red line):
Code:
    <RelativeLayout android:id="@id/settings_button" android:background="@drawable/tw_quick_panel_setting_button_bg" android:focusable="true" android:visibility="visible" android:layout_width="@dimen/status_bar_expanded_setting_width" android:layout_height="39.0dip">
Here you can put any ARGB color code that you like starting with hashtag sign "#" instead of red color line above. (credits to nokiamodeln91)

Second part: toggle slider



Well I didn't change it before. But I believe It is png file in drawable-xhdpi folder named [tw_quick_panel_quick_setting_button_bg_normal.9.pn g] and [tw_quick_panel_quick_setting_button_bg_pressed.9.p ng], just change it with any transparent image with same name.

Third part: brightness panel background



- Go to SystemUI.apk\res\layout folder and open tw_status_bar_expanded.xml and focus on this line:
Code:
                <LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
This is black with 0 transparency.. so change to which color and transparency you want.

The fourth part: Notification panel background:
This one has different parts:
Part A: Ongoing header:



- Go to SystemUI.apk\res\layout and open tw_status_bar_expanded.xml. Here focus on the following line:
Code:
                <LinearLayout android:orientation="vertical" android:id="@id/onGoingCart" android:background="#ff293945" android:focusable="true" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
This is dark grey with 0 transparency.. Change to whatever you want

Part B: Notifications header:



- Go to SystemUI.apk\res\layout and open tw_status_bar_expanded.xml. Here focus on the following line:
Code:
                <LinearLayout android:orientation="vertical" android:id="@id/notificationCart" android:background="#ff293945" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="@dimen/status_bar_expanded_notification_category_height">
This is dark grey with 0 transparency.. so change to which color and transparency you want.

Part C: Clear button:
Just go to SystemUI.apk\res\drawable-xhdpi folder and change these images [tw_quick_panel_clearbtn_focus.9.png], [tw_quick_panel_clearbtn_normal.9.png], [tw_quick_panel_clearbtn_press.9.png] and [tw_quick_panel_clearbtn_select.9.png]; don't forget that these are 9.png files, so need special way (you can search the forum for that)

Part D: Notifications panel itself:



- Go to SystemUI.apk\res\layout and open tw_status_bar_expanded.xml. Here focus on the following lines:
Code:
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
This is for notification panel and it is not hex color code; it is notification_panel_bg.9.png file so go to drawable-xhdpi folder and replace it with another 9.png file which is transparent (see forum to know how to create 9.png file, there are a lot of tutorials!!)

Fifth part: the notifications themselves.



- Go to SystemUI/smali/com/android/systemui/statusbar/phone/ folder and open PhoneStatusBar.smali and search for "-0x100". There will be two lines; change them from:
Code:
    const/high16 v15, -0x100
to:
Code:
const/high16 v15, 0x0
Don't forget to change the second line as well.
Then decompile framework-res.apk and go to framework-res/res/values/ folder and open drawables.xml and look for this line:
Code:
<item type="drawable" name="notification_item_background_color">#ff000000</item>
change ff value to any transparency value you want.
then recompile framework-res.apk with compression level set to 0 (to not get boot-loop!!!)

Sixth part: the footer:



This is the simplest part, just go to SystemUI.apk\res\drawable-xhdpi folder and change these images [tw_status_bar_close_off.png] and [tw_status_bar_close_on.png] with any transparant image you create (just save with the same name).


3) For texts in status bar and pull-down menu:
Just search for any text color hex codes in the following files and change them to whatever you want:
SystemUI/res/values/drawables.xml
Code:
    <item type="drawable" name="notification_number_text_color">#ffffffff</item>
SystemUI/res/layout/tw_quick_setting_button.xml
Code:
        <TextView android:textSize="@dimen/quick_setting_button_text_size" android:textColor="#ffafc5dc" android:gravity="center" android:id="@id/btn_text" android:layout_width="fill_parent" android:layout_height="@dimen/quick_setting_button_text_height" android:includeFontPadding="false" />
SystemUI/res/layout/tw_status_bar_expanded_header.xml
Code:
    <com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:textColor="#ffffffff" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="4.0dip" android:layout_marginTop="-3.0dip" android:singleLine="true" systemui:ampmSmall="true" />
    <com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="#ffcbcbcb" android:ellipsize="none" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="4.0dip" android:maxLines="2" />
SystemUI/res/layout/tw_status_bar.xml
Code:
                <TextView android:textSize="12.0dip" android:textColor="#ffa6a6a6" android:layout_gravity="center" android:id="@id/battery_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_network_name_separator" />

            <com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ff959595" android:ellipsize="none" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />

and that is it all what I know
enjoy

Extra steps:
- Remove lines in notification pull-down to be transparent, see post #103 (credits to bombaybadboy)
- Hide Statusbar or Transparent Statusbar on Lockscreen (a great tutorial by @xperiacle from here)
- Add shadow effect to status bar texts and icons, see post #205
Last edited by majdinj; 2nd October 2013 at 05:51 AM. Reason: Add shadow effect to status bar texts and icons in post #205
The Following 137 Users Say Thank You to majdinj For This Useful Post: [ View ]
2nd January 2013, 06:27 PM   |  #2  
nokiamodeln91's Avatar
Senior Member
Thanks Meter: 2,705
 
7,158 posts
Join Date:Joined: Jun 2012
More
Oh man great work. Just to write these tutorials you deserve a hi five.

Sent from my GT-N7000 using xda premium
3rd January 2013, 01:25 AM   |  #3  
coelho_'s Avatar
Senior Member
Thanks Meter: 163
 
704 posts
Join Date:Joined: Oct 2011
Is my teacher, thanks

Send from my toilets with Tapatalk
7th January 2013, 01:36 PM   |  #4  
sakunakia's Avatar
Senior Member
Flag kandy
Thanks Meter: 54
 
129 posts
Join Date:Joined: Nov 2012
More
Angry ohh
hay i decompiled.... but in my res folder >values when i enter values and search for layout xml there is no such xml file plz help me in this....
7th January 2013, 05:12 PM   |  #5  
nokiamodeln91's Avatar
Senior Member
Thanks Meter: 2,705
 
7,158 posts
Join Date:Joined: Jun 2012
More
both are folders
\res\layout & \res\values
11th January 2013, 11:31 PM   |  #6  
sepehrthegreat-iran's Avatar
Senior Member
Flag urmia
Thanks Meter: 26
 
143 posts
Join Date:Joined: Jan 2013
More
Any simple way???!!!directly on android

Sent from my GT-N7000 using xda premium
11th January 2013, 11:33 PM   |  #7  
nokiamodeln91's Avatar
Senior Member
Thanks Meter: 2,705
 
7,158 posts
Join Date:Joined: Jun 2012
More
No. Other than using roms that incorporates these settings.
12th January 2013, 08:16 AM   |  #8  
Member
Flag Hong Kong
Thanks Meter: 3
 
34 posts
Join Date:Joined: Jun 2012
thanks for the tutorial, I got some questions

by apk manager
after compiling, should I sign it or not?

step in 7 zip
i wanted to replace the amended xml to the original xml, but \res\values\drawables is missing
14th January 2013, 10:11 AM   |  #9  
Warnahly's Avatar
Senior Member
Flag amman
Thanks Meter: 823
 
1,353 posts
Join Date:Joined: Jun 2012
More
how can i decompile systemUI and framwork
14th January 2013, 06:24 PM   |  #10  
nokiamodeln91's Avatar
Senior Member
Thanks Meter: 2,705
 
7,158 posts
Join Date:Joined: Jun 2012
More
Quote:
Originally Posted by devilctk

thanks for the tutorial, I got some questions

by apk manager
after compiling, should I sign it or not?

step in 7 zip
i wanted to replace the amended xml to the original xml, but \res\values\drawables is missing

no need to sign sys apps.
to get the values folder, you will first need to decompile the apk as its hidden in resources.asrc Use APK manager

The Following User Says Thank You to nokiamodeln91 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