FORUMS
Remove All Ads from XDA

[TUT][JB] HOW TO THEME SystemUI.apk for TOTALLY newbie!

720 posts
Thanks Meter: 1,529
 
By joehanh88, Recognized Themer on 23rd March 2013, 11:11 AM
Post Reply Email Thread
1st February 2018, 02:28 AM |#1821  
LoneRanger76's Avatar
Junior Member
Thanks Meter: 2
 
More
If you can share your files I'll try it on my setup and see what I can work out for you.

Sent from my Sony Xperia XA1 using XDA Labs[/QUOTE]

I will just send the SystemUI folder as zip file.
Attached Files
File Type: zip SystemUI.zip - [Click for QR Code] (15.65 MB, 14 views)
1st February 2018, 11:05 AM |#1822  
Quote:
Originally Posted by LoneRanger76


Shall I send my 2 framework-res.apk and SystemUI.apk or just the SystemUI folder?

I will need the APK files, yes. I'll try decompiling and recompiling so I can see what the problem is.

Sent from my Sony Xperia XA1 using XDA Labs
1st February 2018, 12:16 PM |#1823  
LoaderFabi's Avatar
Senior Member
Flag Munich
Thanks Meter: 83
 
Donate to Me
More
Someone may help with SysUI mod?
Recompiling always fails to recompile due to malformed .9.png, every time I tried.

Wating Clock on Center and Data/WiFi on left, Battery on right, but i have no idea how, and Try and Error doenst work either (cant recompile?)

Someone may tell me afterwards how and in case hot to move clock left?

SysUI attached, framework-res: https://mega.nz/#!oxgRlLDR!Q9mYgALkk...6hJwSkxYt470KA
1st February 2018, 01:49 PM |#1824  
LoneRanger76's Avatar
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by Ticklefish

Shall I send my 2 framework-res.apk and SystemUI.apk or just the SystemUI folder?

I will need the APK files, yes. I'll try decompiling and recompiling so I can see what the problem is.

Sent from my Sony Xperia XA1 using XDA Labs[/QUOTE]

I can't attach it here but you can download it here: https://mega.nz/#!UyRkjRzb!85UNKGHqV...arZ7oSRjBZnjLY
Inside the file are the apk's. Thank you so much for the help, Sir.
1st February 2018, 04:21 PM |#1825  
Spannaa's Avatar
Recognized Contributor / Themer
Flag Cardiff
Thanks Meter: 16,069
 
More
Quote:
Originally Posted by LoaderFabi

Someone may help with SysUI mod?
Recompiling always fails to recompile due to malformed .9.png, every time I tried.

Wating Clock on Center and Data/WiFi on left, Battery on right, but i have no idea how, and Try and Error doenst work either (cant recompile?)

Someone may tell me afterwards how and in case hot to move clock left?

SysUI attached, framework-res: https://mega.nz/#!oxgRlLDR!Q9mYgALkk...6hJwSkxYt470KA

Fix the malformed .9.png and you should be able to recompile the apk
The Following User Says Thank You to Spannaa For This Useful Post: [ View ] Gift Spannaa Ad-Free
3rd February 2018, 05:52 PM |#1826  
Quote:
Originally Posted by LoneRanger76

I can't attach it here but you can download it here: https://mega.nz/#!UyRkjRzb!85UNKGHqV...arZ7oSRjBZnjLY
Inside the file are the apk's. Thank you so much for the help, Sir.

Thanks for sharing your files. I think I know where the issue is coming from.
You're getting these errors here:
Code:
W: C:\Tools\SystemUI\res\layout\status_bar.xml:2: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/status_bar_background').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:6: error: Error: No resource found that matches the given name (at 'id' with value '@id/icons').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:7: error: Error: No resource found that matches the given name (at 'id' with value '@id/left_icons').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:8: error: Error: No resource found that matches the given name (at 'id' with value '@id/carrierLabel').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:9: error: Error: No resource found that matches the given name (at 'id' with value '@id/doNotDisturbIcon').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:9: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/tw_dnd').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:14: error: Error: No resource found that matches the given name (at 'textSize' with value '@dimen/status_bar_clock_text_size').
This is saying that you mention resources in "status_bar.xml" that aren't actually in the decompiled APK. I did wonder if these were missing because the relevant framework file wasn't installed but I think I know what's going on now.
It looks like you've copied and pasted some lines of XML into your code but you don't have the resources those lines mention in your particular APK.

