Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,740,298 Members 42,671 Now Online
XDA Developers Android and Mobile Development Forum

[Guide] Transparant status bar background and pull-down menu

Tip us?
 
majdinj
Old
(Last edited by majdinj; 2nd October 2013 at 04:51 AM.) Reason: Add shadow effect to status bar texts and icons in post #205
#1  
majdinj's Avatar
Recognized Contributor / Themer - OP
Thanks Meter 2921
Posts: 980
Join Date: Nov 2006
Location: AlAhsa
Default [Guide] Transparant status bar background and pull-down menu

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:
Select 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:
Select 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:
Select 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:
Select 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:
Select 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:
Select 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:
Select 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:
Select Code
    const/high16 v15, -0x100
to:
Code:
Select 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:
Select 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:
Select Code
    <item type="drawable" name="notification_number_text_color">#ffffffff</item>
SystemUI/res/layout/tw_quick_setting_button.xml
Code:
Select 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:
Select 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:
Select 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
The Following 131 Users Say Thank You to majdinj For This Useful Post: [ Click to Expand ]
 
nokiamodeln91
Old
#2  
nokiamodeln91's Avatar
Senior Member
Thanks Meter 2632
Posts: 7,025
Join Date: Jun 2012
Oh man great work. Just to write these tutorials you deserve a hi five.

Sent from my GT-N7000 using xda premium
 
coelho_
Old
#3  
coelho_'s Avatar
Senior Member
Thanks Meter 162
Posts: 681
Join Date: Oct 2011
Is my teacher, thanks

Send from my toilets with Tapatalk
 
sakunakia
Old
#4  
sakunakia's Avatar
Senior Member
Thanks Meter 54
Posts: 128
Join Date: Nov 2012
Location: kandy
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....
 
nokiamodeln91
Old
#5  
nokiamodeln91's Avatar
Senior Member
Thanks Meter 2632
Posts: 7,025
Join Date: Jun 2012
both are folders
\res\layout & \res\values
 
sepehrthegreat-iran
Old
#6  
sepehrthegreat-iran's Avatar
Senior Member
Thanks Meter 26
Posts: 141
Join Date: Jan 2013
Location: urmia
Any simple way???!!!directly on android

Sent from my GT-N7000 using xda premium
 
nokiamodeln91
Old
#7  
nokiamodeln91's Avatar
Senior Member
Thanks Meter 2632
Posts: 7,025
Join Date: Jun 2012
No. Other than using roms that incorporates these settings.
 
devilctk
Old
#8  
Member
Thanks Meter 3
Posts: 34
Join Date: Jun 2012
Location: Hong Kong
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
Huawei Honor X1
 
Warnahly
Old
#9  
Warnahly's Avatar
Senior Member
Thanks Meter 787
Posts: 1,302
Join Date: Jun 2012
Location: amman
how can i decompile systemUI and framwork
Hit The Thanks Button

Google Nexus 4
Galaxy Note 2 N7100






EveryBody started as a Noob on XDA so help'em (Unless totall nooBs :P
 
nokiamodeln91
Old
#10  
nokiamodeln91's Avatar
Senior Member
Thanks Meter 2632
Posts: 7,025
Join Date: Jun 2012
Quote:
Originally Posted by devilctk View Post
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: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes