[MOD][ICS][LWW][DIY] Transparent Status Bar Explained

GSUKeitarou

Member
Sep 9, 2012
22
32
0
Santiago
Well, hello, i hope this wasn't posted before, but i certainly didn't found it here, so i had to test it many times to make sure it worked.
May work on all MDPI devices, but since i only own the wt19i, i can't tell for sure.

Now to the main subject:

Needed Tools:
  • Rooted Phone
  • CWM
  • APK Tool
  • SystemUI.apk
  • framework-res.apk
  • SemcGenericUxpRes.apk
  • ZIP-Capable archiver
  • Notepad++ or any good text editor
  • Brain (is a MUST)
Also you may want to download a couple of CWM-flashable files:
1.- Stock (clean/unmodded) SystemUI.apk, (this in case something goes wrong)
2.- Example SystemUI.apk


Basic Step by Step Setup:
1.- After you've download APKTool, unzip it wherever you like
2.- Copy and paste all 3 apk files on APKTool's folder (see attachments for files)
3.- Shift + Right Click on any empty part of APKTool's folder
4.- Click on "Open Command Window Here"
Once the comand prompt is open, type the following (press enter after typing each line):
Code:
apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk
apktool d -f SystemUI.apk
Don't close the command prompt window yet
This will get us the resources and decompile the stock SystemUI,apk, we'll also get a new folder named SystemUI


Step by Step Editing:
1.- Inside SystemUI folder, go to into these subfolders: smali/com/android/systemui/statusbar
2.- Open StatusBar.smali with your text editor (Right click -> choose your editor)
3.- Go to line 388 (or search for the stated code), it must be
Code:
const/16 v16, 0x4
4.- Replace it with
Code:
const/16 v16, -0x3
This makes transparency possible :)
5.- Save and close the file
6.- Now go back to the SystemUI folder and go into these subfolders: res/values
7.- Open drawables.xml with your text editor
8.- Edit the parameters as you like, here goes the explanation:

(if the image doesn't appear above this line, sorry. Check attachment for explanation)

NOTE: If you're using the SystemUI.apk that comes with QuickPannel and want to make it transparent, you need to do This
Thanks to Jobayer for sharing this info

As for the color codes, they're in hexadecimal format, they go from 00 (0) to FF (255) and they come in pairs:
example: #00112233
00 defines transparency, 00 is totally transparent, FF is totally opaque
11 defines the ammount of red, 00 has no red, FF is this
22 defines the ammount of green, 00 has no green, FF is this
33 defines the ammount of blue, 00 has no blue, FF is this
FF000000 means it's totally black opaque
80000000 it's 50% opacity black
80FFFFFF it's 50% opcity white
80FF0000 it's 50% opacity red
9.- Save and close your file


Now compile back the SystemUI.apk:
This is kinda complex, but if you're here already, should be a walk in the park
1.- First, we need to use the command prompt from before (you didn't close it, did you?)
2.- Now we'll make the build files by using this line on the command prompt:
Code:
apktool b -f SystemUI.apk
(thanks nik2808 for pointing a mistake i made with the code)
3.- Now we go back to the APK Tool folder and rename the SystemUI.apk to SystemUI.zip
4.- Open SystemUI.zip
5.- From the ZIP, copy the META-INF folder and the AndroidManifest.xml file to SystemUI/build/apk subfolder
6.- Repeat step 2, this will get us a signed SystemUI.apk file
You can close the command prompt window now, the signed file will be on SystemUI/dist subfolder


Once you got your customized SystemUI.apk, you can install it by:
1.- using any file explorer, replace the one on your system folder with the new one, change the permission to Read (all) Write (owner only) Execute (none) and reboot your phone
2.- open the demo flashable zip and replace SystemUI.apk with the new one, then flash it with CWM, no need to wipe anything

Man, writting all this was quite long...


BONUS: To get any color you like easily
1.- open Paint (yeah, the windows thingy)
2.- go to Edit Colors
3.- chose any color you like
4.- you'll see "Red Green Blue" values on the lower left, these are the DECIMAL codes for your color
5.- open the Calculator and switch it to Programmer (alt + 3)
6.- make sure DEC is selected on the right pannel
7.- type the DECIMAL value for RED color
8.- press HEXA on the right pannel, this will get you the HEXADECIMAL code for RED in your color
9.- Repeat 6 to 8 for GREEN and BLUE and you'll have your code.
Example: Yellow will be FFFF00
Now you need to decide the opacity from 00 (transparent) to FF (opaque) and use that code on the beginning.
Example: 50% transparent Yellow will be 80FFFF00
Now use that code on the desired spot and voilà :)

Full Transparent code is 00
25% opaque is 40
50% opaque is 80
75% opaque is C0
100% opaque is FF


I hope you guys find this post useful, thanks for reading, and sorry, it's long and my english sucks nowadays...

If you test this on a different phone model and it works, let me know so i can add it to the list of "working in..." list
 

Attachments

Last edited:

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,011
18,603
263
São Paulo - SP
Great job... :good:

The only "problem" I see with transparent expanded contents is when draging to close expanded bar, the carrier label overlaps notifications and/or header.
 
  • Like
Reactions: sina.1993h

GSUKeitarou

Member
Sep 9, 2012
22
32
0
Santiago
you guys mean when you're closing the expanded notifications, and the carrier name is shown "over" the info / status bar?

It's a side effect of notification_item_background_color being transparent. Even tho the carrier is in a layer "behind" the items, as they're transparent, the carrier is seen (so it's actually an "underlap"?). In terms of layers, the general background is under everything, then it comes items (and separators), then status bar at the top of the "stack"

I don't know how to fix it (or if it can be fixed), i think i should install any other transparent-looking SystemUI and check if the same happens

And yep Serajr, it may be a problem if you have many items displayed, the carrier will still be visible

I'll see if i can find a way to fix or improve it.

Thanks for the feedback :)
 

GSUKeitarou

Member
Sep 9, 2012
22
32
0
Santiago
@Serajr & Kokzhanjia: Tried another transparency mod and the problem is still present, check attachment to see it
An option would be to delete the operator from showing, maybe?
I think there may be a way to make it disappear while scrolling... i wonder if i may get it right...

@Orochixxx: i kinda didn't get your request.
you want me to mod Sony's SystemUI to look like HTC?
or you want me to edit HTC to be transparent?
If it's the 1st, as far as i know, you can only set a global transparency, it doesn't have separate settings for statusbar for home and status screeen, it's the same setting for both cases, so it can't be done (or at least not yet).
The Quicksettings are present in other mods, but horizontally instead of vertically. As of now, i don't know if they can be rearranged to match that look, sorry.
For a look on how it may look, i suggest you to check Jobayer's Mod, it has transparency and quicksettings, and he has the GPS bug fixed
if it's the 2nd, as far as it has the same structure files, i may try it, but i won't be able to test it myself (nor i know if CWM works on HTC phones)
 

Attachments

  • Like
Reactions: vinayakmt

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,011
18,603
263
São Paulo - SP
@Serajr & Kokzhanjia: Tried another transparency mod and the problem is still present, check attachment to see it
An option would be to delete the operator from showing, maybe?
I think there may be a way to make it disappear while scrolling... i wonder if i may get it right...

@Orochixxx: i kinda didn't get your request.
you want me to mod Sony's SystemUI to look like HTC?
or you want me to edit HTC to be transparent?
If it's the 1st, as far as i know, you can only set a global transparency, it doesn't have separate settings for statusbar for home and status screeen, it's the same setting for both cases, so it can't be done (or at least not yet).
The Quicksettings are present in other mods, but horizontally instead of vertically. As of now, i don't know if they can be rearranged to match that look, sorry.
For a look on how it may look, i suggest you to check Jobayer's Mod, it has transparency and quicksettings, and he has the GPS bug fixed
if it's the 2nd, as far as it has the same structure files, i may try it, but i won't be able to test it myself (nor i know if CWM works on HTC phones)
Well.. In my SystemUI v4 mod (Xperia T Tabbed 'n' Grid Toggles) when Quick Panel Tab is selected, the carrier label is hidden.
I think I can do the same when startusbar is about to be collapsed (closed). I need to try it, then I report you here, ok?
 

GSUKeitarou

Member
Sep 9, 2012
22
32
0
Santiago
Edit stat_power_bg.png and stat_power_bg_touch.png in Photoshop and make it transparent as much as you want;)

Sent from my ST15i using xda premium
Thanks for pointing that out, since mine it's stock SystemUI, i had no idea how to do it :)

Well.. In my SystemUI v4 mod (Xperia T Tabbed 'n' Grid Toggles) when Quick Panel Tab is selected, the carrier label is hidden.
I think I can do the same when startusbar is about to be collapsed (closed). I need to try it, then I report you here, ok?
Wow, that'd help a lot, thanks :D
 

cros1sbaeba17

New member
Jul 30, 2012
3
0
0
I have a question, i did everything like the post says for the transparency, and the transparency is not working, could some somebody help me with a solution? i did everything with apk multi tool, i will apreciate an answer. Thanks.