The best thing I can suggest here is working out how to change your particular code. There's a guide to XML modding here: https://forum.xda-developers.com/gen...-easy-t2929816
There's a section there about centering the clock that's worth taking a look at.
Give it a try and, if you have any problems, just post on that thread and the OP will be more than happy to help you. He's an awesome person.

---------- Post added at 05:52 PM ---------- Previous post was at 05:35 PM ----------

Quote:
Originally Posted by LoaderFabi

Someone may help with SysUI mod?
Recompiling always fails to recompile due to malformed .9.png, every time I tried.

Wating Clock on Center and Data/WiFi on left, Battery on right, but i have no idea how, and Try and Error doenst work either (cant recompile?)

Someone may tell me afterwards how and in case hot to move clock left?

SysUI attached, framework-res: https://mega.nz/#!oxgRlLDR!Q9mYgALkk...6hJwSkxYt470KA

You can edit ninepatch files using Android Studio. Have a look here: https://developer.android.com/studio...raw9patch.html
There's an old guide to editing ninepatch's here: https://forum.xda-developers.com/sho...d.php?t=605662
It was written before Android Studio was developed but it should help give you an idea of what to do.
The Following User Says Thank You to Ticklefish For This Useful Post: [ View ] Gift Ticklefish Ad-Free
3rd February 2018, 10:53 PM |#1827  
LoneRanger76's Avatar
Junior Member
Thanks Meter: 2
 
More
Quote:

Thanks for sharing your files. I think I know where the issue is coming from.
You're getting these errors here:
Code:
W: C:\Tools\SystemUI\res\layout\status_bar.xml:2: error: Error: No resource found that matches the given name (at 'background' with value '@drawable/status_bar_background').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:6: error: Error: No resource found that matches the given name (at 'id' with value '@id/icons').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:7: error: Error: No resource found that matches the given name (at 'id' with value '@id/left_icons').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:8: error: Error: No resource found that matches the given name (at 'id' with value '@id/carrierLabel').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:9: error: Error: No resource found that matches the given name (at 'id' with value '@id/doNotDisturbIcon').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:9: error: Error: No resource found that matches the given name (at 'src' with value '@drawable/tw_dnd').
W: C:\Tools\SystemUI\res\layout\status_bar.xml:14: error: Error: No resource found that matches the given name (at 'textSize' with value '@dimen/status_bar_clock_text_size').
This is saying that you mention resources in "status_bar.xml" that aren't actually in the decompiled APK. I did wonder if these were missing because the relevant framework file wasn't installed but I think I know what's going on now.
It looks like you've copied and pasted some lines of XML into your code but you don't have the resources those lines mention in your particular APK.

The best thing I can suggest here is working out how to change your particular code. There's a guide to XML modding here: https://forum.xda-developers.com/gen...-easy-t2929816
There's a section there about centering the clock that's worth taking a look at.
Give it a try and, if you have any problems, just post on that thread and the OP will be more than happy to help you. He's an awesome person.

Thank you. Last friday, I also realize what I was doing was wrong haha. Thank you for the help. I'll try modding later.
The Following User Says Thank You to LoneRanger76 For This Useful Post: [ View ] Gift LoneRanger76 Ad-Free
23rd August 2018, 01:13 PM |#1828  
Member
Flag Bhopal
Thanks Meter: 6
 
More
I want to add volte icon to the status bar can anyone guide me how to do it. Even a hint would be appreciated.
23rd September 2019, 02:22 PM |#1829  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by joehanh88




res/layout

tw_quick_setting_button.xml

find :

Code:
<ImageView android:layout_gravity="center" android:id="@id/btn_image" android:layout_width="fill_parent" android:layout_height="60.0dip" android:layout_marginTop="4.0dip" />
1. change the android:layout_height="60.0dip" to android:layout_height="90.0dip".
2. change the android:layout_marginTop="4.0dip" to android:layout_marginTop="0.0dip"

then in the same xml.
find :
Code:
<TextView android:textSize="@dimen/quick_setting_button_text_size"
at the same line, you'll see android:textColor="blablabla", change it to android:textColor="#00000000".
and android:layout_height="blabla.bladip" to android:layout_height="0.0dip"

also at the same xml.
find :
Code:
<ImageView android:layout_gravity="center" android:id="@id/btn_status_image"
.
change all the padding to be like mine :

