[Q] [HOW TO]Add EDT-based statusbar tweaks - Samsung Galaxy Gio GT-S5660

Hello...Want to share my experience of moding stock rom...
This manual helps You to add EDT-based tweaks to our phone.
Apologize for my bad English
!!!This was tested only on 2.3.6 stock Rom!!!
All changes you do at your own risk. I'm not responsible for any damage to your device
All credit goes to: Romanbb
Original thread
Key features:
- removing standard battery icon from the panel, replacing (or adding to the standard) the standard icon percentage indicator in increments of 1%, change percentage indicator color
- removing clock from the panel, change clock colour.
And more....
Bugs:
- not working changing of signal indicator
- any modifications to the icons will take some time to update
As I said, it's only my experience, and maybe it's little wrong. Please, try and tell me, how it works
And one more thing...I hope people, who read this manual know how to decompile/recompile system apk's :fingers-crossed:
Ok..let's start
You need to decompile your SystemUI.apk
Than take the BatteryText*.smali and Clock*.smali files from archive(see "attachments") and put them
into your SystemUI/smali/com/android/systemui/statusbar/ directory.
Then open SystemUI/smali/com/android/systemui/statusbar/policy/StatusBarPolicy.smali
and search this strings:
const-string v7, "battery"
invoke-virtual {v6, v7, v2, v3}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V
Click to expand...
Click to collapse
Add below this:
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "show_battery_icon"
invoke-static {v2, v3, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-nez v2, :cond_0
const v2, 0x0
invoke-virtual {v6, v7, v2}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
return-void
Click to expand...
Click to collapse
So, your code should look like this (or something like that) :
const-string v7, "battery"
invoke-virtual {v6, v7, v2, v3}, Landroid/app/StatusBarManager;->setIcon(Ljava/lang/String;II)V
iget-object v2, p0, Lcom/android/systemui/statusbar/policy/StatusBarPolicy;->mContext:Landroid/content/Context;
invoke-virtual {v2}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v2
const-string v3, "show_battery_icon"
invoke-static {v2, v3, v10}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
if-nez v2, :cond_0
const v2, 0x0
invoke-virtual {v6, v7, v2}, Landroid/app/StatusBarManager;->setIconVisibility(Ljava/lang/String;Z)V
return-void
.line 652
const-string v6, "plugged"
Click to expand...
Click to collapse
We finish with *.smali.
Next step. Open SystemUI/res/layout/status_bar.xml and search for this:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
Add below:
Code:
<com.android.systemui.statusbar.BatteryText android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="center_vertical" android:orientation="horizontal" android:paddingRight="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
Thats all. Now compile your SystemUI.apk.
Copy SystemUI.apk and ETD.apk (see "attachments") to your system/app/ directory
Reboot. Enjoy.
Hope I helped someone

VavanL said:
Hello...Want to share my experience of moding stock rom...
This manual helps You to add EDT-based tweaks to our phone.
Apologize for my bad English
!!!This was tested only on 2.3.6 stock Rom!!!
All changes you do at your own risk. I'm not responsible for any damage to your device
All credit goes to: Romanbb
Original thread
Key features:
- removing standard battery icon from the panel, replacing (or adding to the standard) the standard icon percentage indicator in increments of 1%, change percentage indicator color
- removing clock from the panel, change clock colour.
And more....
Bugs:
- not working changing of signal indicator
- any modifications to the icons will take some time to update
As I said, it's only my experience, and maybe it's little wrong. Please, try and tell me, how it works
And one more thing...I hope people, who read this manual know how to decompile/recompile system apk's :fingers-crossed:
Ok..let's start
You need to decompile your SystemUI.apk
Than take the BatteryText*.smali and Clock*.smali files from archive(see "attachments") and put them
into your SystemUI/smali/com/android/systemui/statusbar/ directory.
Then open SystemUI/smali/com/android/systemui/statusbar/policy/StatusBarPolicy.smali
and search this strings:
Add below this:
So, your code should look like this (or something like that) :
We finish with *.smali.
Next step. Open SystemUI/res/layout/status_bar.xml and search for this:
Code:
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
Add below:
Code:
<com.android.systemui.statusbar.BatteryText android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="center_vertical" android:orientation="horizontal" android:paddingRight="2.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" />
Thats all. Now compile your SystemUI.apk.
Copy SystemUI.apk and ETD.apk (see "attachments") to your system/app/ directory
Reboot. Enjoy.
Hope I helped someone
Click to expand...
Click to collapse
Great guide
Hope u will add more options

CoolCatGetHome said:
Great guide
Hope u will add more options
Click to expand...
Click to collapse
Thank's a lot...Yeah, I know how to add also percentage signal strength indicator, but don't know how to make removable stock signal indicator.
Maybe I'll update this guide soon

Hi,
how I can put the batterytext before battery Icon instead after?
thnaks in advance

hiej said:
Hi,
how I can put the batterytext before battery Icon instead after?
thnaks in advance
Click to expand...
Click to collapse
Put the added line before iconmanager
Sent from my ST25i using xda app-developers app

SpaceCaker said:
Put the added line before iconmanager
Sent from my ST25i using xda app-developers app
Click to expand...
Click to collapse
did you mean IconMerger ?
cause cant fin iconmanager :silly:

great!
Nice how to... thanks bro!

Related

[Guide][How To] Adding Brightness Bar Slider to Status Bar

++++++++++++++++++++++++++++++++++
UPDATED July 10, 2013: This GUIDE was written back for ICS firmware, although it might still work for JB - I couldn't confirm that due to the fact I had stopped developing/modding. Keep in mind you need to use the latest APKtool - From Here - for JB system. Also don't forget to copy from original apk "AndroidManifest.xml" file and "META-INF" folder for the New "modded" SystemUI.apk to work.
++++++++++++++++++++++++++++++++++
I was helping a member learn how to add the brightness bar slider to his/her status bar. Since I spend a good amount of time typing it up. So I might as well post it here for everyone
General Knowledge
LEARN how to decompile/Compile APK
APK Tool I used APK 1.5.0
Click to expand...
Click to collapse
PART I: Download resource file here: SystemX.zip
Decompile your SystemUI
Copy from the file/folder in SystemX to same location on your SystemUI:
icon: /res/drawable-hdpi/quickpanel_brightness_icon.png
(could be different folder based on your device, where ever your toggle icons put it there)
file: res/layout/quickpanel_brightness_settings.xml
folder: /smali/com/android/systemui/statusbar/quickpanel folder
PART II: Now you need to declare all added variants:
Ids - Open /res/values/ids.xml - Add these three lines at the end. Close & save.
Code:
<item type="id" name="title">false</item>
<item type="id" name="brightness_slider">false</item>
<item type="id" name="automatic">false</item>
Strings - Open /res/values/strings.xml - Add these two lines at the end. Close & save.
Code:
<string name="brightness_settings_title">Brightness</string>
<string name="brightness_settings_automatic">Fixed</string>
Public - Open /res/values/public.xml - Add to end of each section - Continue with the last id called out.
Code:
....
<public type="drawable" name="quickpanel_brightness_icon" id=[color=red]"0x7f020166"[/color] />
....
<public type="layout" name="quickpanel_brightness_settings" id=[color=red]"0x7f03001e"[/color] />
...
<public type="string" name="brightness_settings_title" id=[color=red]"0x7f08009e"[/color] />
<public type="string" name="brightness_settings_automatic" id=[color=red]"0x7f08009f"[/color] />
...
<public type="id" name="title" id=[color=red]"0x7f0e009d"[/color] />
<public type="id" name="brightness_slider" id=[color=red]"0x7f0e009e"[/color] />
<public type="id" name="automatic" id=[color=red]"0x7f0e009f"[/color] />
*Change those in red per your ids - best open public.xml in Excel, sort by id - you will see the last number was used in each section.
PART III: Now we need to edit the Smali associated with your Public.xml Id's:
Open /smali/com/android/systemui/statusbar/quickpanel/BrightnessSettingsView.smali in Notepad++ (or similar) - Change if needed:
@ line 201
Code:
const v1, [color=red]0x7f08009e[/color]
ID associated with public.xml string section name="brightness_setting_title"
@ line 207
Code:
const v1, [color=red]0x7f08009f[/color]
ID associated with public.xml string section name="brightness_settings_automatic"
@ line 257
Code:
const v1, [color=red]0x7f0e009d[/color]
ID associated with public.xml id section name="title"
@ line 267
Code:
const v1, [color=red]0x7f0e009e[/color]
ID associated with public.xml id section name="brightness_slider"
@ line 308
Code:
const v1, [color=red]0x7f0e009f[/color]
ID associated with public.xml id section name="automatic"
Save & Close.
Open /smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali in Notepad++ (or similar)
Find this Section:
Code:
....
.method protected makeStatusBarView()Landroid/view/View;
.locals 13
.prologue
const/16 v12, 0x8
.....
[i](very long find the last line in this section)[/i]
.....
[color=blue].line 382
return-object v4[/color]
.line 311
.end local v2 #filter:Landroid/content/IntentFilter;
.end local v6 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
.end local v7 #statSysNoSim:Landroid/widget/ImageView;
.end local v8 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:catch_0
move-exception v9
goto/16 :goto_0
.end method
.method onBarViewAttached()V
......
In between .line 382 (this line number is not important - ignore whatever it is, only make sure it's the last line in this section) and return-object v4 - Add:
Code:
[color=indigo][color=blue].line 382[/color]
const v6, [color=red]0x7f03001e[/color]
invoke-static {v0, v6, v11}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;->init()V
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const/4 p0, 0x1
invoke-virtual {v6, v5, p0}, Lcom/android/systemui/statusbar/phone/ExpandedView;->addView(Landroid/view/View;I)V
[color=blue]return-object v4[/color][/color]
ID associated with public.xml layout section name="quickpanel_brightness_settings"
Note: If you already had Toggle Mod - It should look like this:
Code:
[color=blue].line 382[/color]
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v0, v9, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
const v6, 0x7f03001c
invoke-static {v0, v6, v11}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v5}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
invoke-virtual {v6, v5, v11}, Lcom/android/systemui/statusbar/phone/ExpandedView;->addView(Landroid/view/View;I)V
[color=indigo]const v6, [color=red]0x7f03001e[/color]
invoke-static {v0, v6, v11}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;
invoke-virtual {v5}, Lcom/android/systemui/statusbar/quickpanel/BrightnessSettingsView;->init()V
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const/4 p0, 0x1
invoke-virtual {v6, v5, p0}, Lcom/android/systemui/statusbar/phone/ExpandedView;->addView(Landroid/view/View;I)V
[color=blue]return-object v4[/color][/color]
Save & Close
PART IV: Compile & push to your system, don't forget to set your permission to rw-r--r-- ! DONE.
The End: That's all - Wasn't that hard, wasn't it ? :silly: .... Good Luck !!! :highfive:
Disclaimer:
I didn't write up the code for quickpanel brightness settings, it has been pass on from forum to forum - I do not know the original author. If it's your please let me know so we all can give proper thanks.
Click to expand...
Click to collapse
+1
+thanks for you.
Yeeeah, I think we need more people like you
thanks for the tutorial.
How would you go about removing the brightness bar (manually)?
fcb13 said:
How would you go about removing the brightness bar (manually)?
Click to expand...
Click to collapse
The quickest way is take out the Added code in the PhoneStatusBar.smali. You can ignore the rest. But it would be more clean if you reverse the guide.
is it working on other phone such samsung or only xperia??
d3cka said:
is it working on other phone such samsung or only xperia??
Click to expand...
Click to collapse
NO, this guide is for Xperia - Samsung had a different layout in SystemUI
Ohh thanks for the answer
Sent from my GT-S5360 using xda premium
can someuone upload the edited SystemUI? I dont have a pc right now only phone
Awesome work.
Worked for me. Can't say anything changes in touchscreen sensitivity, it was fine before. But the capacitive buttons were always kind of a pain in the .ss, now they respond much better. Thanks a lot for this mod. Xperia Ion.
My phone doesn't have phonestatusbar.smali
Sent from my XT530 using xda app-developers app
I don' t know if this work.
I have a problem, decompile e recompile SystemUI.apk without an error, but when use SystemUI recompileted it's don't work.
Can Someone help me?
Where I should add line from part III? In file extracted from systemX.zip I have no one "line" with needed id.
Oh, it was my mistake - i searched for ".line"
Thank you for this guide!
great tutorial:good:
+1 thanks
Sent from my LT26i using xda app-developers app
I wanna add the slider in 2.3 but i could not find phonestatubar.smali
what can I do?
i think you can code a patch to help every body
Great tutorial! thanks!
on other manufacturers phones, it is /smali/com/android/systemui/statusbar/StatusBarService.smali

[TUTORIAL][MOD] Statusbar GB Lovers

Make Button Toggle
Screenshot: http://s23.postimg.org/woufjtqx7/attachment_php.jpg
To be prepared:
Apktool/Apkmanger
SystemUI.apk deodex only
Notepad ++
1, Decompile SystemUI open folder smali\com\android\systemui\statusbar
and search file StatusBarService.smali open with Notepad++ press Ctrl F search by keyword “quickpanel”
Before:
Code:
.local v3, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget; const/4 v8, 0x1
invoke-virtual {v3}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mExpandedVie w:Lcom/android/systemui/statusbar/ExpandedView;
invoke-virtual {v7, v3, v8}, Lcom/android/systemui/statusbar/ExpandedView;->addVie w(Landroid/view/View;I)V
And change
Code:
.local v3, qsv:Lcom/lidroid/systemui/quickpanel/PowerWidget; const/4 v8, 0x1
invoke-virtual {v3}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
iget-object v7, p0, Lcom/android/systemui/statusbar/StatusBarService;->mCloseView:L com/android/systemui/statusbar/CloseDragHa ndle;
invoke-virtual {v7, v3, v8}, Lcom/android/systemui/statusbar/CloseDragHandle;->add View(Landroid/view/View;I)V
2. Save and compile SystemUI
3. Change pemission to rw,r,r and move to system/app/
4. Reboot
Include Settings
Screnshot: http://s1.postimg.org/akfyigmbj/SC20130509_214615_copy.png
1. Make 2 .png image, and rename to
- ic_notify_quicksettings_normal.png
- ic_notify_quicksettings_pressed.png
2. Decompile SystemUI.apk an search status_bar_expanded.xml open with NotePad++
Code:
<com.android.systemui.statusbar.CarrierLabel android:textSize="17.659973dip" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:orientation="vertical" android:paddingBottom="1.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="5.0dip" android:layout_marginTop="1.0dip" android:layout_weight="1.0" />
And paste code below
Code:
<ImageView android:layout_gravity="center_vertical" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:onClick="settingsButton" />
Open file StatusBarService.smali
pate code below
# virtual methods
Code:
.method public settingsButton(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 1717
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
move-result-object v0
new-instance v1, Landroid/content/Intent;
const-string v2, "android.settings.SETTINGS"
invoke-direct {v1, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v1
invoke-virtual {v0, v1}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
invoke-virtual {p0}, Lcom/android/systemui/statusbar/StatusBarService;->animateCollapse()V
.line 1720
return-void
.end method
3. Make new file ic_notify_quicksettings.xml move to drawable
copy paste code below
Code:
<?xml version="1.0" encoding="utf-8"?>
<selector
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:drawable="@drawable/ic_notify_quicksettings_pressed" />
<item android:drawable="@drawable/ic_notify_quicksettings_normal" />
</selector>
4. Save and compile SystemUI
5. Change pemission to rw,r,r and move to system/app/
6. Reboot
Add Analog Clock
Screenshot: http://s21.postimg.org/4i6pk4mlz/image.png
1. Decompile SystemUI.apk
2. Open res/layout/status_bar_expanded.xml
paste code below
Code:
<LinearLayout android:orientation="horizontal"
Code:
<AnalogClock android:layout_width="wrap_content" android:layout_height="wrap_content" android:dial="@drawable/samurai_x" android:hand_hour="@drawable/samurai_x_hour" android:hand_minute="@drawable/samurai_x_minute" android:layout_alignParentRight="true" />
3. Download Analog clock.rar extract and move to res/drawable-ldpi
4. Save and compile SystemUI
5. Change pemission to rw,r,r and move to system/app/
6. Reboot
Add Toggle Music
Screenshot: http://s17.postimg.org/uerj1iewf/image.png
1. Decompile SystemUI.apk
2. Open file res/layout/status_bar_expanded.xml
3. Add code bellow
<LinearLayout android : orientation="horizontal"
Code:
<com.android.systemui.statusbar.TogelMusrik android:gravity="center" android:layout_width="wrap_content" android:layout_height="wrap_content" />
4. Open file res/values/ids.xml
Add this code above </resources>
Code:
<item type="id" name="musrik">false</item>
5. Donwload assets toggle music
6. Copy folder assets to /SystemUI/ here
7. Copy folder smali to /SystemUI/smali/com/android/systemui/statusbar/ here
8. Save and compile SystemUI
9. Change pemission to rw,r,r and move to system/app/
10. Reboot
Cridit: Jmkl Six
RESERVED
Pertamax.....
Nice mastah :good:
bacrot78 said:
Pertamax.....
Nice mastah :good:
Click to expand...
Click to collapse
yaa mastah omli :good:
english please
if you not so worry, it better you put some image before and after
This is for gb right bottom toggle manage lidroid position to the bottom of nitification pulldown
Ok good work
Ur title threads seems wrong not button toggle but bottom toggle XD
Peace gan
Sent from my GT-I8150 using Xparent Skyblue Tapatalk 2
hepi_hape said:
english please
if you not so worry, it better you put some image before and after
Click to expand...
Click to collapse
Sory for bad english... this pic now update
evanlocked said:
This is for gb right bottom toggle manage lidroid position to the bottom of nitification pulldown
Ok good work
Ur title threads seems wrong not button toggle but bottom toggle XD
Peace gan
Sent from my GT-I8150 using Xparent Skyblue Tapatalk 2
Click to expand...
Click to collapse
yes this is for GB
nice guide om
filodev said:
nice guide om
Click to expand...
Click to collapse
Thanks you to my teacher..
adikasgw said:
Thanks you to my teacher..
Click to expand...
Click to collapse
wkakakakakakakaakakakaka :laugh:
●๋•ηι¢є ιηƒσ●๋•
will try n report
hey how about add recentapps shortcut to systemUI?
sir music toggle not working on me...
xD
hey how to make it bigger? :3 its too small
My systemUI FC when i click on settings button
Sent From My Samsung Galaxy Y s5360

Enable QuickLaunch and use (Hidden Settings)

In DisplaySettings.smali I have found some feature but this feature (QuickLaunch) work with a small edit in statusbar file
For this guide is necessary:
-SecSettings;
-SystemUI;
-Notepad++;
-apktool for decompile and compile this file.
For SecSettings:
1.Decompile SecSettings and go to smali/com/android/settings and open DisplaySettings.smali
2.Search this line: quick_launch
3.And now remove this line in .method public onCreate(Landroid/os/BundleV:
Code:
:cond_a
const-string v11, "quick_launch"
invoke-virtual {p0, v11}, Lcom/android/settings/DisplaySettings;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;
move-result-object v11
check-cast v11, Landroid/preference/ListPreference;
iput-object v11, p0, Lcom/android/settings/DisplaySettings;->mQuickLaunchPreference:Landroid/preference/ListPreference;
const-string v11, "quick_launch_app"
const/4 v12, 0x0
invoke-static {v8, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v2
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mQuickLaunchPreference:Landroid/preference/ListPreference;
invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v12
invoke-virtual {v11, v12}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V
iget-object v11, p0, Lcom/android/settings/DisplaySettings;->mQuickLaunchPreference:Landroid/preference/ListPreference;
invoke-virtual {v11, p0}, Landroid/preference/ListPreference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V
const/4 v1, 0x1
:try_start_0
const-string v11, "window"
invoke-static {v11}, Landroid/os/ServiceManager;->getService(Ljava/lang/String;)Landroid/os/IBinder;
move-result-object v11
invoke-static {v11}, Landroid/view/IWindowManager$Stub;->asInterface(Landroid/os/IBinder;)Landroid/view/IWindowManager;
move-result-object v10
invoke-interface {v10}, Landroid/view/IWindowManager;->hasSystemNavBar()Z
:try_end_0
.catch Landroid/os/RemoteException; {:try_start_0 .. :try_end_0} :catch_1
move-result v11
if-nez v11, :cond_11
const/4 v1, 0x1
:goto_2
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getActivity()Landroid/app/Activity;
move-result-object v11
invoke-static {v11}, Lcom/android/settings/Utils;->isTablet(Landroid/content/Context;)Z
move-result v11
if-eqz v11, :cond_b (REMOVE THIS LINE)
if-eqz v1, :cond_c
:cond_b (REMOVE THIS LINE)
invoke-virtual {p0}, Lcom/android/settings/DisplaySettings;->getPreferenceScreen()Landroid/preference/PreferenceScreen; (REMOVE)
move-result-object v11 (REMOVE THIS LINE)
iget-object v12, p0, Lcom/android/settings/DisplaySettings;->mQuickLaunchPreference:Landroid/preference/ListPreference; (REMOVE)
invoke-virtual {v11, v12}, Landroid/preference/PreferenceScreen;->removePreference(Landroid/preference/Preference;)Z (REMOVE THIS LINE)
When you have remove this lines, you can compile this file.
For SystemUI:
Decompile SystemUI and go to res/layout/ and open this file:
tw_status_bar_expanded if you want insert this button under brightness slider in notification panel
tw_status_bar_expanded_header if you want insert this button next to date view in notification panel
For tw_status_bar_expanded add 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">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout> UNDER THIS LINE INSERT THIS:
<com.android.systemui.statusbar.policy.QuickLaunchKeyButtonView android:id="@id/quick_launch" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_ic_sysbar_capture" android:contentDescription="@string/accessibility_capture" />
For tw_status_bar_expanded_header:
Code:
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" /> UNDER THIS LINE INSERT:
<com.android.systemui.statusbar.policy.QuickLaunchKeyButtonView android:id="@id/quick_launch" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_ic_sysbar_capture" android:contentDescription="@string/accessibility_capture" />
And what exactly does this do?
Your rom isnt looking like a stock rom maybe a modded stock rom
krazy1101 said:
And what exactly does this do?
Your rom isnt looking like a stock rom maybe a modded stock rom
Click to expand...
Click to collapse
Is a stock rom feature, you can capture screen , shortcut to camera and search from notification panel
Try and express your preference
confirmed working flawlessly on MS1.:good: code change from v11->v12 as well as condition name change but simple enuff to find.
any systemui code line to make notification curtain collapse on the soft-key press?
Hey mate, I managed to get it to work on my i9070 but Camera and Applications doesn't work.. and Screenshot only takes the screenshot of the notification panel (which basically doesn't have much use)... But still, thanks for sharing this info
Sami Kabir said:
Hey mate, I managed to get it to work on my i9070 but Camera and Applications doesn't work.. and Screenshot only takes the screenshot of the notification panel (which basically doesn't have much use)... But still, thanks for sharing this info
Click to expand...
Click to collapse
You can add this line in tw_status_bar.xml in layout folder.
Find this line:
<com.android.systemui.statusbar.policy.Clock
and add this below:
Code:
<com.android.systemui.statusbar.policy.QuickLaunchKeyButtonView android:id="@id/quick_launch" android:visibility="visible" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/tw_ic_sysbar_capture" android:contentDescription="@string/accessibility_capture" />
In this way, this function will be displayed to the right of the clock in the status bar
Applications is a link with the application of the launcher and camera is link of samsung camera but I do not know why you will not work.
@Vivek_Neel @_Sale_ Can you make this mod flashable for neatrom ?
Pishtaz said:
@Vivek_Neel @_Sale_ Can you make this mod flashable for neatrom ?
Click to expand...
Click to collapse
Oh am seeing now only.
Y not if I have time.
Sure.
Typed using Iphone kb and sent from my GT-I9100 using Tapatalk 2

[GUIDE] How to create two big button in notification panel like S5

In this guide, I will explain how to create a button in notification panel and giving it a function
See attachments to see the result of the guide, and any files that are needed for this change.
Requires:
- knowledge on how to compile / decompile with apktool;
- SystemUI.apk;
- Notepad++;
- brain and patience.
First decompile SystemUI, go to res/layout, open tw_status_bar_expanded.xml and add the red line:
Code:
<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="wrap_content">
<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" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>
[COLOR="Red"]<LinearLayout android:orientation="vertical" android:id="@id/sfinder_qconnect_layout" android:visibility="visible" android:layout_width="fill_parent" android:layout_height="wrap_content">
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:paddingLeft="@dimen/finder_connect_button_padding_right" android:paddingTop="@dimen/finder_connect_button_padding_top" android:paddingRight="@dimen/finder_connect_button_padding_left" android:paddingBottom="@dimen/finder_connect_button_padding_bottom" android:layout_width="fill_parent" android:layout_height="wrap_content">
<Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/sfinder_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginRight="10.0dip" android:text="@string/big_button_barra" android:layout_weight="0.5" />
<Button android:textSize="@dimen/tw_quick_panel_sfinder_qconnect_button_text_size" android:textColor="@drawable/tw_quick_panel_sfinder_qconnect_button_text_color" android:id="@id/qconnect_button_big" android:background="@drawable/tw_quick_panel_sfinder_qconnect_button" android:layout_width="0.0dip" android:layout_height="@dimen/finder_connect_button_height" android:layout_marginLeft="10.0dip" android:text="@string/big_button_panel" android:layout_weight="0.5" />
</LinearLayout>
<View android:id="@id/sfinder_qconnect_divider" android:background="@drawable/notification_bottom_line" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>[/COLOR]
<LinearLayout android:orientation="vertical" android:id="@id/brightness_controller" android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="56.0dip">
<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="55.0dip">
<ImageView android:id="@id/brightness_icon" android:clickable="true" android:layout_width="25.0dip" android:layout_height="fill_parent" android:layout_marginLeft="13.0dip" android:src="@drawable/ic_sysbar_brightness" android:contentDescription="@string/accessibility_brightness_icon" />
<FrameLayout android:id="@id/brightness_group" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
<com.android.systemui.statusbar.policy.ToggleSlider android:id="@id/auto_brightness" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:text="@string/status_bar_settings_auto_brightness_label" />
</FrameLayout>
</LinearLayout>
<View android:background="#ff091a24" android:layout_width="fill_parent" android:layout_height="1.0dip" />
</LinearLayout>
Now go to values folder and add this line in this files.
In ids.xml:
Code:
<item type="id" name="sfinder_qconnect_layout">false</item>
<item type="id" name="sfinder_button_big">false</item>
<item type="id" name="qconnect_button_big">false</item>
<item type="id" name="sfinder_qconnect_divider">false</item>
In dimens.xml
Code:
<dimen name="finder_connect_button_padding_top">11.0dip</dimen>
<dimen name="finder_connect_button_padding_bottom">10.0dip</dimen>
<dimen name="finder_connect_button_padding_right">20.0dip</dimen>
<dimen name="finder_connect_button_padding_left">20.0dip</dimen>
<dimen name="finder_connect_button_height">37.0dip</dimen>
<dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">16.0dip</dimen>
In strings.xml
Code:
<string name="big_button_barra">Display</string>
<string name="big_button_panel">Sound</string>
Add the res files in drawable and drawable-hdpi.
Recompile SystemUI and decompile for insert the value of ids in public.xml
Now there is the smali part. Go to smali/com/android/systemui/statusbar/phone and open PhoneStatusbar.smali
Add this field in instance fields:
Code:
.field private mBigButtonListener:Landroid/view/View$OnClickListener;
.field private mBigButtonListener2:Landroid/view/View$OnClickListener;
Add the red line at the end of the .method public constructor <init>()V
Code:
[COLOR="Red"]new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X1;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X1;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener:Landroid/view/View$OnClickListener;
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X2;
invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X2;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener2:Landroid/view/View$OnClickListener;
[/COLOR]
return-void
.end method
Add the red line in .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
Code:
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d0051
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/view/View;
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/view/View;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButtonListener:Landroid/view/View$OnClickListener;
invoke-virtual {v9, v10}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
[COLOR="Red"]iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d01ea
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/Button;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener:Landroid/view/View$OnClickListener;
invoke-virtual {v9, v10}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v10, 0x7f0d01eb
invoke-virtual {v9, v10}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/Button;
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBigButtonListener2:Landroid/view/View$OnClickListener;
invoke-virtual {v9, v10}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V[/COLOR]
0x7f0d01ea is the public id of "sfinder_button_big"
0x7f0d01eb is the public id of "qconnect_button_big"
Now add the file of smali folder.
If you want to change the intent of the button, you must open the two smali files(PhoneStatusbar$X1 and PhoneStatusbar$X2) and change the parts highlighted in red, adding the names of the resulting applications and tasks that you want to open.
Code:
new-instance v2, Landroid/content/Intent;
invoke-direct {v2}, Landroid/content/Intent;-><init>()V
const-string v3, "android.intent.action.MAIN"
invoke-virtual {v2, v3}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
const/high16 v4, 0x1000
invoke-virtual {v2, v4}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
const-string v5, "[COLOR="red"]com.android.settings[/COLOR]"
const-string v6, "[COLOR="red"]com.android.settings.Settings$DisplaySettingsActivity[/COLOR]"
invoke-virtual {v2, v5, v6}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
move-result-object v2
invoke-virtual {v1, v2}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$X1;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
invoke-virtual {v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->animateCollapse()V
After insert the smali file, recompile SystemUI, then add the meta-inf folder and the AndroidManifest.xml from the original SystemUI or sign the file, then recompile again.
That's it all, if you have trouble commented on this thread and give you a hand to solve
@rrgrrg
Sent from my GT-I9100 using XDA Premium 4 mobile app
request bro...for custom rom cm10.1
D2Y aka E said:
request bro...for custom rom cm10.1
Click to expand...
Click to collapse
I do not use the cm so I have to give the framework and the systemui
Can you mod this for s3 mini???
Sent from my GT-I8190N using XDA Premium 4 mobile app
error in compile apk.....(an error occured plz check the log (option 21)
??!!
Nice thanks
Add the red line in .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
i not found this line and my system ui force stoped
fargh123 said:
Add the red line in .method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
i not found this line and my system ui force stoped
Click to expand...
Click to collapse
Search the below text alone
Code:
makeStatusBarView
You can find the method.
@ gerrys2 thanks for the guide.
But I would like to suggest one thing regarding adding ids.
You can mention in your thread that after adding smali , recompile SystemUI.apk
Then again decompile the modded SystemUI.apk so that the ids for those two button they can see in public.xml
For adding them in smali
@gerryS2 good job gerry:good:
Thanks for sharing
Thanks for sharing
Caproid said:
@rrgrrg
Sent from my GT-I9100 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
i prefer this guide
as its advantages are u set the function by yourself and u can remove them when u want :angel:
"After insert the smali file, recompile SystemUI, then add the meta-inf folder and the AndroidManifest.xml from the original SystemUI or sign the file, then recompile again" i didnt understand this step
bhavstech said:
"After insert the smali file, recompile SystemUI, then add the meta-inf folder and the AndroidManifest.xml from the original SystemUI or sign the file, then recompile again" i didnt understand this step
Click to expand...
Click to collapse
After insert the smali, Recompile systemUI and sign it
Thanks
gerryS2 said:
After insert the smali, Recompile systemUI and sign it
Click to expand...
Click to collapse
it didnt work i did that
after I insert smali and sign the apk my system ui give fc
Sent from my GT-I9100 using Tapatalk
fargh123 said:
after I insert smali and sign the apk my system ui give fc
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
Me too why?

[Guide][tut] [LP/MM] Cyanogenmod Battery Styles (stock/circle dotted/percentage/cm)

Hello guys
today i would like to post a small tut battery styles
as per users request
first i would like to thank
aliv Rom, Basar and Vanya Melnechenko from MAAADR group
from their source i had ported for LP/MM with small changes
This is specially for sony ( if for any other roms Please compare system_icon.xml )
Features:
Hide/Show Stock battery
Battery Styles
Icon
Percentage
Icon with Percentage
Icon with percentage (JB style)
Circle
Circle with percentage
Dotted Circle
Dotted circle with percentage
No battery
Battery color
Circle animation speed
Percent text color
precent text charging color
apply mods
For this all you required :-
Deodexed SystemUI.apk and patience
look for post #2
Systemui ( First part )
1. Decompile SystemUI.apk
2. Download this Attchment View attachment SystemUI.zip and merge
open systemui.apk/res/arrays.xml
before </resources> add this
Code:
<integer-array name="batterymeter_color_levels_1">
<item>4</item>
<item>15</item>
<item>100</item>
</integer-array>
<array name="batterymeter_color_values_1">
<item>#ffff3300</item>
<item>#ffff3300</item>
<item>#ffffffff</item>
</array>
<integer-array name="batterymeter_inverted_bolt_points">
<item>743</item>
<item>73</item>
<item>743</item>
<item>292</item>
<item>442</item>
<item>201</item>
<item>442</item>
<item>400</item>
<item>0</item>
<item>20</item>
<item>369</item>
<item>157</item>
<item>369</item>
<item>0</item>
</integer-array>
open systemui.apk/res/attrs.xml
before </resources> add this
Code:
<attr name="batteryView" format="string" />
open systemui.apk/res/colors.xml
before </resources> add this
Code:
<color name="batterymeter_critical">#ffff3300</color>
<color name="batterymeter_low">#ffff3300</color>
<color name="batterymeter_full">#ffffffff</color>
<color name="battery_text_color">#ffffffff</color>
<color name="statusbar_clock_color">#ffffffff</color>
open systemui.apk/res/styles.xmlbefore </resources> add this
Code:
<style name="TextAppearance.StatusBar.Battery" parent="@android:style/TextAppearance.StatusBar.Icon">
<item name="android:textSize">13.0dip</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@color/status_bar_clock_color</item>
</style>
now compile and decompile for public ids
Now open com/android/systemui/statusbar/phone/phonestatusbar.smali
find this
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$H;
before that add this line
Code:
Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;,
now look for this
Code:
.field private mBackdropInterpolator:Landroid/view/animation/Interpolator;
below that add these lines
Code:
.field private mBattery:Lcom/android/systemui/BatteryMeterViewMod;
.field private mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
find this access code
Code:
.method static synthetic access$7800(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)Landroid/widget/ImageView;
access$7800 may differ so dont worry
above that add this
Code:
.method static synthetic access$77000(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
.locals 0
.param p0, "x0" # Lcom/android/systemui/statusbar/phone/PhoneStatusBar;
.prologue
.line 155
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateBatteryIcons()V
return-void
.end method
now look for this method
Code:
.method private updateClearAll()V
above that add this method
Code:
.method private updateBatteryIcons()V
.locals 2
.prologue
const/4 v1, 0x0
.line 723
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
if-eqz v0, :cond_0
.line 724
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
invoke-virtual {v0, v1}, Lcom/android/systemui/BatteryMeterViewMod;->updateSettings(Z)V
.line 725
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
invoke-virtual {v0, v1}, Lcom/android/systemui/BatteryCircleMeterView;->updateSettings(Z)V
.line 727
:cond_0
return-void
.end method
now look for this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
in that method
look for this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
below that line add this code
Code:
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f10021d
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/android/systemui/BatteryMeterViewMod;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBattery:Lcom/android/systemui/BatteryMeterViewMod;
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
const v2, 0x7f10021c
invoke-virtual {v1, v2}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v1
check-cast v1, Lcom/android/systemui/BatteryCircleMeterView;
move-object/from16 v0, p0
iput-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCircleBattery:Lcom/android/systemui/BatteryCircleMeterView;
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->updateBatteryIcons()V
change the ids compare with mine and replace with yours
now look for this method
Code:
.method public start()V
in that find this line
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
above that line add this
Code:
new-instance v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mHandler:Lcom/android/systemui/statusbar/BaseStatusBar$H;
invoke-direct {v0, p0, v1}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/os/Handler;)V
invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$BatterySettingsObserver;->observe()V
save it and close
3. Now open com/android/systemui/R$styleable.smali
look for this
Code:
.field public static final AnalogClock:[I
below that add this
Code:
.field public static final BatteryIcon:[I
now look for this
Code:
sput-object v0, Lcom/android/systemui/R$styleable;->AnalogClock:[I
below add this
Code:
new-array v0, v3, [I
const v1, 0x7f01003c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryIcon:[I
compare id from mine and replace
save it and close
compare my public ids and replace with your ids
from these files
com/android/systemui/BatteryCircleMeterView
com/android/systemui/BatteryMeterView
com/android/systemui/BatteryMeterView$BatteryTracker
and you are finally done
save it all and compile and replace
settings.apk final part editing
1. Download this app View attachment app-release.apk
2. Install the app
3. Have fun with this mod
no time to make settings
but one fine day i will add tut to add in settings app
Have fun
Dont forget to mention me if you used my work
Mod edit:
OP quote removed
wait for add to settings sir :fingers-crossed:
Work for systemui xperia X mod?
InitialL_Dee said:
wait for add to settings sir :fingers-crossed:
Click to expand...
Click to collapse
yhu dnt need to quote tha whole post just to post please.... edit please!
InitialL_Dee said:
wait for add to settings sir :fingers-crossed:
Click to expand...
Click to collapse
Hmm sure I will add but when I am free haha
Delete the quote bro
Make thread clean
vandiaz_sairavinz said:
Work for systemui xperia X mod?
Click to expand...
Click to collapse
Yes will work bro tested
@venkat kamesh thanks for the guide. I am going to have a busy weekend. ?
Sent from my SM-G935F using Tapatalk
Nice guide sir..
And By the way, did you ever try to port battery style from bliss pop 5.1..?
Screenshot please. thanks
venkat kamesh said:
vandiaz_sairavinz said:
Work for systemui xperia X mod?
Click to expand...
Click to collapse
Yes will work bro tested
Click to expand...
Click to collapse
I'm using Xperia X SystemUI, but my .smali doesn't have these lines:
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Is there something else I should be looking for?
@venkat kamesh
Hi bro
I can't find this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
I am using Xperia X SystemUI. U told its working with X SystemUI too.
@Bloodlvst bro same here.
Awsm mod bro ?
Any guide(mod or theming) of xperia x systemui for cm12.1 ☺
Thx bro
Bloodlvst said:
I'm using Xperia X SystemUI, but my .smali doesn't have these lines:
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Is there something else I should be looking for?
Click to expand...
Click to collapse
Rajeev said:
@venkat kamesh
Hi bro
I can't find this line
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
I am using Xperia X SystemUI. U told its working with X SystemUI too.
@Bloodlvst bro same here.
Click to expand...
Click to collapse
Instead of this
Code:
invoke-virtual {v0, v3, v1}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
Search for this
Code:
invoke-virtual/range {v4 .. v9}, Landroid/content/Context;->registerReceiverAsUser(Landroid/content/BroadcastReceiver;Landroid/os/UserHandle;Landroid/content/IntentFilter;Ljava/lang/String;Landroid/os/Handler;)Landroid/content/Intent;
Instead of this
Code:
new-instance v2, Lcom/android/systemui/statusbar/phone/PhoneStatusBarPolicy;
Search for this
Code:
:cond_0
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->addNavigationBar()V
Just search these lines instead of those two and do all stuff as said by op.
jitz975 said:
Just search these lines instead of those two and do all stuff as said by op.
Click to expand...
Click to collapse
Gave this a shot, but I'm getting force close in SystemUI.
Couple of notes - the 2 files at the end:
BatteryMeterView
BatteryMeterView$BatteryTracker
Am I editing those or am I editing:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I ask because the puiblic ID's in BatteryMeterView don't match at all with the public(compare).xml, but the "mod" ones do. Is there a step missing?
Hopefully it's just a small issue! :fingers-crossed:
Bloodlvst said:
Gave this a shot, but I'm getting force close in SystemUI.
Couple of notes - the 2 files at the end:
BatteryMeterView
BatteryMeterView$BatteryTracker
Am I editing those or am I editing:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I ask because the puiblic ID's in BatteryMeterView don't match at all with the public(compare).xml, but the "mod" ones do. Is there a step missing?
Hopefully it's just a small issue! :fingers-crossed:
Click to expand...
Click to collapse
Bro i did this mod, only using this guide and it worked at first go.
jitz975 said:
Bro i did this mod, only using this guide and it worked at first go.
Click to expand...
Click to collapse
Did you change the ID's in:
BatteryMeterView
BatteryMeterView$BatteryTracker
Or the ones in:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I'll give it another go!
Bloodlvst said:
Did you change the ID's in:
BatteryMeterView
BatteryMeterView$BatteryTracker
Or the ones in:
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker
I'll give it another go!
Click to expand...
Click to collapse
Yes, id's are in these two
BatteryMeterViewMod
BatteryMeterViewMod$BatteryTracker, op missed that mod part
If using Xperia X UI, you will need to replace your system_icons.xml with the following code:
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:gravity="center_vertical" android:id="@id/system_icons" android:layout_width="wrap_content" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.keyguard.AlphaOptimizedLinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<include android:id="@id/signal_cluster" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="0.0dip" layout="@layout/signal_cluster_view" />
<com.android.systemui.BatteryMeterViewMod android:id="@+id/battery_stock" android:visibility="gone" android:layout_width="10.5dip" android:layout_height="16.0dip" android:layout_marginBottom="1.0px" android:layout_marginStart="0.0dip" systemui:batteryView="statusbar" />
<com.android.systemui.BatteryCircleMeterView android:textAppearance="@style/TextAppearance.StatusBar.Battery" android:gravity="bottom" android:id="@+id/circle_battery" android:paddingLeft="0.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" systemui:batteryView="statusbar" />
<com.android.systemui.rz.LeftLayout android:layout_width="wrap_content" android:layout_height="wrap_content" key="battery_hide">
<LinearLayout android:gravity="center_vertical" android:id="@id/battery_group" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.sonymobile.systemui.BatteryLevelView android:textSize="@dimen/battery_level_text_size" android:textColor="#ffffffff" android:layout_gravity="center_vertical" android:id="@id/battery_level" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:importantForAccessibility="noHideDescendants" />
<com.android.systemui.BatteryMeterView android:id="@id/battery" android:layout_width="9.5dip" android:layout_height="14.5dip" android:layout_marginBottom="@dimen/battery_margin_bottom" android:layout_marginStart="@dimen/battery_margin_start" />
</LinearLayout>
</com.android.systemui.rz.LeftLayout>
</LinearLayout>
@venkat kamesh - Bro, is there any plans to make it so you don't need to restart systemUI to make changes? Or is this a limitation of Marshmallow?

Categories

Resources