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] [Mod] How to make any gingerbread or cm7/cm9 status bar transparent

OP marcussmith2626

24th March 2013, 07:58 AM   |  #1  
marcussmith2626's Avatar
OP Recognized Contributor
Flag London
Thanks Meter: 2,547
 
4,741 posts
Join Date:Joined: Jul 2012
How to make any gingerbread or cm7/cm9 status bar transparent



Check my signature for all my statusbars including pre-made stock cm7/cm9 and Aosp statusbars and guides



There's three ways to make the statusbar bar Transparent and I'll post them all

One way works with any gingerbread rom (deodex & rooted) and one with cyanogen 7
I have not tried it on ics or jelly bean but you can try (for people who stumble across this thread who are not galaxy y users)

Please dont ask for support unless you are using a custom rom on galaxy y
Any other phones please goto your own phone forum for support

You also need a launcher that is capable of transparency
Adw works but you need to disable wallpaper hack in settings
holo launcher works
any other launcher if it doesn't work look in it's settings & try & disable wallpaper hack or manage internally


Method one for non cm (Stock Deodex Rom)
You need apk tool installed - if you don't know how to use it see my guide here
http://forum.xda-developers.com/show....php?t=2206938

Once you have decompiled SystemUI.apk using apk tool goto res/layout Open status_bar.xml in notepad

Find the following line
Code:
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="#ff000000" android:focusable="true" android:descendantFocusability="afterDescendants"


Notice the part highlighted in red android:background is normally a hexadecimal value or it could be a drawable value

either way change the red part to the following

Code:
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="@drawable/nameofpng" android:focusable="true" android:descendantFocusability="afterDescendants"
Notice that android:background is now a drawable value



Change nameofpng to the name of your transparent background image (just the name - do not include the file extension .png)

place this image with the same name as the drawable value in res/drawable-ldpi
(of course other devices might be in mdpi or hdpi)

Recompile and sign apk
Put in a flashable zip and flash with system mounted

You can download and use the pngs in the attachment (for ldpi like galaxy y) or create your own
To create a transparent status bar image just take a non Transparent one and edit it in a photo application to make it Transparent (make sure image dimensions stay the same and is for your phone resolution)



Method two for cm7
Note you will need apk tool installed and notepad++ installed
Download the patcher tool by Z25 in attachment
Unzip the contents to a folder
Place your SystemUI.apk and framework-res.apk in files_to_patch
Run patcher.bat
Select status bar tweaks and enable only transparent status bar
Edit the smali file as described in the text file that pops up
Select option build and sign
Select option to create zip files

You now have a zip file called patch.zip

unzip this and take out the SystemUI.apk - we will save this for later

Now we have to either make our own transparent theme or you can download a theme from the playstore for theme chooser that already contains status bar transparency

If you are downloading a theme from the playstore skip the part "To create your own theme" and go straight to the part "final steps"


To create your own theme
Goto uot kitchen http://uot.dakra.lt/kitchen
Take cyanbread.apk from the app folder of your cm7 rom & place on pc (or any other Theme Chooser Theme you wish to make transparent)
Rename it to what you want to call theme
Upload it to kitchen (under cm7 theme in file upload)
In status bar tweaks set background transparency to around 70% Transparent and any other settings you need like carrier or footer - don't forget to generate preview once done
Make sure you have selected ldpi in statusbar tweak settings and ldpi/mdpi for theme chooser preview in file upload (other devices may vary) and in file upload change update binary to galaxy
Then goto summary section
If everything is green create the theme
If not make sure you have clicked generate preview on status bar tweaks
Kitchen will then create theme for you

Download the zip file from kitchen and unzip it
Take out your theme apk


Final Steps
Sign both your theme apk and SystemUI.apk that you saved from earlier with a platform key using zipsigner (playstore)
Put both apks in a flashable zip and flash in cwm with system mounted
(note if you are using a theme from the playstore just do this for SystemUI.apk)

Once the phone has booted goto
ADWLauncher
System Preference
Disable Wallpaper Hack (untick the box)

Your status bar is now transparent



Method three for cm9
Once you have decompiled SystemUI.apk with apktool

Goto smali/com/android/systemui/statusbar/StatusBar.smali

Find the following line
Code:
invoke-direct/range {v11 .. v16}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
Above this line change
Code:
const/16 v16, 0x4
To the following
Code:
const/16 v16, -0x3

Now in notepad++ open the following
res/values/drawables.xml

Find the following line
Code:
<item type="drawable" name="status_bar_background">#ff000000</item>
Change the hex value to the hex value of the colour/transparency you want

For example

Completely transparent:
Code:
<item type="drawable" name="status_bar_background">#00FFFFFF</item>
70% transparent
Code:
<item type="drawable" name="status_bar_background">#b3000000</item>
50% transparent:
Code:
<item type="drawable" name="status_bar_background">#7f000000</item>