HTML Code:
<ImageView android:layout_gravity="center" android:id="@id/btn_status_image" android:paddingLeft="0.0dip" android:paddingTop="0.0dip" android:paddingRight="0.0dip" android:paddingBottom="0.0dip" android:layout_width="fill_parent" android:layout_height="0.0dip" android:scaleType="fitXY" android:drawable="@drawable/tw_quick_panel_off" />
all this steps will make the size of the toggle bigger, remove the toggles text, and remove the toggles status.

then go to :

res/values
dimens.xml

find :
Code:
<dimen name="quick_setting_button_
there will be 7 lines of it in that xml.
change the line to be just like mine :
HTML Code:
<dimen name="quick_setting_button_height">90.0dip</dimen>
    <dimen name="quick_setting_button_image_height">90.0dip</dimen>
    <dimen name="quick_setting_button_text_height">0.0dip</dimen>
    <dimen name="quick_setting_button_text_size">0.0dip</dimen>
    <dimen name="quick_setting_button_status_height">0.0dip</dimen>
    <dimen name="quick_setting_button_status_padding">2.0dip</dimen>
    <dimen name="quick_setting_button_margin_top">0.0dip</dimen>
next steps :
- make your own toggle images with resolution of 80x100 or 90x110 or mine is 90x150. ( just any resolution that fit your toggle when displayed).
- it doesn't matter because you already fix the dimension of the toggle display. The point of creating new big toggles is not to make the display stretched or narrowed.

final steps:

res/layout
tw_status_bar_expanded.xml

find :

Code:
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content"
- in that line you'll see android:divider="@bla/blablabla" change it to android:divider="#00000000".

(that will remove the divider between the toggles)

then in the same xml, find :
HTML Code:
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content"
edit the android:layout_height= to android:layout_height="90.0dip".

finish, recompile!

this is how it will look like :





1) ONLY EDIT the .9patch images before recompile the apk!

HOW TO EDIT IT??
- use the Better Draw9Patch to edit .9patch.
- there are many TUT for that..but i will put it in this TUT later.
- ONLY EDIT THE .9patch images in res/ (which folder it belong) before recompile!





2) EDIT NON-.9patch images after you recompile the "HOW TO EDIT IT" above.
- you can edit all of the NON-.9patch images FREELY in build/res/apk/ (which folder it belong).
- the folder you'll get after you recompile the apk.
- BUT DO NOT TOUCH ANY .9patch images in there!



want other cool toggles???
click this link!!













link updated : 12 MAY 2013

and here is the base for all my icons :
just put the icon inside that toggle base

Attachment 2056594

download link :

base_sample_toggle_1
base_sample_toggle_2

want other cool toggles???
click this link!!

just download it and try to mod yourself with my toggles
the toggles is able to use if you use all my dimension that i have modded in the tut. (TUT #11)
dont forget to hit thanks if you using this toggles for your mod. give me credits is good enough.





In this TUT#14, you can change any part with any image by using the .9patch. png.
its easy, you just need to change the color code in the xml for example android:background="#colorcode" to android:background="@drawable/your_image".
And then you need to create an .9.png image then put it into res/drawable-****.
the **** means what is your device dpi.
the size of the image is depend with the part that you want to change, it is your creativity.





P.S : ALWAYS REPLACE THE ORIGINAL META-INF FOLDER AND AndroidManifest.xml from the ORIGINAL APK into the MODDED APK AFTER BUILD! or else you got bootloop.


let me know if i forgot place your name as credit, im just normal human being and sorry for that.
hit thanks to them, their post really help me a lot
there will be more TUT after this..maybe how to theme framework-res.apk
there must be something more i left, but i will put it later when i remember what it is.

if you got something more to ask, dont be shy to PM me.. i'll be happy to help..
(only if im able to!)
IF YOU HAVE SOMETHING THAT YOU KNOW FOR HOW TO MODDING SYSTEMUI.APK, AND IT IS NOT INCLUDED IN THIS TUT, PLEASE SHARE IT HERE
SO THAT MAYBE THIS TUT WILL HELP MANY PEOPLE WITH MANY VERSION OF DEVICES, I WISH THIS THREAD WILL BECOME THE PERFECT PLACE FOR PEOPLE WHO WANT TO LEARN ABOUT HOW TO THEME SYSTEMUI.APK





---->Hello, I really liked this guide, but can you tell me how to change the grid of quick settings (Im using Nemesis Reborn for S5, S8 themed rom), I wanted to have a fully 5x3 grid, and the lines under the toggles a bit longer, because they are short. Thank you!
Post Reply Subscribe to Thread

Tags
joehanh88, theme, tut

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes