Related
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
I tried modifying, decomplied SystemUI.apk > change battery icons > replaced stat_sys_battery.xml and stat_sys_battery_charge.xml and then recompiled it successfully. But after pushing the modded SystemUI.apk into system/app with proper permission there seems to be a problem, battery icon is not shown. It is simply gone. Everything else working proper. Wondering where I am going wrong?!
Can someone add 1% battery mod to this SystemUI.apk??
Other framework files are also attached if required.
no one can help??
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" 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" layout="@layout/signal_cluster_view" />
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
And add red line below:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" 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" layout="@layout/signal_cluster_view" />
[COLOR="Red"]<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />[/COLOR]
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
Save change you have made. After that, look for this smali file:
PhoneStatusBar.smali
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
and add red lines below:
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
[COLOR="Red"].line 13
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0061
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addLabelView(Landroid/widget/TextView;)V[/COLOR]
also change the const v9, 0x7f0e0061 to your own value, look for it inside public.xml
Recompile back.
soxxO_o said:
Decompile systemui.apk and navigate to SystemUI/res/layout/status_bar.xml and find this line:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" 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" layout="@layout/signal_cluster_view" />
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
And add red line below:
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/signal_battery_cluster" android:paddingLeft="2.0dip" 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" layout="@layout/signal_cluster_view" />
[COLOR="Red"]<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />[/COLOR]
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
Save change you have made. After that, look for this smali file:
PhoneStatusBar.smali
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
and add red lines below:
Code:
.line 358
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0028
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/ImageView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addIconView(Landroid/widget/ImageView;)V
[COLOR="Red"].line 13
iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBatteryController:Lcom/android/systemui/statusbar/policy/BatteryController;
const v9, 0x7f0e0061
invoke-virtual {v4, v9}, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;->findViewById(I)Landroid/view/View;
move-result-object v9
check-cast v9, Landroid/widget/TextView;
invoke-virtual {v10, v9}, Lcom/android/systemui/statusbar/policy/BatteryController;->addLabelView(Landroid/widget/TextView;)V[/COLOR]
also change the const v9, 0x7f0e0061 to your own value, look for it inside public.xml
Recompile back.
Click to expand...
Click to collapse
What name I should search inside public.xml to get the right value??
stat_sys_battery?
battery_text?
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?
Hi Community!
Here is a Guide For Porting Swiping Power toggles Created by Master @serajr
Works on 5.1,5.0.2 & 5.0
REQUIREMENTS
1.)DEODEXED SystemUI & Settings
2.)Knowledge About Replacing IDs
3.)Latest Apktool
Lets Start
Download the attached files and merge them into your SystemUI
Then Open Android-mainfest.xml
Add this code before </manifest>
Code:
<meta-data android:name="com.sonymobile.runtimeskinning.LAF_VERSION" android:value="1"/>
<receiver android:name="com.serajr.powertoggles.receivers.NetworkModeReceiver" android:process="com.android.phone"/>
<activity android:configChanges="orientation|screenSize" android:exported="true" android:icon="@drawable/ic_settings" android:label="@string/power_toggles_preferences_category_power_toggles" android:name="com.serajr.powertoggles.preferences.PowerTogglesPreferencesActivity" android:theme="@style/DeviceDefaultLight">
<intent-filter>
<action android:name="com.serajr.powertoggles.preferences.intent.PREFERENCES"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
<meta-data android:name="com.sonymobile.settings.preference.TITLE" android:resource="@string/power_toggles_preferences_category_power_toggles"/>
<meta-data android:name="com.sonymobile.settings.preference.SUMMARY" android:resource="@string/status_bar_settings"/>
<meta-data android:name="android.support.PARENT_ACTIVITY" android:value="com.android.settings.display"/>
</activity>
<activity android:configChanges="orientation|screenSize" android:exported="false" android:icon="@drawable/ic_settings" android:label="@string/power_toggles_preferences_category_order" android:name="com.serajr.powertoggles.preferences.PowerTogglesPreferencesOrderActivity" android:theme="@style/DeviceDefaultLight">
<intent-filter>
<action android:name="com.serajr.powertoggles.preferences.intent.ORDER"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
Now Open Res/Values/Arrays.xmal
Add this Codes before </resources>
Code:
<string-array name="power_toggles_available_buttons">
<item>MeProfile</item>
<item>SystemSettings</item>
<item>RecentApps</item>
<item>BatteryInfo</item>
<item>Camera</item>
<item>Wifi</item>
<item>WifiAp</item>
<item>Bluetooth</item>
<item>GPS</item>
<item>StaminaMode</item>
<item>NFC</item>
<item>Roaming</item>
<item>Throw</item>
<item>Sound</item>
<item>Flashlight</item>
<item>Brightness</item>
<item>ScreenTimeout</item>
<item>StayAwakePlugged</item>
<item>Sync</item>
<item>Lockscreen</item>
<item>AutoRotate</item>
<item>Airplane</item>
<item>MobileData</item>
<item>NetworkMode</item>
<item>USBConnectionMode</item>
<item>USBDebugging</item>
<item>USBTether</item>
<item>Reboot</item>
<item>Shutdown</item>
</string-array>
<string-array name="power_toggles_reboot_options">
<item>@string/power_toggles_reboot</item>
<item>@string/power_toggles_reboot_recovery</item>
<item>@string/power_toggles_reboot_bootloader</item>
</string-array>
<string-array name="power_toggles_reboot_actions">
<item>now</item>
<item>recovery</item>
<item>bootloader</item>
</string-array>
<string-array name="power_toggles_usb_connection_mode_options">
<item>@string/power_toggles_usb_mtp_mode</item>
<item>@string/power_toggles_usb_msc_mode</item>
</string-array>
<string-array name="power_toggles_usb_connection_mode_actions">
<item>mtp</item>
<item>mass_storage</item>
</string-array>
<string-array name="power_toggles_battery_info_options">
<item>@string/power_toggles_battery_info_info</item>
<item>@string/power_toggles_battery_info_usage</item>
</string-array>
<string-array name="power_toggles_battery_info_actions">
<item>battery_info</item>
<item>battery_usage</item>
</string-array>
Open Bools.xml
ADD these codes
Code:
<bool name="power_toggles_colored_battery_info">true</bool>
<bool name="power_toggles_colored_usb_connection_mode">true</bool>
<bool name="power_toggles_colored_system_settings">true</bool>
<bool name="power_toggles_colored_recent_apps">true</bool>
<bool name="power_toggles_colored_reboot">true</bool>
<bool name="power_toggles_colored_shutdown">true</bool>
<bool name="power_toggles_active_camera_double_cells">true</bool>
Open colors.xml
Add these code
Code:
<color name="custom_drawer_layout_bg">#e60e0e0e</color>
<color name="custom_drawer_layout_scrin">#55ffffff</color>
<color name="power_toggles_button_icon_color">#ff33b5e5</color>
<color name="power_toggles_button_label_color">#ffffffff</color>
Open Dimens.xml
Add these codes
Code:
<dimen name="custom_drawer_layout_width">300.0dip</dimen>
<dimen name="power_toggles_button_height">80.0dip</dimen>
<dimen name="power_toggles_grid_width">300.0dip</dimen>
Open Ids.xml
Code:
<item type="id" name="custom_drawer_layout">false</item>
<item type="id" name="power_toggles">false</item>
<item type="id" name="power_toggles_button">false</item>
<item type="id" name="power_toggles_button_icon">false</item>
<item type="id" name="power_toggles_button_text">false</item>
<item type="id" name="power_toggles_button_status">false</item>
<item type="id" name="power_toggles_me_profile_button">false</item>
<item type="id" name="power_toggles_preference_icon">false</item>
<item type="id" name="power_toggles_preferences_order_grid">false</item>
<item type="id" name="power_toggles_button_camera_surface_holder">false</item>
<item type="id" name="power_toggles_button_camera_surface_flash_overlay">false</item>
Open integers.xml
ADD these codes
Code:
<integer name="power_toggles_row_layout_portrait_buttons_count">4</integer>
<integer name="power_toggles_row_layout_landscape_buttons_count">8</integer>
<integer name="power_toggles_grid_layout_columns_count">4</integer>
Open String.xml
Code:
<string name="custom_drawer_layout_header_text">POWER TOGGLES</string>
<string name="power_toggles_wifi_text">Wi-Fi</string>
<string name="power_toggles_mobile_data_text">Data</string>
<string name="power_toggles_network_text">Network Mode</string>
<string name="power_toggles_sound_sound_text">Sound</string>
<string name="power_toggles_sound_sound_vibration_text">Sound Vibration</string>
<string name="power_toggles_sound_silent_text">Silent</string>
<string name="power_toggles_sound_vibration_text">Vibration</string>
<string name="power_toggles_auto_rotate_text">Auto Rotation</string>
<string name="power_toggles_bluetooth_text">Bluetooth</string>
<string name="power_toggles_gps_text">GPS</string>
<string name="power_toggles_sync_text">Auto Sync</string>
<string name="power_toggles_brightness_text">Brightness</string>
<string name="power_toggles_screen_timeout_text">Screen Timeout</string>
<string name="power_toggles_lockscreen_text">Lockscreen</string>
<string name="power_toggles_airplane_text">Airplane Mode</string>
<string name="power_toggles_flashlight_text">Flashlight</string>
<string name="power_toggles_reboot_text">Reboot</string>
<string name="power_toggles_shutdown_text">Shutdown</string>
<string name="power_toggles_airplane_mode">In Flight Mode</string>
<string name="power_toggles_shutdown_confirm">Your phone will shut down.</string>
<string name="power_toggles_reboot">Reboot</string>
<string name="power_toggles_reboot_recovery">Recovery</string>
<string name="power_toggles_reboot_bootloader">Bootloader</string>
<string name="power_toggles_usb_debugging_text">USB Debugging</string>
<string name="power_toggles_usb_connection_mode_text">USB Conn. Mode</string>
<string name="power_toggles_usb_mtp_title">Current mode: MTP</string>
<string name="power_toggles_usb_msc_title">Current mode: MSC</string>
<string name="power_toggles_usb_mtp_mode">MTP - Media Transfer</string>
<string name="power_toggles_usb_msc_mode">MSC - Mass Storage</string>
<string name="power_toggles_wifi_ap_text">Wi-Fi Hotspot</string>
<string name="power_toggles_stay_awake_plugged_text">Stay Awake</string>
<string name="power_toggles_battery_info_text">Battery Info</string>
<string name="power_toggles_battery_info_info">Battery Information</string>
<string name="power_toggles_battery_info_usage">Battery Power Usage</string>
<string name="power_toggles_system_settings_text">System Settings</string>
<string name="power_toggles_recent_apps_text">Recent Apps</string>
<string name="power_toggles_me_profile_contact_text">Me</string>
<string name="power_toggles_stamina_mode_text">STAMINA Mode</string>
<string name="power_toggles_nfc_text">NFC</string>
<string name="power_toggles_roaming_text">Roaming</string>
<string name="power_toggles_throw_text">Throw</string>
<string name="power_toggles_usb_tether_text">USB Tethering</string>
<string name="power_toggles_preferences_category_power_toggles">Power Toggles</string>
<string name="power_toggles_preferences_close_on_toggle_title">Close on Toggle</string>
<string name="power_toggles_preferences_close_on_toggle_summary">Close the notification pulldown after toggling a button</string>
<string name="power_toggles_preferences_category_order">Buttons Order</string>
<string name="power_toggles_preferences_buttons_order_title">Change Order</string>
<string name="power_toggles_preferences_buttons_order_summary">Change the buttons order (two or more selected selected buttons are needed)</string>
<string name="power_toggles_preferences_category_buttons">Buttons (Alphabetically Sorted)</string>
<string name="power_toggles_preferences_category_reset">Reset</string>
<string name="power_toggles_preferences_reset_title">Reset Buttons</string>
<string name="power_toggles_preferences_reset_summary">All buttons and default order</string>
<string name="power_toggles_preferences_reset_message">All buttons will be included with the default order. Continue?</string>
<string name="power_toggles_preferences_reset_success_message">All buttons and order successfully reseted!</string>
<string name="power_toggles_preferences_about">About</string>
<string name="power_toggles_preferences_buttons_titles_title">Buttons Titles</string>
<string name="power_toggles_preferences_buttons_titles_summary">Show buttons titles</string>
<string name="power_toggles_camera_text">Camera</string>
<string name="power_toggles_battery_meter_format">@string/status_bar_settings_battery_meter_format</string>
Open Styles.xml
Add these Codes
Code:
<style name="TextAppearance.StatusBar.CustomDrawerLayout" parent="@android:style/Widget.DeviceDefault.Light.TimePicker">
<item name="android:textSize">12.0dip</item>
<item name="android:textAllCaps">true</item>
</style>
<style name="DeviceDefaultLight" parent="@android:style/Theme.DeviceDefault.Light" />
<style name="power_toggles_text_appearance" parent="@android:style/TextAppearance">
<item name="android:textSize">9.0sp</item>
<item name="android:textStyle">normal</item>
<item name="android:textColor">@color/power_toggles_button_label_color</item>
<item name="android:ellipsize">marquee</item>
<item name="android:paddingLeft">2.0dip</item>
<item name="android:paddingRight">2.0dip</item>
<item name="android:fadingEdge">horizontal</item>
<item name="android:maxLines">2</item>
<item name="android:singleLine">false</item>
<item name="android:textAllCaps">true</item>
</style>
Recompile
Post 2 contains Smali part
Smali Part
Decompile the newly recompiled SystemUI again
Open SystemUI\smali\com\android\systemui\statusbar\phone\PhoneStatusBar.smali
Find
Code:
.field private mQSPanel:Lcom/android/systemui/qs/QSPanel;
Add the Line above that
Code:
.field private mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
Find
Code:
.field mDataTrafficController:Lcom/sonymobile/systemui/statusbar/policy/DataTrafficControllerImpl;
Add this Line above that
Code:
.field private mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
Find
Code:
.method private setNavigationIconHints(I)V
Add these Methods below that
Code:
.method private setupCustomDrawerLayout()V
.locals 3
.prologue
.line 57
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, 0x7f1001e7 #type="id" name="custom_drawer_layout"
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
.line 61
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f09006b #type="color" name="custom_drawer_layout_scrin"
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getColor(I)I
move-result v1
invoke-virtual {v0, v1}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->setScrimColor(I)V
.line 65
return-void
.end method
.method private setupPowerToggles()V
.locals 3
.prologue
.line 55
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, 0x7f1001e8 #type="id" name="power_toggles"
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/serajr/powertoggles/PowerToggles;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
.line 56
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f0e01ad #type="dimen" name="power_toggles_grid_width"
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v1
invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->gridWidth(I)V
.line 57
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
const/4 v1, 0x0
invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->buttonShowTitle(Z)V
.line 58
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->setupPowerToggles()V
.line 59
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->updatePowerToggles()V
.line 60
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
new-instance v1, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$48;
invoke-direct {v1, p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$48;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;)V
invoke-virtual {v0, v1}, Lcom/serajr/powertoggles/PowerToggles;->setChangeContentObserverListener(Lcom/serajr/powertoggles/PowerToggles$ChangeObserverCallbackInterface;)V
.line 61
return-void
.end method
Replace Public ID of these
Code:
0x7f1001e7 #type="id" name="custom_drawer_layout"
0x7f09006b #type="color" name="custom_drawer_layout_scrin"
0x7f1001e8 #type="id" name="power_toggles"
0x7f0e01ad #type="dimen" name="power_toggles_grid_width"
Find
Code:
.method public postAnimateCollapsePanels()V
Add these lines
Code:
.line 2048
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
invoke-virtual {v0}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->closeDrawers()V
.line 4475
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->fullScroll()V
Like this
Code:
.method public postAnimateCollapsePanels()V
.locals 2
.prologue
[COLOR="Red"].line 2048
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
invoke-virtual {v0}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->closeDrawers()V
.line 4475
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v0}, Lcom/serajr/powertoggles/PowerToggles;->fullScroll()V[/COLOR]
Find
Code:
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
Add these code Above that
Code:
.line 1243
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupCustomDrawerLayout()V
.line 1244
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerToggles()V
.line 1245
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->powerTogglesEnabledCallback()V
.line 1246
invoke-virtual/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->powerTogglesPreferencesButtonsTitlesCallback()V
Find
Code:
.method public refreshAllStatusBarIcons()V
Add these Methods above that
Code:
.method public powerTogglesEnabledCallback()V
.locals 3
.prologue
const/4 v2, 0x1
.line 109
iget-object v0, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v0
const-string v1, "power_toggles_enabled"
invoke-static {v0, v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v0
if-ne v0, v2, :cond_0
.line 112
const-string v0, "powerTogglesEnabledCallback"
const-string v1, "habilita"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 113
const/4 v0, 0x1
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->customDrawerLayoutEnabled(Z)V
.line 120
:goto_0
return-void
.line 117
:cond_0
const-string v0, "powerTogglesEnabledCallback"
const-string v1, "desabilita"
invoke-static {v0, v1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 118
const/4 v0, 0x0
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->customDrawerLayoutEnabled(Z)V
goto :goto_0
.end method
.method public powerTogglesPreferencesButtonsTitlesCallback()V
.locals 4
.prologue
.line 134
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
if-eqz v1, :cond_1
.line 136
const/4 v0, 0x0
.line 138
.local v0, "showTitles":Z
iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;
move-result-object v1
const-string v2, "power_toggles_preferences_buttons_titles"
const/4 v3, 0x0
invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I
move-result v1
const/4 v2, 0x1
if-ne v1, v2, :cond_0
.line 140
const/4 v0, 0x1
.line 144
:cond_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v1, v0}, Lcom/serajr/powertoggles/PowerToggles;->buttonShowTitle(Z)V
.line 145
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v1}, Lcom/serajr/powertoggles/PowerToggles;->setupPowerToggles()V
.line 146
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerToggles:Lcom/serajr/powertoggles/PowerToggles;
invoke-virtual {v1}, Lcom/serajr/powertoggles/PowerToggles;->updatePowerToggles()V
.line 149
.end local v0 # "showTitles":Z
:cond_1
return-void
.end method
Find
Code:
.method public destroy()V
Add this method above that
Code:
.method public customDrawerLayoutEnabled(Z)V
.locals 2
.param p1, "enabled" # Z
.prologue
.line 77
const/4 v0, 0x0
.line 79
.local v0, "lockMode":I
if-nez p1, :cond_0
.line 81
const/4 v0, 0x1
.line 85
:cond_0
iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mCustomDrawerLayout:Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;
invoke-virtual {v1, v0}, Lcom/serajr/systemui/navigationdrawer/CustomDrawerLayout;->setDrawerLockMode(I)V
.line 87
return-void
.end method
Save it
Open /res/layout/status_bar_expanded.xml or msim_status_bar_expanded(dual sim)
Add these Red Lines
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@android:color/transparent" android:layout_width="fill_parent" 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">
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" layout="@layout/subs_label" />
<include android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" layout="@layout/carrier_label" />
<include android:visibility="gone" android:layout_height="wrap_content" layout="@layout/keyguard_status_view" />
[COLOR="red"]<com.serajr.systemui.navigationdrawer.CustomDrawerLayout android:id="@id/custom_drawer_layout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="48.0dip">[/COLOR]
<include layout="@layout/somc_keyguard_voice_unlock_microphone_frame" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:padding="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/msim_status_bar_expanded_header" />
<com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer android:layout_gravity="center|top|clip_horizontal" android:id="@id/notification_container_parent" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.phone.ObservableScrollView android:layout_gravity="center|top|clip_horizontal" android:id="@id/scroll_view" android:scrollbars="none" android:layout_width="@dimen/notification_panel_width" android:layout_height="fill_parent" android:fillViewport="true" android:overScrollMode="never">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_bar_header_height_expanded" android:layout_marginStart="@dimen/notification_side_padding" android:layout_marginEnd="@dimen/notification_side_padding" layout="@layout/qs_panel" />
<View android:id="@id/reserve_notification_space" android:layout_width="fill_parent" android:layout_height="@dimen/min_stack_height" android:layout_marginTop="@dimen/notifications_top_padding" />
<View android:layout_width="fill_parent" android:layout_height="@dimen/notification_side_padding" />
</LinearLayout>
</com.android.systemui.statusbar.phone.ObservableScrollView>
<com.android.systemui.statusbar.stack.NotificationStackScrollLayout android:layout_gravity="center|top|clip_horizontal" android:id="@id/notification_stack_scroller" android:layout_width="@dimen/notification_panel_width" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap" />
<ViewStub android:layout_gravity="end" android:id="@id/keyguard_user_switcher" android:layout="@layout/keyguard_user_switcher" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="@dimen/status_bar_header_height_keyguard" />
<include android:visibility="invisible" layout="@layout/keyguard_status_bar" />
</com.android.systemui.statusbar.phone.NotificationsQuickSettingsContainer>
</FrameLayout>
[COLOR="red"]<LinearLayout android:layout_gravity="end" android:orientation="vertical" android:background="@color/custom_drawer_layout_bg" android:layout_width="@dimen/custom_drawer_layout_width" android:layout_height="fill_parent">
<TextView android:gravity="center" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/custom_drawer_layout_header_text" style="@style/power_toggles_text_appearance" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="0.0dip" android:layout_weight="1.0">
<com.serajr.powertoggles.PowerToggles android:id="@id/power_toggles" android:layout_width="fill_parent" android:layout_height="wrap_content" />
</FrameLayout>
</LinearLayout>
</com.serajr.systemui.navigationdrawer.CustomDrawerLayout>[/COLOR]
<include android:visibility="gone" layout="@layout/keyguard_bottom_area" />
<com.android.systemui.statusbar.AlphaOptimizedView android:layout_gravity="bottom" android:id="@id/qs_navbar_scrim" android:background="@drawable/qs_navbar_scrim" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="96.0dip" />
</com.android.systemui.statusbar.phone.NotificationPanelView>
-Save
-Recompile
-Sign
Final Part
Decompile Settings.apk
Open res/xml/display_settings.xml or (on your own xml)
Add
Code:
<com.sonymobile.settings.preference.IntentPreference android:key="power_toggles" settings:dependOnResource="true" settings:dependOnIsValidIntent="true" settings:hasMetaData="true">
<intent android:targetPackage="com.android.systemui" android:targetClass="com.serajr.powertoggles.preferences.PowerTogglesPreferencesActivity" />
</com.sonymobile.settings.preference.IntentPreference>
Done
-Recompile
-Sign
If you have are having problems then checkTHIS Post
Here is my SystemUI.apk(Z2) if you are too lazy to do these stuff
Screenshot
Credits
Master @serajr
@Nathan Ali Ashari
Reserved
Good bro
Nice guide will try it ?
Awesome masters lml
Thank you buddy!
It is always a pleasure to me seeing my work still being ported, and better yet seeing it been made with so such great mastery.
Hats off!
serajr said:
Thank you buddy!
It is always a pleasure to me seeing my work still being ported, and better yet seeing it been made with so such great mastery.
Hats off!
Click to expand...
Click to collapse
Thanks Master
Its work in my device cm 12.1 xperia L but toggle mobile data not work (fc) .. How to fix ? ?
Sent from my C2105 using XDA Free mobile app
Arga_Abidullah said:
Its work in my device cm 12.1 xperia L but toggle mobile data not work (fc) .. How to fix ? ?
Sent from my C2105 using XDA Free mobile app
Click to expand...
Click to collapse
Post logcat buddy
Or
Open /data/system/Dropbox/and post the latest system app crash txt
java.lang.NoSuchMethodError: No virtual method getMobileDataEnabled(Z)V in class Landroid/net/ConnectivityManager; or its super classes (declaration of 'android.net.ConnectivityManager' appears in /system/framework/framework.jar)
at com.serajr.powertoggles.buttons.MobileData.toggleState(MobileData.java:98)
at com.serajr.powertoggles.PowerTogglesButton$1.onClick(PowerTogglesButton.java:175)
at android.view.View.performClick(View.java:4789)
at android.view.View$PerformClick.run(View.java:19881)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5291)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)
Sent from my C2105 using XDA Free mobile app
Hi
I have tried this in my Z2. Followed tut as per OP. No errors. Done all things correctly.. But after replace SystemUI and reboot i got blank screen. Then tried ur SystemUI apk. Same result.. I have fully super deodexed stock Z2 rom.. Any help.. ?
Rajeev said:
Hi
I have tried this in my Z2. Followed tut as per OP. No errors. Done all things correctly.. But after replace SystemUI and reboot i got blank screen. Then tried ur SystemUI apk. Same result.. I have fully super deodexed stock Z2 rom.. Any help.. ?
Click to expand...
Click to collapse
me too, i´m glad that this issue happens to a experienced dev too
thought it was my fault ...
@Rajeev
it seems that spuris Z2 arrived ... great
Rajeev said:
Hi
I have tried this in my Z2. Followed tut as per OP. No errors. Done all things correctly.. But after replace SystemUI and reboot i got blank screen. Then tried ur SystemUI apk. Same result.. I have fully super deodexed stock Z2 rom.. Any help.. ?
Click to expand...
Click to collapse
Yes same result here bro @Rajeev on my Z3
Tried it today.... No luck, black screen ><"
Pandemic said:
Yes same result here bro @Rajeev on my Z3
Tried it today.... No luck, black screen ><"
Click to expand...
Click to collapse
moonryder said:
me too, i´m glad that this issue happens to a experienced dev too
thought it was my fault ...
@Rajeev
it seems that spuris Z2 arrived ... great
Click to expand...
Click to collapse
Yes. Hope that OP will find the issue and update his tutorial. Its a very good one for us..
Rajeev said:
Yes. Hope that OP will find the issue and update his tutorial. Its a very good one for us..
Click to expand...
Click to collapse
Pandemic said:
Yes same result here bro @Rajeev on my Z3
Tried it today.... No luck, black screen ><"
Click to expand...
Click to collapse
Logs please?
Gaurav007 said:
Logs please?
Click to expand...
Click to collapse
I have tired ur shared SystemUI apk too.. Same results.. In my Z2..
Rajeev said:
I have tired ur shared SystemUI apk too.. Same results.. In my Z2..
Click to expand...
Click to collapse
Bro 2-3 people told me it works
If you can send me logcat then I can check what is the problem
Or
You can open /data/system/Dropbox/
Here you'll find all crash reports
Post the latest system_app_crash.txt
Xperia Z2
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?