Recompile
Sign with a platform key using zipsigner (playstore)
Put in a flashable zip and flash in cwm with system mounted
Attached Files
File Type: zip statusbar backgrounds.zip - [Click for QR Code] (10.0 KB, 2440 views)
File Type: zip patcher4windows_by_Z25.zip - [Click for QR Code] (4.95 MB, 978 views)
Last edited by marcussmith2626; 26th April 2014 at 09:07 AM.
The Following 18 Users Say Thank You to marcussmith2626 For This Useful Post: [ View ]
24th March 2013, 12:40 PM   |  #2  
Member
Thanks Meter: 10
 
65 posts
Join Date:Joined: Oct 2012
What is the name for the png to put in drawable-ldpi?
24th March 2013, 01:09 PM   |  #3  
san122's Avatar
Senior Member
Flag Unavailable.
Thanks Meter: 1,564
 
1,231 posts
Join Date:Joined: Jan 2013
More
Re: [Guide] [Mod] How to make any gingerbread or cm7 status bar transparent
Quote:
Originally Posted by remo1995

What is the name for the png to put in drawable-ldpi?

You can rename it to ur own like
Jst open statusbar.xml in layout folder and on 2nd line u will find an attribute android;background change the file u want to add next to drawable/xx folder and put that file in ur drawable ldpi folder

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,
Reporting from incomplete blue theme
Status-paused
framework-working
The Following User Says Thank You to san122 For This Useful Post: [ View ]
24th March 2013, 01:48 PM   |  #4  
marcussmith2626's Avatar
OP Recognized Contributor
Flag London
Thanks Meter: 2,547
 
4,741 posts
Join Date:Joined: Jul 2012
Quote:
Originally Posted by remo1995

What is the name for the png to put in drawable-ldpi?

Name it the name of the @drawable value
In my example it's nameofpng
The Following User Says Thank You to marcussmith2626 For This Useful Post: [ View ]
24th March 2013, 03:22 PM   |  #5  
sohan rawat's Avatar
Senior Member
Thanks Meter: 749
 
724 posts
Join Date:Joined: Dec 2012
Donate to Me
More
Re: [Guide] [Mod] How to make any gingerbread or cm7 status bar transparent
Great guide :thumbup:

Sent from my GT-S5360 using xda app-developers app
24th March 2013, 07:59 PM   |  #6  
Member
Thanks Meter: 10
 
65 posts
Join Date:Joined: Oct 2012
Thank you, but when I go to recompile the file gives me error
24th March 2013, 08:02 PM   |  #7  
marcussmith2626's Avatar
OP Recognized Contributor
Flag London
Thanks Meter: 2,547
 
4,741 posts
Join Date:Joined: Jul 2012
Quote:
Originally Posted by remo1995

Thank you, but when I go to recompile the file gives me error

what rom are you using?

decompile then recompile the apk without making any changes - if it compiles correctly you know you have edited the xml file wrong or not placed the corresponding png in the drawable folder
if it still gives errors without you making changes then either you are using apk tool wrong or the apk has other errors from the orig source
Last edited by marcussmith2626; 24th March 2013 at 08:12 PM.
The Following User Says Thank You to marcussmith2626 For This Useful Post: [ View ]
25th March 2013, 10:40 PM   |  #8  
Member
Thanks Meter: 10
 
65 posts
Join Date:Joined: Oct 2012
Quote:
Originally Posted by marcussmith2626

what rom are you using?

decompile then recompile the apk without making any changes - if it compiles correctly you know you have edited the xml file wrong or not placed the corresponding png in the drawable folder
if it still gives errors without you making changes then either you are using apk tool wrong or the apk has other errors from the orig source

I use the cod rom and I'm trying to change the systemUI of marinalin85, the bar s3 style android 4.2.2
25th March 2013, 10:48 PM   |  #9  
marcussmith2626's Avatar
OP Recognized Contributor
Flag London
Thanks Meter: 2,547
 
4,741 posts
Join Date:Joined: Jul 2012
Quote:
Originally Posted by remo1995

I use the cod rom and I'm trying to change the systemUI of marinalin85, the bar s3 style android 4.2.2

No reason why it shouldn't work - make sure you have loaded SystemUI.apk and framework-res.apk into apktool using the apktool if command
Make sure all your apk tool commands are correct I'll post a guide on it soon
25th March 2013, 11:11 PM   |  #10  
Member
Thanks Meter: 10
 
65 posts
Join Date:Joined: Oct 2012
Quote:
Originally Posted by marcussmith2626

No reason why it shouldn't work - make sure you have loaded SystemUI.apk and framework-res.apk into apktool using the apktool if command
Make sure all your apk tool commands are correct I'll post a guide on it soon

to compile and decompile it does! the file does not work gives me forced closure! I made you those passages

Post Reply Subscribe to Thread

Tags
cm7, cm9, gingerbread, statusbar, transparent status bar
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes