In this guide , I will tell "How to add Battery Bar" option in Settings.
Tested this option on Android 4.2 and 4.4
REQUIREMENTS :
1. Brain
2. Apktool
3. Notepad ++
4. Knowledge on How to Decompile/Recompile the apk
Lets start ,
NOTE : Those are not having the "colorpicker" folder in Settings/smali/net/margaritov/preference and having any other colorpicker in different location then open the "battery_bar_prefs" and edit this line by changing the path of colorpicker in this line.
PHP:
<net.margaritov.preference.colorpicker.ColorPickerPreference android:title="@string/battery_bar_color" android:key="battery_bar_color" android:defaultValue="\#ffffff" alphaSlider="true" />
Those who are not having any color picker , first add that using guide whose link is given below.
http://forum.xda-developers.com/and...r-settings-t3176597/post62282065#post62282065
Settings.apk Modding
1. First Decompile your Settings.apk and merge the files (given below).
2. Now add this line in display_settings.xml or any other xml present in Settings.apk/res/xml.
PHP:
<PreferenceScreen android:title="@string/battery_bar_title" android:key="battery_bar" android:summary="@string/battery_bar_summary" android:fragment="com.android.settings.gurpreet.batterybar.BatteryBarStyle" />
3. Now open strings.xml and add these lines above </resources>.
PHP:
<string name="battery_bar_title">Battery Bar</string>
<string name="battery_bar_summary">Enable the battery bar option in statusbar</string>
<string name="battery_bar">Battery bar location</string>
<string name="battery_bar_color">Battery bar color</string>
<string name="battery_bar_cat">Battery bar style</string>
<string name="battery_bar_style_title">Battery bar alignment</string>
<string name="battery_bar_thickness_title">Battery bar thickness</string>
<string name="battery_bar_animate_title">Charging animation</string>
<string name="battery_bar_animate_summary">The charging animation may result in a poor user experience. Enable at your own discretion.</string>
4. Now open array.xml and add these lines above </resources>.
PHP:
<string-array name="battery_bar_entries">
<item>Hide</item>
<item>Statusbar</item>
<item>Top of navbar</item>
<item>Bottom of navbar</item>
</string-array>
<string-array name="battery_bar_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<string-array name="battery_bar_style_entries">
<item>Regular</item>
<item>Center-mirrored</item>
</string-array>
<string-array name="battery_bar_style_values">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="battery_bar_thickness_entries">
<item>1 dp</item>
<item>2 dp</item>
<item>3 dp</item>
<item>4 dp</item>
</string-array>
<string-array name="battery_bar_thickness_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
5. Now Recompile your Settings.apk , Sign it and again Decompile it.
6. Now open BatteryBarStyle.smali and replace the ids with the ids present in public.xml of your Settings.apk
0x7f06005e
PHP:
<public type="xml" name="battery_bar_prefs"
0x7f020103
PHP:
<public type="drawable" name="ic_settings_batterybar"
SystemUI.apk Modding
1. First Decompile your SystemUI.apk and merge the files inside it (given below).
2. Now go to SystemUI.apk\res\layout\gemini_status_bar.xml and open it. Now Find these lines ,
PHP:
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Now add this line between the above lines like this ,
PHP:
<com.android.systemui.statusbar.policy.BatteryBarController android:layout_width="fill_parent" android:layout_height="1.0dip" systemui:viewLocation="1" />
The final will look like this ,
PHP:
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.policy.BatteryBarController android:layout_width="fill_parent" android:layout_height="1.0dip" systemui:viewLocation="1" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
3. Now go to SystemUI.apk\res\layout\navigation_bar.xml and open it. Find this line ,
PHP:
<FrameLayout android:id="@id/rot0" android:layout_width="fill_parent" android:layout_height="fill_parent">
Now add these lines below the above line ,
PHP:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentTop="true" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentBottom="true" systemui:viewLocation="3" />
</RelativeLayout>
The final will look like this ,
PHP:
<FrameLayout android:id="@id/rot0" android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentTop="true" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentBottom="true" systemui:viewLocation="3" />
</RelativeLayout>
Now again find this line ,
PHP:
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
Now add these lines below the above line ,
PHP:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true" android:rotation="180.0" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" android:rotation="180.0" systemui:viewLocation="3" />
</RelativeLayout>
The final will look like this ,
PHP:
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true" android:rotation="180.0" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" android:rotation="180.0" systemui:viewLocation="3" />
</RelativeLayout>
Do this same with all navigation_bar.xml present in other layout folders.
4. Now go to SystemUI.apk\res\values\attrs.xml and open it. Now add this above </resources>.
PHP:
<attr name="viewLocation" format="integer" />
5. Now go to smali\com\android\systemui\statusbar\policy\Prefs.smali and open that. Then find this method ,
HTML:
.method public static edit(Landroid/content/Context;)Landroid/content/SharedPreferences$Editor;
Now add this method below the above method ,
HTML:
.method public static getLastBatteryLevel(Landroid/content/Context;)I
.locals 3
.param p0, "context" # Landroid/content/Context;
.prologue
.line 48
invoke-static {p0}, Lcom/android/systemui/statusbar/policy/Prefs;->read(Landroid/content/Context;)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "last_battery_level"
const/16 v2, 0x32
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
Now again find this method ,
HTML:
.method public static read(Landroid/content/Context;)Landroid/content/SharedPreferences;
Now add this method below the above method ,
HTML:
.method public static setLastBatteryLevel(Landroid/content/Context;I)V
.locals 2
.param p0, "context" # Landroid/content/Context;
.param p1, "level" # I
.prologue
.line 44
invoke-static {p0}, Lcom/android/systemui/statusbar/policy/Prefs;->edit(Landroid/content/Context;)Landroid/content/SharedPreferences$Editor;
move-result-object v0
const-string v1, "last_battery_level"
invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
.line 45
return-void
.end method
6. Now go to smali\com\android\systemui\R$styleable.smali and open that. Then find this line ,
HTML:
# static fields
Now add this line below the above line ,
HTML:
.field public static final BatteryBarController:[I
Now again find these lines ,
HTML:
.method static constructor <clinit>()V
.locals 4
.prologue
const/4 v3, 0x1
const/4 v2, 0x0
Now add these lines below this "const/4 v2, 0x0" line ,
HTML:
new-array v0, v3, [I
const v1, 0x7f01000c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryBarController:[I
The final will look like this ,
HTML:
.method static constructor <clinit>()V
.locals 4
.prologue
const/4 v3, 0x1
const/4 v2, 0x0
new-array v0, v3, [I
const v1, 0x7f01000c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryBarController:[I
7. Now Recompile your SystemUI.apk , sign it and again Decompile it.
8. Now open R$styleable.smali and replace the id with the id present in public.xml of your SystemUI.apk
0x7f01000c
PHP:
<public type="attr" name="viewLocation"
Special Thanks To :
1. DU_Flo ROM (Extracted from this ROM)
2. MAAaD
3. XDA
Screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
very nice bro . i am going to add .
Great work :good: already added in my rom
for ldpi devices,should we change the hdpi folder in the zip file to ldpi or we should leave it as it is?
05Gurpreet said:
In this guide , I will tell "How to add Battery Bar" option in Settings.
Tested this option on Android 4.2 and 4.4
REQUIREMENTS :
1. Brain
2. Apktool
3. Notepad ++
4. Knowledge on How to Decompile/Recompile the apk
Lets start ,
NOTE : Those are not having the "colorpicker" folder in Settings/smali/net/margaritov/preference and having any other colorpicker in different location then open the "battery_bar_prefs" and edit this line by changing the path of colorpicker in this line.
PHP:
<net.margaritov.preference.colorpicker.ColorPickerPreference android:title="@string/battery_bar_color" android:key="battery_bar_color" android:defaultValue="\#ffffff" alphaSlider="true" />
Those who are not having any color picker , first add that and then try this guide.
Settings.apk Modding
1. First Decompile your Settings.apk and merge the files (given below).
2. Now add this line in display_settings.xml or any other xml present in Settings.apk/res/xml.
PHP:
<PreferenceScreen android:title="@string/battery_bar_title" android:key="battery_bar" android:summary="@string/battery_bar_summary" android:fragment="com.android.settings.gurpreet.batterybar.BatteryBarStyle" />
3. Now open strings.xml and add these lines above </resources>.
PHP:
<string name="battery_bar_title">Battery Bar</string>
<string name="battery_bar_summary">Enable the battery bar option in statusbar</string>
<string name="battery_bar">Battery bar location</string>
<string name="battery_bar_color">Battery bar color</string>
<string name="battery_bar_cat">Battery bar style</string>
<string name="battery_bar_style_title">Battery bar alignment</string>
<string name="battery_bar_thickness_title">Battery bar thickness</string>
<string name="battery_bar_animate_title">Charging animation</string>
<string name="battery_bar_animate_summary">The charging animation may result in a poor user experience. Enable at your own discretion.</string>
4. Now open array.xml and add these lines above </resources>.
PHP:
<string-array name="battery_bar_entries">
<item>Hide</item>
<item>Statusbar</item>
<item>Top of navbar</item>
<item>Bottom of navbar</item>
</string-array>
<string-array name="battery_bar_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<string-array name="battery_bar_style_entries">
<item>Regular</item>
<item>Center-mirrored</item>
</string-array>
<string-array name="battery_bar_style_values">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="battery_bar_thickness_entries">
<item>1 dp</item>
<item>2 dp</item>
<item>3 dp</item>
<item>4 dp</item>
</string-array>
<string-array name="battery_bar_thickness_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
5. Now Recompile your Settings.apk , Sign it and again Decompile it.
6. Now open BatteryBarStyle.smali and replace the ids with the ids present in public.xml of your Settings.apk
0x7f06005e
PHP:
<public type="xml" name="battery_bar_prefs"
0x7f020103
PHP:
<public type="drawable" name="ic_settings_batterybar"
SystemUI.apk Modding
1. First Decompile your SystemUI.apk and merge the files inside it (given below).
2. Now go to SystemUI.apk\res\layout\gemini_status_bar.xml and open it. Now Find these lines ,
PHP:
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Now add this line between the above lines like this ,
PHP:
<com.android.systemui.statusbar.policy.BatteryBarController android:layout_width="fill_parent" android:layout_height="1.0dip" systemui:viewLocation="1" />
The final will look like this ,
PHP:
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.policy.BatteryBarController android:layout_width="fill_parent" android:layout_height="1.0dip" systemui:viewLocation="1" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
3. Now go to SystemUI.apk\res\layout\navigation_bar.xml and open it. Find this line ,
PHP:
<FrameLayout android:id="@id/rot0" android:layout_width="fill_parent" android:layout_height="fill_parent">
Now add these lines below the above line ,
PHP:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentTop="true" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentBottom="true" systemui:viewLocation="3" />
</RelativeLayout>
The final will look like this ,
PHP:
<FrameLayout android:id="@id/rot0" android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentTop="true" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentBottom="true" systemui:viewLocation="3" />
</RelativeLayout>
Now again find this line ,
PHP:
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
Now add these lines below the above line ,
PHP:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true" android:rotation="180.0" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" android:rotation="180.0" systemui:viewLocation="3" />
</RelativeLayout>
The final will look like this ,
PHP:
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true" android:rotation="180.0" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" android:rotation="180.0" systemui:viewLocation="3" />
</RelativeLayout>
Do this same with all navigation_bar.xml present in other layout folders.
4. Now go to SystemUI.apk\res\values\attrs.xml and open it. Now add this above </resources>.
PHP:
<attr name="viewLocation" format="integer" />
5. Now go to smali\com\android\systemui\statusbar\policy\Prefs.smali and open that. Then find this method ,
HTML:
.method public static edit(Landroid/content/Context;)Landroid/content/SharedPreferences$Editor;
Now add this method below the above method ,
HTML:
.method public static getLastBatteryLevel(Landroid/content/Context;)I
.locals 3
.param p0, "context" # Landroid/content/Context;
.prologue
.line 48
invoke-static {p0}, Lcom/android/systemui/statusbar/policy/Prefs;->read(Landroid/content/Context;)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "last_battery_level"
const/16 v2, 0x32
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
Now again find this method ,
HTML:
.method public static read(Landroid/content/Context;)Landroid/content/SharedPreferences;
Now add this method below the above method ,
HTML:
.method public static setLastBatteryLevel(Landroid/content/Context;I)V
.locals 2
.param p0, "context" # Landroid/content/Context;
.param p1, "level" # I
.prologue
.line 44
invoke-static {p0}, Lcom/android/systemui/statusbar/policy/Prefs;->edit(Landroid/content/Context;)Landroid/content/SharedPreferences$Editor;
move-result-object v0
const-string v1, "last_battery_level"
invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
.line 45
return-void
.end method
6. Now go to smali\com\android\systemui\R$styleable.smali and open that. Then find this line ,
HTML:
# static fields
Now add this line below the above line ,
HTML:
.field public static final BatteryBarController:[I
Now again find these lines ,
HTML:
.method static constructor <clinit>()V
.locals 4
.prologue
const/4 v3, 0x1
const/4 v2, 0x0
Now add these lines below this "const/4 v2, 0x0" line ,
HTML:
new-array v0, v3, [I
const v1, 0x7f01000c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryBarController:[I
The final will look like this ,
HTML:
.method static constructor <clinit>()V
.locals 4
.prologue
const/4 v3, 0x1
const/4 v2, 0x0
new-array v0, v3, [I
const v1, 0x7f01000c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryBarController:[I
7. Now Recompile your SystemUI.apk , sign it and again Decompile it.
8. Now open R$styleable.smali and replace the id with the id present in public.xml of your SystemUI.apk
0x7f01000c
PHP:
<public type="attr" name="viewLocation"
Special Thanks To :
1. DU_Flo ROM (Extracted from this ROM)
2. MAAaD
3. XDA
Click to expand...
Click to collapse
Awesome Guide Gurpreet Bro!! I request you to please make threads of all your awesom guides! Your all guides are just amazing!!
Regards @dark_optimistic
Vipul Jha
Awesome Guide Bro Thanks
Droidbuster said:
very nice bro . i am going to add .
Click to expand...
Click to collapse
Thanks Brother
itsraj011 said:
Great work :good: already added in my rom
Click to expand...
Click to collapse
Thanks
qromwel said:
for ldpi devices,should we change the hdpi folder in the zip file to ldpi or we should leave it as it is?
Click to expand...
Click to collapse
You have to rezsize the png to Idpi , then add that in drawable-Idpi folder.
dark_optimistic said:
Awesome Guide Gurpreet Bro!! I request you to please make threads of all your awesom guides! Your all guides are just amazing!!
Regards @dark_optimistic
Vipul Jha
Click to expand...
Click to collapse
Thanks brother. About guides , I will try my best.
Rohit Gupta @123 said:
Awesome Guide Bro Thanks
Click to expand...
Click to collapse
Welcome brother.
05Gurpreet said:
Thanks brother. About guides , I will try my best.
Click to expand...
Click to collapse
Thanks bro!! Please post as soon as possible!
I don't have Prefs.smali in SystemUI\smali\com\android\systemui\statusbar\policy on CM11 = SystemUI FC
05Gurpreet said:
In this guide , I will tell "How to add Battery Bar" option in Settings.
Tested this option on Android 4.2 and 4.4
REQUIREMENTS :
1. Brain
2. Apktool
3. Notepad ++
4. Knowledge on How to Decompile/Recompile the apk
Lets start ,
NOTE : Those are not having the "colorpicker" folder in Settings/smali/net/margaritov/preference and having any other colorpicker in different location then open the "battery_bar_prefs" and edit this line by changing the path of colorpicker in this line.
PHP:
<net.margaritov.preference.colorpicker.ColorPickerPreference android:title="@string/battery_bar_color" android:key="battery_bar_color" android:defaultValue="\#ffffff" alphaSlider="true" />
Those who are not having any color picker , first add that using guide whose link is given below.
http://forum.xda-developers.com/and...r-settings-t3176597/post62282065#post62282065
Settings.apk Modding
1. First Decompile your Settings.apk and merge the files (given below).
2. Now add this line in display_settings.xml or any other xml present in Settings.apk/res/xml.
PHP:
<PreferenceScreen android:title="@string/battery_bar_title" android:key="battery_bar" android:summary="@string/battery_bar_summary" android:fragment="com.android.settings.gurpreet.batterybar.BatteryBarStyle" />
3. Now open strings.xml and add these lines above </resources>.
PHP:
<string name="battery_bar_title">Battery Bar</string>
<string name="battery_bar_summary">Enable the battery bar option in statusbar</string>
<string name="battery_bar">Battery bar location</string>
<string name="battery_bar_color">Battery bar color</string>
<string name="battery_bar_cat">Battery bar style</string>
<string name="battery_bar_style_title">Battery bar alignment</string>
<string name="battery_bar_thickness_title">Battery bar thickness</string>
<string name="battery_bar_animate_title">Charging animation</string>
<string name="battery_bar_animate_summary">The charging animation may result in a poor user experience. Enable at your own discretion.</string>
4. Now open array.xml and add these lines above </resources>.
PHP:
<string-array name="battery_bar_entries">
<item>Hide</item>
<item>Statusbar</item>
<item>Top of navbar</item>
<item>Bottom of navbar</item>
</string-array>
<string-array name="battery_bar_values">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
<string-array name="battery_bar_style_entries">
<item>Regular</item>
<item>Center-mirrored</item>
</string-array>
<string-array name="battery_bar_style_values">
<item>0</item>
<item>1</item>
</string-array>
<string-array name="battery_bar_thickness_entries">
<item>1 dp</item>
<item>2 dp</item>
<item>3 dp</item>
<item>4 dp</item>
</string-array>
<string-array name="battery_bar_thickness_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
</string-array>
5. Now Recompile your Settings.apk , Sign it and again Decompile it.
6. Now open BatteryBarStyle.smali and replace the ids with the ids present in public.xml of your Settings.apk
0x7f06005e
PHP:
<public type="xml" name="battery_bar_prefs"
0x7f020103
PHP:
<public type="drawable" name="ic_settings_batterybar"
SystemUI.apk Modding
1. First Decompile your SystemUI.apk and merge the files inside it (given below).
2. Now go to SystemUI.apk\res\layout\gemini_status_bar.xml and open it. Now Find these lines ,
PHP:
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Now add this line between the above lines like this ,
PHP:
<com.android.systemui.statusbar.policy.BatteryBarController android:layout_width="fill_parent" android:layout_height="1.0dip" systemui:viewLocation="1" />
The final will look like this ,
PHP:
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.policy.BatteryBarController android:layout_width="fill_parent" android:layout_height="1.0dip" systemui:viewLocation="1" />
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
3. Now go to SystemUI.apk\res\layout\navigation_bar.xml and open it. Find this line ,
PHP:
<FrameLayout android:id="@id/rot0" android:layout_width="fill_parent" android:layout_height="fill_parent">
Now add these lines below the above line ,
PHP:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentTop="true" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentBottom="true" systemui:viewLocation="3" />
</RelativeLayout>
The final will look like this ,
PHP:
<FrameLayout android:id="@id/rot0" android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentTop="true" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:visibility="gone" android:layout_width="fill_parent" android:layout_height="1.0dip" android:layout_alignParentBottom="true" systemui:viewLocation="3" />
</RelativeLayout>
Now again find this line ,
PHP:
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
Now add these lines below the above line ,
PHP:
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true" android:rotation="180.0" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" android:rotation="180.0" systemui:viewLocation="3" />
</RelativeLayout>
The final will look like this ,
PHP:
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<RelativeLayout android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentLeft="true" android:rotation="180.0" systemui:viewLocation="2" />
<com.android.systemui.statusbar.policy.BatteryBarController android:orientation="vertical" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" android:rotation="180.0" systemui:viewLocation="3" />
</RelativeLayout>
Do this same with all navigation_bar.xml present in other layout folders.
4. Now go to SystemUI.apk\res\values\attrs.xml and open it. Now add this above </resources>.
PHP:
<attr name="viewLocation" format="integer" />
5. Now go to smali\com\android\systemui\statusbar\policy\Prefs.smali and open that. Then find this method ,
HTML:
.method public static edit(Landroid/content/Context;)Landroid/content/SharedPreferences$Editor;
Now add this method below the above method ,
HTML:
.method public static getLastBatteryLevel(Landroid/content/Context;)I
.locals 3
.param p0, "context" # Landroid/content/Context;
.prologue
.line 48
invoke-static {p0}, Lcom/android/systemui/statusbar/policy/Prefs;->read(Landroid/content/Context;)Landroid/content/SharedPreferences;
move-result-object v0
const-string v1, "last_battery_level"
const/16 v2, 0x32
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
move-result v0
return v0
.end method
Now again find this method ,
HTML:
.method public static read(Landroid/content/Context;)Landroid/content/SharedPreferences;
Now add this method below the above method ,
HTML:
.method public static setLastBatteryLevel(Landroid/content/Context;I)V
.locals 2
.param p0, "context" # Landroid/content/Context;
.param p1, "level" # I
.prologue
.line 44
invoke-static {p0}, Lcom/android/systemui/statusbar/policy/Prefs;->edit(Landroid/content/Context;)Landroid/content/SharedPreferences$Editor;
move-result-object v0
const-string v1, "last_battery_level"
invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
move-result-object v0
invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z
.line 45
return-void
.end method
6. Now go to smali\com\android\systemui\R$styleable.smali and open that. Then find this line ,
HTML:
# static fields
Now add this line below the above line ,
HTML:
.field public static final BatteryBarController:[I
Now again find these lines ,
HTML:
.method static constructor <clinit>()V
.locals 4
.prologue
const/4 v3, 0x1
const/4 v2, 0x0
Now add these lines below this "const/4 v2, 0x0" line ,
HTML:
new-array v0, v3, [I
const v1, 0x7f01000c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryBarController:[I
The final will look like this ,
HTML:
.method static constructor <clinit>()V
.locals 4
.prologue
const/4 v3, 0x1
const/4 v2, 0x0
new-array v0, v3, [I
const v1, 0x7f01000c
aput v1, v0, v2
sput-object v0, Lcom/android/systemui/R$styleable;->BatteryBarController:[I
7. Now Recompile your SystemUI.apk , sign it and again Decompile it.
8. Now open R$styleable.smali and replace the id with the id present in public.xml of your SystemUI.apk
0x7f01000c
PHP:
<public type="attr" name="viewLocation"
Special Thanks To :
1. DU_Flo ROM (Extracted from this ROM)
2. MAAaD
3. XDA
Click to expand...
Click to collapse
In top & bottom of nav bars not working..
Related
How to add 4.2.2 Statusbar to youre GingerBread rom
In this guide i will show u how to add 4.2.2 statusbar
Note:!!!!!!! If u are new to modifying apps Dont try this Please.. u must know how to mod first before u gonna try as u will definetly end up in some errors or possible FCs
Read the thread/OP/first 1/2 posts FULLY! if u dont read it fully i wont provide support as u are to lazy to even read in the first place. if u read full 1st page i can help u
do add logcats if FC * how to do this is also described here!*.
I will NOT HELP if u not take time and try to attempt some stuff before u ask me! Thanks
Ok now we are going to modify the
Status_bar_Tracking.xml
Make it look like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.TrackingView android:orientation="vertical" android:background="#ff171b1e" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:paddingBottom="0.0px" android:focusable="true" android:visibility="gone" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<View android:background="#00000000" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0" />
<com.android.systemui.statusbar.CarrierLabel android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textSize="16.0sp" android:textColor="#00000000" android:gravity="center" android:layout_gravity="bottom" android:background="#00000000" android:layout_width="fill_parent" android:layout_height="24.0dip" />
<com.android.systemui.statusbar.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:background="#ffdf7c0d" android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="32.0dip">
<ImageView android:focusable="true" android:clickable="true" android:layout_width="fill_parent" android:layout_height="32.0dip" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
</com.android.systemui.statusbar.CloseDragHandle>
</com.android.systemui.statusbar.TrackingView>
Next is
Statusbar.xm
abovel
Code:
com.android.systemui.statusbar.IconMerger
u will see something likes this
Code:
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons"
Make sure the Android:[email protected]/icons"is present
make sure the above looks now like this
Code:
[B][COLOR="RoyalBlue"]<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">[/COLOR][/B]
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<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" />
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#ffffffff" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
[COLOR="RoyalBlue"][B] </com.android.systemui.statusbar.StatusBarServiceLRPull>[/B][/COLOR]
So it will look like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="#ff000000" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
[COLOR="RoyalBlue"][B] <com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">[/B][/COLOR]
<LinearLayout android:gravity="center" android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<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" />
<com.android.systemui.statusbar.Clock android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#ffffffff" android:gravity="center" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
[B][COLOR="RoyalBlue"] </com.android.systemui.statusbar.StatusBarServiceLRPull>[/COLOR][/B]
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginRight="8.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="25.0dip" android:layout_height="25.0dip" />
</ImageSwitcher>
<com.android.systemui.statusbar.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:textColor="#ffffffff" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@*android:style/TextAppearance.StatusBar.Ticker" android:textColor="#ffffffff" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.TickerView>
</LinearLayout>
<com.android.systemui.statusbar.DateView android:background="#ff000000" android:textAppearance="@*android:style/TextAppearance.StatusBar.Icon" android:textColor="#00000000" android:gravity="left|center" android:id="@id/date" android:background="#00000000" android:paddingLeft="0.0px" android:paddingRight="0.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</com.android.systemui.statusbar.StatusBarView>
Now we are going to modify
Status_bar_expanded.xml
Make sure it looks something like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants" android:layout_alignParentTop="true" style="@*android:style/Theme.NoTitleBar.Fullscreen"
xmlns:android="http://schemas.android.com/apk/res/android">
[B][COLOR="RoyalBlue"]<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content" android:baselineAligned="false">
<include layout="@layout/jb_headerview" android:id="@id/spaceybeaneyheader" android:layout_width="fill_parent" android:layout_height="48.0dip" />
</RelativeLayout>[/COLOR][/B]
[COLOR="RoyalBlue"][B] <com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>[/B][/COLOR]
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<ScrollView android:id="@id/scroll" android:scrollbars="none" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.NotificationLinearLayout android:orientation="vertical" android:id="@id/notificationLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="6.0dip">
<TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/noNotificationsTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" android:text="@string/status_bar_no_notifications_title" />
<TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/ongoingTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" android:text="@string/status_bar_ongoing_events_title" />
<LinearLayout android:orientation="vertical" android:id="@id/ongoingItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<RelativeLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="wrap_content">
<TextView android:textSize="17.0sp" android:textStyle="normal" android:textColor="#ffffffff" android:id="@id/latestTitle" android:background="@drawable/quickpanel_title_background" android:paddingLeft="5.0dip" android:layout_width="fill_parent" android:layout_height="26.0dip" android:text="@string/status_bar_latest_events_title" />
<Button android:textSize="16.0sp" android:textColor="#ffadc1d6" android:gravity="center" android:id="@id/clear_all_button" android:background="@drawable/tw_btn_default_small" android:padding="0.100000024dip" android:focusable="true" android:clickable="true" android:layout_width="@dimen/status_bar_expanded_clear_button_width" android:layout_height="fill_parent" android:layout_marginRight="4.0dip" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" style="@style/S3.Clear" />
</RelativeLayout>
<LinearLayout android:orientation="vertical" android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<ImageView android:layout_width="fill_parent" android:layout_height="wrap_content" android:src="@drawable/blank" />
</com.android.systemui.statusbar.NotificationLinearLayout>
</ScrollView>
<ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
[B][COLOR="RoyalBlue"] </com.spacecaker.SpaceLayOut>[/COLOR][/B]
</com.android.systemui.statusbar.ExpandedView>
What i have done is adding new
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
</com.spacecaker.SpaceLayOut>
lines + use other xml to load Quickpanel and JB header
to make it look much cleaner
Now we are going to
res/values/ids.xml
and we are going to add these ids
Code:
<item type="id" name="spaceybeaneyheader">false</item>
<item type="id" name="settings_button">false</item>
<item type="id" name="jbclock">false</item>
<item type="id" name="spacebuttonburst">false</item>
<item type="id" name="recent_app_button">false</item>
Now go to
res/values/strings.xml and we add these lines
Code:
<string name="accessibility_clear_all">Clear</string>
<string name="accessibility_settings_button">System settings.</string>
<string name="status_bar_date_formatter">"%1$s
%2$s"</string>
Now go to
res/values/Styles.xml
and add
this to the end of file
Code:
<style name="S3.Clear" parent="@*android:style/Widget.Button">
<item name="android:textAppearance">?android:textAppearanceSmallInverse</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/tw_btn_default_small</item>
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
</style>
now add a dimens.xml or edit ur dimens.xml
and add this line
Code:
<dimen name="status_bar_expanded_notification_clear_button_text_size">17.0dip</dimen>
<dimen name="status_bar_expanded_notification_category_text_size">17.0dip</dimen>
<dimen name="status_bar_expanded_clear_button_width">123.0dip</dimen>
Now add all the Files i have given in the attachement *Space_Adds.zip*
and compile the apk
if u get a error do describe it in xda post so i can help u to fix
Now delete the Directory of ur decompiled apk
and
Decompiled the apk again * this is for the public IDS * sothey are added
Now
go to
res/values/public.xml and find these
Code:
<public type="drawable" name="btn_tg"
<public type="drawable" name="btn_toggles_normal"
Now goto
smali/com/spacecaker/ButtonBurst.smali
and find this
Code:
const v3, 0x7f020180
change it to the Public ID code u got from
Code:
<public type="drawable" name="btn_toggles_normal"
Now find this
Code:
const v3, 0x7f02017f
change it to the public id u got from
Code:
<public type="drawable" name="btn_tg"
now goto smali\com\android\systemui\statusbar\policy.dateview.smali
and find this
Code:
const v4, 0x[COLOR="Magenta"]7f07002a[/COLOR]
change the colored part to the public id u got from
Code:
<public type="string" name="status_bar_date_formatter"
and now We are done for this part
now lets add the
Settings
Display
and
Prof/Contact button
goto
smali/com/android/systemui/statusbar/StatusBarService.smali
find
Code:
.method public addIcon
and above it add these
Code:
.method public BrightnessButton(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;
[COLOR="Magenta"][I]const-string v2, "android.settings.DISPLAY_SETTINGS"[/I][/COLOR]
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
.method public ProfileButton(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;
[COLOR="Magenta"][I] const-string v2, "com.android.contacts.action.LIST_DEFAULT"[/I][/COLOR]
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
.method public SpaceCakerButton(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;
[COLOR="Magenta"][I]const-string v2, "android.settings.SETTINGS"[/I][/COLOR]
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
now compile the apk and it should work now
if u port the UI to non samsung device do use this layout xml http://forum.xda-developers.com/showpost.php?p=42702913&postcount=59
if it doesn't work please take a logcat * A full logcat with ADB and not with catlog or logcat apps on phone if preferable use this command adb logcat -v long > logcat.txt this way i can help also dont cut the logcat just keep it full as there are more parts that are needed to see instead of only a E/androidruntime error
Special Thanks to
Matz69
DCSMS
auliaYF
marinalin
and everyone who helped
SpaceCaker
if i am missing credits or whatsoever PM me and i will set
Tutorial for adding new toggles
How to add new toggles ?
As u can see i highlighted some stuff with pink color
Code:
[COLOR="Magenta"][I]const-string v2, "android.settings.DISPLAY_SETTINGS"[/I][/COLOR]
As u can see it has this tag inside
Code:
android.settings.DISPLAY_SETTINGS
this is the package/action name of a app / option inside settings.apk
u can change this to any thin u want like
taskmanager it will be like this
Code:
const-string v2, "com.sec.android.app.controlpanel.MAIN"
now if u add it to a new Onclick method it will look like this
Code:
[COLOR="RoyalBlue"].method public TaskManagerButtonSpaceTutorial[/COLOR](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;
[COLOR="RoyalBlue"]const-string v2, "com.sec.android.app.controlpanel.MAIN[/COLOR]"
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
this is a new method
of course it wont work yet as u need to add it to the layout
goto res/layout/quickpanel_quick_settings_space.xml
add something like this
Code:
<FrameLayout android:id="@id/settings_button" android:background= [user=3944923]@drawab[/user]le/tile_toggle" android:layout_width="106.0px" android:layout_height="100.0px" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" [COLOR="Red"]android:src= [user=3944923]@drawab[/user]le/taskmanagerpng" [/COLOR][COLOR="Red"]android:onClick="TaskManagerButtonSpaceTutorial"[/COLOR] />
<TextView android:textSize="12.0dip" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom" android:background="#00000000" android:layout_width="106.0px" android:layout_height="wrap_content" android:layout_marginBottom="15.0px" [COLOR="Red"]android:text="TaskManager"[/COLOR] />
</FrameLayout>
the red stuff u need to edit to the app/ icon / text /
Code:
.method public TaskManagerButtonSpaceTutorial
u used
@drawable/taskmanagerpng u need to add a png that has the name taskmanagerpng to drawable-mdpi
Code:
android:onClick="[COLOR="Magenta"]TaskManagerButtonSpaceTutorial[/COLOR]"
noticed the pink part ?
this is the text i used after .method public
this makes the button actually work
And ofcourse
Code:
android:text="[COLOR="Magenta"]TaskManager[/COLOR]"
this is what the text needs to say under the app
Screenshots
Note these are form Galaxy Acei
and has a Brightness Panel and Taking Care of Lidroid * i did NOT include it in this tut yet *
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Another Note:
i cant help without logcat
also please take some time
compare and try and error
this isnt a easy guide or easy to do so take time.
i dont wanna waste time by doing it all for you, i have my own timeaswell
First.... Great Guide mate :good: . maybe i will update my TouchWiz Nature S theme
ibanez7 said:
First.... Great Guide mate :good: . maybe i will update my TouchWiz Nature S theme
Click to expand...
Click to collapse
btw thanks for ur dialer source it fixed my popups
also if u have hdpi phone u need to edit the width and height inside quickpanelspace.xml
otherwise it looks small
Sent from my S500 using xda app-developers app
plzz....port to cm7.....
Thanks!
Very Nice
hello rob! long time no see...
any way to do this on 4.1.2 ?
x-dira said:
plzz....port to cm7.....
Thanks!
Click to expand...
Click to collapse
can be possible will try to convert the stuff to cm7 i know its possible but lots of layouts are different but it will work
Sent from my S500 using xda app-developers app
Bilgets said:
hello rob! long time no see...
any way to do this on 4.1.2 ?
Click to expand...
Click to collapse
i had done this once on ICS but the Notifications Werent going to where they needed to go
they where always overlapping or not showing but it can be possible
with some time but i dont have Any phone withc4.1.2
Sent from my S500 using xda app-developers app
SpaceCaker said:
i had done this once on ICS but the Notifications Werent going to where they needed to go
they where always overlapping or not showing but it can be possible
with some time but i dont have Any phone withc4.1.2
Sent from my S500 using xda app-developers app
Click to expand...
Click to collapse
isnt the CM10 available on SGA?
Bilgets said:
isnt the CM10 available on SGA?
Click to expand...
Click to collapse
yes but it has tons of bugs because the devs have moved to cm10.1
Sent from my S500 using xda app-developers app
hmm i see...
sorry for wasting your time..
very nice:
tip: when porting to cm7, try to make two designs: touchwiz and aosp.
PS: why dont you put this in a flashable zip?
Updated with some fixes in the guide and spaceadds.zip
Didn't see 2 posts above! I too would want to do this on job 4.1.2
Sent from my LT30p using Tapatalk 4 Beta
Awesome guide Sir, :good:
gonna try this and let you know "in case" if i failed
Dzol Cp said:
Awesome guide Sir, :good:
gonna try this and let you know "in case" if i failed
Click to expand...
Click to collapse
don note only brightness prof and settings button will work on phones other then samsung as i preincluded them in the files now
will update it all when i get more time
i am here always to help
Sent from my S500 using xda app-developers app
not working i tried on galaxy fit status bar force close..please help added logs in the attachment
and one correction
on your tutorial for statusbar.xml
you by mistake added a"]" sign in the end
<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">]
at the end of the above line ] is added please romove
adityapal said:
not working i tried on galaxy fit status bar force close..please help added logs in the attachment
and one correction
on your tutorial for statusbar.xml
you by mistake added a"]" sign in the end
<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">]
at the end of the above line ] is added please romove
Click to expand...
Click to collapse
ur error is this
Code:
06-08 18:47:00.899 E/AndroidRuntime(223): java.lang.RuntimeException: Unable to create service com.android.systemui.statusbar.StatusBarService: android.view.InflateException: Binary XML file line #9: Error inflating class com.android.systemui.statusbar.policy.DateView
i totaly forgot to add that file iam soo sorry i will add it asap
How to add 4.2.2 Statusbar to youre Jellybean rom
In this guide i will show u how to add 4.2.2 statusbar
Note:!!!!!!! If u are new to modifying apps Dont try this Please.. u must know how to mod first before u gonna try as u will definetly end up in some errors or possible FCs
Read the thread/OP/first 1/2 posts FULLY! if u dont read it fully i wont provide support as u are to lazy to even read in the first place. if u read full 1st page i can help u
do add logcats if FC * how to do this is also described here!*. Thanks
Next is
Statusbar.xml
make sure it looks like this below
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.PhoneStatusBarView android:orientation="vertical" android:id="@id/status_bar" android:background="@drawable/status_bar_background" android:focusable="true" android:fitsSystemWindows="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<com.android.systemui.statusbar.StatusBarServiceLRPull android:layout_width="fill_parent" android:layout_height="wrap_content">
<ImageView android:id="@id/notification_lights_out" android:paddingLeft="6.0dip" android:paddingBottom="2.0dip" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" />
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:paddingLeft="6.0dip" android:paddingRight="6.0dip" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/notification_icon_area" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0">
<com.android.systemui.statusbar.StatusBarIconView android:id="@id/moreIcon" android:visibility="gone" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="fill_parent" android:src="@drawable/stat_notify_more" />
<com.android.systemui.statusbar.phone.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentLeft="true" />
</LinearLayout>
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:layout_width="wrap_content" android:layout_height="fill_parent" />
<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" />
<TextView android:layout_gravity="left|center" android:id="@id/battery_text" android:paddingLeft="4.0dip" android:visibility="gone" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/status_bar_settings_settings_button" android:singleLine="true" style="@style/StatusBarNotificationText" />
<ImageView android:id="@id/battery" android:paddingLeft="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" />
</LinearLayout>
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:textColor="@touchwiz:dimen/tw_softkey_textsize_singleline" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
</LinearLayout>
</com.android.systemui.statusbar.StatusBarServiceLRPull>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageSwitcher android:id="@id/tickerIcon" android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:layout_marginRight="4.0dip">
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
<com.android.systemui.statusbar.AnimatedImageView android:layout_width="@dimen/status_bar_icon_size" android:layout_height="@dimen/status_bar_icon_size" android:scaleType="center" />
</ImageSwitcher>
<com.android.systemui.statusbar.phone.TickerView android:id="@id/tickerText" android:paddingTop="2.0dip" android:paddingRight="10.0dip" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.PhoneTicker" android:layout_width="fill_parent" android:layout_height="wrap_content" android:singleLine="true" />
</com.android.systemui.statusbar.phone.TickerView>
</LinearLayout>
</com.android.systemui.statusbar.phone.PhoneStatusBarView>
Now we are going to modify
Status_bar_expanded.xml
Make sure it looks something like this
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
<include layout="@layout/brightness" />
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</LinearLayout>
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
change it to
RED - Add BLUE - moved
Code:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
[COLOR="Blue"]<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_marginBottom="@dimen/close_handle_underlap">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
</LinearLayout>[/COLOR]
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network" android:gravity="center" android:layout_gravity="bottom" android:id="@id/carrier_label" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/carrier_label_height" android:layout_marginBottom="@dimen/close_handle_height" />
[COLOR="red"]<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">[/COLOR]
[COLOR="Red"]<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<include layout="@layout/quickpanel_quick_settings_space" />
</LinearLayout>[/COLOR]
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" [COLOR="red"]android:layout_marginTop="@dimen/notification_panel_header_height"[/COLOR] android:layout_marginBottom="@dimen/close_handle_underlap">
<TextView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Network.EmergencyOnly" android:gravity="center" android:id="@id/emergency_calls_only" android:paddingBottom="4.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</LinearLayout>
[COLOR="red"]</com.spacecaker.SpaceLayOut>[/COLOR]
<com.android.systemui.statusbar.phone.CloseDragHandle android:layout_gravity="bottom" android:orientation="vertical" android:id="@id/close" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height">
<ImageView android:layout_gravity="bottom" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" android:src="@drawable/status_bar_close" android:scaleType="fitXY" />
</com.android.systemui.statusbar.phone.CloseDragHandle>
</FrameLayout>
What i have done is adding new
Code:
<com.spacecaker.SpaceLayOut android:layout_width="fill_parent" android:layout_height="fill_parent">
</com.spacecaker.SpaceLayOut>
lines + use other xml to load Quickpanel and JB header
to make it look much cleaner
Next up is moddifying
StatusBar_Expanded_Header.xml
RED - Add BLUE - moved
Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:orientation="vertical" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="wrap_content"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" android:visibility="gone" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="52.0dip" android:baselineAligned="false">
<ImageView android:id="@id/quickpanelsettings_button" android:paddingLeft="5.0dip" android:paddingRight="5.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quickpanelsettings" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/quicksettings_button" android:paddingLeft="5.0dip" android:paddingRight="1.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_alignParentLeft="true" />
<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:id="@id/clock_expanded" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" />
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Date" android:textColor="@com.sonyericsson.uxp:color/semc_theme_accent_color" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginRight="8.0dip" />
<com.android.systemui.statusbar.RotationToggle android:id="@id/rotation_lock_button" android:clickable="true" android:layout_width="32.0dip" android:layout_height="32.0dip" android:layout_margin="8.0dip" android:button="@drawable/ic_notify_rotation" android:contentDescription="@string/accessibility_rotation_lock_off" />
<ImageView android:id="@id/settings_button" android:layout_width="48.0dip" android:layout_height="48.0dip" android:src="@drawable/ic_notify_quicksettings" android:scaleType="center" android:contentDescription="@string/accessibility_settings_button" />
<Space android:layout_width="0.0dip" android:layout_height="0.0dip" android:layout_weight="1.0" />
<com.spacecaker.ButtonBurst android:id="@id/spacebuttonburst" android:layout_width="40.0dip" android:layout_height="40.0dip" android:layout_alignParentRight="true" />
[COLOR="red"]<Button android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="80.0dip" android:layout_height="wrap_content" android:text="@string/status_bar_clear_all_button" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" /> [/COLOR]
</LinearLayout>
</LinearLayout>
Now we are going to
res/values/ids.xml
and we are going to add these ids
Code:
<item type="id" name="spaceybeaneyheader">false</item>
<item type="id" name="settings_button">false</item>
<item type="id" name="jbclock">false</item>
<item type="id" name="spacebuttonburst">false</item>
<item type="id" name="recent_app_button">false</item>
Now go to
res/values/strings.xml and we add these lines
Code:
<string name="accessibility_clear_all">Clear</string>
<string name="accessibility_settings_button">System settings.</string>
Now go to
res/values/Styles.xml
and add
this to the end of file
Code:
<style name="S3.Clear" parent="@*android:style/Widget.Button">
<item name="android:textAppearance">?android:textAppearanceSmallInverse</item>
<item name="android:textColor">#ffffffff</item>
<item name="android:gravity">center</item>
<item name="android:background">@drawable/tw_btn_default_small</item>
<item name="android:focusable">true</item>
<item name="android:clickable">true</item>
</style>
now add a dimens.xml or edit ur dimens.xml
and add this line
Code:
<dimen name="status_bar_expanded_notification_clear_button_text_size">17.0dip</dimen>
<dimen name="status_bar_expanded_notification_category_text_size">17.0dip</dimen>
<dimen name="status_bar_expanded_clear_button_width">123.0dip</dimen>
now change this line in dimens.xml from
[CODE}]<dimen name="notification_panel_header_height">111.0dip</dimen>[/CODE]
to
Code:
<dimen name="notification_panel_header_height">52.0dip</dimen>
Now add all the Files i have given in the attachement *Space_Adds.zip*
and compile the apk
if u get a error do describe it in xda post so i can help u to fix
Now delete the Directory of ur decompiled apk
and
Decompiled the apk again * this is for the public IDS * sothey are added
Now
go to
res/values/public.xml and find these
Code:
<public type="drawable" name="btn_tg"
<public type="drawable" name="btn_toggles_normal"
Now goto
smali/com/spacecaker/ButtonBurst.smali
and find this
Code:
const v3, 0x7f020180
change it to the Public ID code u got from
Code:
<public type="drawable" name="btn_toggles_normal"
Now find this
Code:
const v3, 0x7f02017f
change it to the public id u got from
Code:
<public type="drawable" name="btn_tg"
and now We are done for this part
now lets add the
Settings
Display
and
Prof/Contact button
goto
smali/com/android/systemui/SystemUIService.smali
and aadd these to end of the file
Code:
.method public BrightnessButton(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.Settings"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public ProfileButton(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.contacts"
const-string v2, "com.android.contacts.activities.PeopleActivity"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
.method public SpaceCakerButton(Landroid/view/View;)V
.locals 3
.parameter "v"
.prologue
.line 2431
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 2432
const-string v1, "com.android.settings"
const-string v2, "com.android.settings.Settings"
invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
const/high16 v2, 0x1000
invoke-virtual {v0, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
move-result-object v0
.line 2433
invoke-virtual {p0, v0}, Landroid/content/Context;->startActivity(Landroid/content/Intent;)V
const-string v1, "statusbar"
invoke-virtual {p0, v1}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Landroid/app/StatusBarManager;
invoke-virtual {v0}, Landroid/app/StatusBarManager;->collapse()V
.line 1720
return-void
.end method
now compile the apk and it should work now
if it doesn't work please take a logcat * A full logcat with ADB and not with catlog or logcat apps on phone if preferable use this command adb logcat -v long > logcat.txt this way i can help also dont cut the logcat just keep it full as there are more parts that are needed to see instead of only a E/androidruntime error
Special Thanks to
Matz69
DCSMS
auliaYF
marinalin
and everyone who helped
SpaceCaker
xda.agm
if i am missing credits or whatsoever PM me and i will set
How to add new/change toggles ?
As u can see i highlighted some stuff with pink color
Code:
[COLOR="Magenta"][I]const-string v2, "com.android.settings"[/I][/COLOR]
Packagename
Code:
[COLOR="Magenta"][I]const-string v2, "com.android.settings.Settings"[/I][/COLOR]
Activity
As u can see it has this tag inside
Code:
com.android.settings
packagename
Code:
com.android.settings.Settings
Activity
this is the package/action name of a app / option inside settings.apk
u can change this to any thin u want like
taskmanager it will be like this
Code:
const-string v2, "com.sec.android.app.controlpanel"
this is packagename, and
Code:
const-string v2, "com.sec.android.app.controlpanel.activity.JobManagerActivity"
this is activity,
now if u add it to a new Onclick method it will look like this
Code:
.method public [COLOR="RoyalBlue"]SpaceCakerButton[/COLOR](Landroid/view/View;)V
.locals 5
.parameter "view"
.prologue
.line 99
.line 100
:try_start_0
new-instance v1, Landroid/content/Intent;
invoke-direct {v1}, Landroid/content/Intent;-><init>()V
.line 102
.local v1, intent:Landroid/content/Intent;
const-string v2, "android.intent.action.MAIN"
invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
.line 105
const/high16 v2, 0x1000
invoke-virtual {v1, v2}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;
.line 107
[COLOR="RoyalBlue"]const-string v2, "com.android.settings"[/COLOR]
[COLOR="RoyalBlue"]const-string v3, "com.android.settings.Settings"[/COLOR]
invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->setClassName(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;
invoke-virtual {p0, v1}, Lcom/android/systemui/SystemUIService;->startActivity(Landroid/content/Intent;)V
:try_end_0
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
.line 109
.line 112
.end local v1 #intent:Landroid/content/Intent;
:goto_0
return-void
.line 115
:catch_0
move-exception v0
.line 117
.local v0, e:Ljava/lang/Exception;
invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
goto :goto_0
.end method
this is a new method
of course it wont work yet as u need to add it to the layout
goto res/layout/quickpanel_quick_settings_space.xml
add something like this
Code:
<FrameLayout android:id="@id/settings_button" android:background= [user=3944923]@drawab[/user]le/tile_toggle" android:layout_width="106.0px" android:layout_height="100.0px" android:layout_weight="1.0">
<ImageView android:layout_gravity="center_horizontal" android:layout_width="wrap_content" android:layout_height="wrap_content" [COLOR="Red"]android:src [user=3944923]@drawab[/user]le/taskmanagerpng"[/COLOR][COLOR="Red"]android:onClick="SpaceCakerButton"[/COLOR] />
<TextView android:textSize="12.0dip" android:textColor="#ffffffff" android:gravity="center" android:layout_gravity="bottom" android:background="#00000000" android:layout_width="106.0px" android:layout_height="wrap_content" android:layout_marginBottom="15.0px" [COLOR="Red"]android:text="TaskManager"[/COLOR] />
</FrameLayout>
the red stuff u need to edit to the app/ icon / text /
Code:
.method public SpaceCakerButton
u used
@drawable/taskmanagerpng u need to add a png that has the name taskmanagerpng to drawable-mdpi
Code:
android:onClick="[COLOR="Magenta"]SpaceCakerButton[/COLOR]"
noticed the pink part ?
this is the text i used after .method public
this makes the button actually work
And ofcourse
Code:
android:text="[COLOR="Magenta"]TaskManager[/COLOR]"
this is what the text needs to say under the app
SpaceCaker said:
taken this post for more
Click to expand...
Click to collapse
and ofcourse this one aswell is neccesary
Thank you for this!!!!
I am going to see if I can get this for Note II
Sent from my SPH-L900 using xda app-developers app
Omg you did the guide for jellybean... Thank you thank you thank you so much man... Gonna try this method later.. I'm just gonna wait till my uncle leaves so I won't be disturbed in the computer
Sent from my H100 using xda app-developers app
so now carrying after my succes with getting this to work i have added the method to systemuiservice now i can click the toggles but they wont launch anything
Ofcours it will work... worked for me....
Sent from my IRIS_501 using xda premium
Hi there! Any way to porting this awesome guide to stock ICS?
ReQuanto said:
Hi there! Any way to porting this awesome guide to stock ICS?
Click to expand...
Click to collapse
yes offfcourse
vu
t u will need to mix some stuff from gB guide with JB guide
Sent from my S500 using xda app-developers app
Tried,took 5 Hours to compile after solving all errors in Stock ROM.... Gonna flash now
EDIT: No more SystemUI....No notification bar+no wallpaper etc
SpaceCaker said:
yes offfcourse
vu
t u will need to mix some stuff from gB guide with JB guide
Click to expand...
Click to collapse
I understand that too much to ask, but could you at leisure to try to port this guide? I tried to do it, but I have some errors in the id's and .smali
ReQuanto said:
I understand that too much to ask, but could you at leisure to try to port this guide? I tried to do it, but I have some errors in the id's and .smali
Click to expand...
Click to collapse
You can do it... Took me a while as well to get it to work on jb, this guide was posted just after 3 of us with same mediatek devices got it to work using same GB guide, all it takes is analyzing the build errors and checking the logcats if you get fc but in the end the errors can just be fixed by a view work arounds... Just don't give up on it :thumbup::thumbup::thumbup:
Sent from my H100 using xda app-developers app
I GOT EVERYTHING WORKING.... ALL THREE TOGGLES WORKING... YOU CAN ADD TOGGLES AS MUCH YOU WANT.... NO MORE FC.....
to get working lots of layout changes needed.... :victory::victory::victory::victory:
my device : mt6577 4.1.1
just took 6 hours....
ss:
Dark4Droid said:
Tried,took 5 Hours to compile after solving all errors in Stock ROM.... Gonna flash now
EDIT: No more SystemUI....No notification bar+no wallpaper etc
Click to expand...
Click to collapse
like me on s2 xwlsw
akash akya said:
I GOT EVERYTHING WORKING.... ALL THREE TOGGLES WORKING... YOU CAN ADD TOGGLES AS MUCH YOU WANT.... NO MORE FC.....
to get working lots of layout changes needed.... :victory::victory::victory::victory:
my device : mt6577 4.1.1
just took 6 hours....
ss:
Click to expand...
Click to collapse
To switch to quick panel view do have to tap on the quick panel button once or twice??? Mine I have to tap on it twice
Sent from my H100 using xda app-developers app
thirdzcee said:
To switch to quick panel view do have to tap on the quick panel button once or twice??? Mine I have to tap on it twice
Sent from my H100 using xda app-developers app
Click to expand...
Click to collapse
yup but it occur rarely once in ten times...
---added more toggles----
akash akya said:
yup but it occur rarely once in ten times...
---added more toggles----
Click to expand...
Click to collapse
Cool,,, mine it happens every time... Haven't added toggles yet or even changed the icons, but I moved the toolbarview and slider to the space view
Sent from my H100 using xda app-developers app
thirdzcee said:
Cool,,, mine it happens every time... Haven't added toggles yet or even changed the icons, but I moved the toolbarview and slider to the space view
View attachment 2123048
Sent from my H100 using xda app-developers app
Click to expand...
Click to collapse
Looks Cool... :good::good:
next goal... enable auto close notification when we click any toggle....
akash akya said:
Looks Cool... :good::good:
next goal... enable auto close notification when we click any toggle....
Click to expand...
Click to collapse
yeah same thing happens with mine, and seems that moving the toolbarview causes fc when the screeb rotates, but statusbar just comes back after tapping on ok button of fc...
akash akya said:
Looks Cool... :good::good:
next goal... enable auto close notification when we click any toggle....
Click to expand...
Click to collapse
i can add that to the toggle code
will do once i acces pc
Sent from my S500 using xda app-developers app
HOW TO PORT LIDROID TOGGLES
TO NON SAMSUNG ICS ROMS
for JB you can go here : http://forum.xda-developers.com/showthread.php?t=2381290
Credit & Thank you :
- @lidroid
- Recognized themer @serajr for some additional toggles created by him.
and we are going to port 21 Lidroid toggles :
( -Lock screen/screen-off action, -Reboot action, -Shutdown action, -Airplane mode, -Bluetoth, -Brightness, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, Stay awake, USB Connection mode, USB Debugging, Network mode )
NOTE !! , for CyanogenMod 9 do not follow this guide, you can just flash my mod for CM9 in here http://forum.xda-developers.com/showthread.php?t=2334200
many users from different devices reported work on their phone
ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else
1. Decomple SystemUI.apk
- res/values/ids.xml
add this to the end :
Code:
<item type="id" name="quickpanel_button">false</item>
<item type="id" name="quickpanel_button_image">false</item>
<item type="id" name="quickpanel_button_text">false</item>
<item type="id" name="quickpanel_button_indic">false</item>
<item type="id" name="adi_quickpanel">false</item>
- res/values/strings.xml
add this to the end :
Code:
<string name="quickpanel_wifi_text">WiFi</string>
<string name="quickpanel_dc_text">Data</string>
<string name="quickpanel_network_mode_text">Network</string>
<string name="quickpanel_sound_text">Ring</string>
<string name="quickpanel_sound_vibration_text">Ring Vibrate</string>
<string name="quickpanel_silent_text">Silent</string>
<string name="quickpanel_vibration_text">Vibration</string>
<string name="quickpanel_rotation_text">Orientation</string>
<string name="quickpanel_bluetooth_text">Bluetooth</string>
<string name="quickpanel_gps_text">GPS</string>
<string name="quickpanel_autosync_text">Auto Sync</string>
<string name="quickpanel_brightness_text">Brightness</string>
<string name="quickpanel_screen_timeout_text">Timeout</string>
<string name="quickpanel_lockscreen_text">Lockscreen</string>
<string name="quickpanel_airplane_text">Airplane</string>
<string name="quickpanel_flashlight_text">Flashlight</string>
<string name="quickpanel_reboot_text">Reboot</string>
<string name="quickpanel_shutdown_text">Shutdown</string>
<string name="airplane_mode">In Flight mode</string>
<string name="shutdown_confirm">Your phone will shut down.</string>
<string name="screen_timeout_seconds">Screen timeout set to: %d second(s)</string>
<string name="screen_timeout_minutes">Screen timeout set to: %d minute(s)</string>
<string name="screen_timeout_hours">Screen timeout set to: %d hour(s)</string>
<string name="hamster">Phone Options</string>
<string name="yes">OK</string>
<string name="no">Cancel</string>
<string name="reboot">Reboot</string>
<string name="reboot_recovery">CWM recovery</string>
<string name="reboot_download">Download</string>
<string name="quickpanel_usb_debugging_text">USB Debugging</string>
<string name="quickpanel_usb_connection_mode_text">USB Conn. Mode</string>
<string name="quickpanel_usb_current_mtp_title">Current mode: MPT</string>
<string name="quickpanel_usb_current_msc_title">Current mode: MSC</string>
<string name="usb_mpt_mode">MPT - Media Transfer</string>
<string name="usb_msc_mode">MSC - Mass Storage</string>
<string name="quickpanel_stay_awake_plugged_text">Stay Awake</string>
<string name="quickpanel_battery_info_text">Battery Info</string>
<string name="battery_info_info">Battery Information</string>
<string name="battery_info_usage">Battery Power Usage</string>
<string name="quickpanel_wifi_ap_text">Wifi AP</string>
<string name="quickpanel_lockscreen_action_text">Lock Now</string>
- res/layout/status_bar_expanded.xml
add the red code :
MEDIATEK device
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
<include layout="@layout/zzz_toolbar_view" />
<include layout="@layout/zzz_toolbar_indicator" />
</FrameLayout>
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
[COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
</LinearLayout>
</ScrollView>
<ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>
AOSP / XPERIA
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.ExpandedView android:orientation="vertical" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<RelativeLayout android:background="@drawable/notification_header_bg" android:paddingTop="3.0dip" android:paddingRight="3.0dip" android:paddingBottom="5.0dip" android:layout_width="fill_parent" android:layout_height="52.0dip">
<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="left|center" android:id="@id/date" android:paddingLeft="16.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_alignParentLeft="true" />
<ImageView android:id="@id/settings_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_quicksettings" android:layout_toRightOf="@id/date" android:contentDescription="@string/accessibility_settings_button" />
<ImageView android:id="@id/clear_all_button" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:src="@drawable/ic_notify_clear" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_clear_all" />
</RelativeLayout>
[COLOR="Red"]<com.lidroid.systemui.quickpanel.PowerWidget android:id="@id/adi_quickpanel" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
<View android:background="@drawable/status_bar_hr" android:layout_width="fill_parent" android:layout_height="2.0dip" />
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1.0">
<TextView android:textAppearance="@*android:style/TextAppearance.Large" android:gravity="left" android:layout_gravity="top" android:id="@id/noNotificationsTitle" android:padding="8.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/status_bar_no_notifications_title" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="fill_parent" android:overScrollMode="ifContentScrolls">
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_height" />
</LinearLayout>
</ScrollView>
<ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/title_bar_shadow" android:scaleType="fitXY" />
</FrameLayout>
</com.android.systemui.statusbar.phone.ExpandedView>
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
add the blue code :
Code:
.field mPixelFormat:I
.field mPositionTmp:[I
.field mPostCollapseCleanup:Ljava/lang/Runnable;
[COLOR="Blue"].field mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
.field private mPreviousConfigFontScale:F
.field mQueueLock:Ljava/lang/Object;
.field private mRecentTasksLoader:Lcom/android/systemui/recent/RecentTasksLoader;
NEXT still in the same smali
for MEDIATEK devices
find this method
Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code
Code:
invoke-virtual {v1, v0, p3, v2}, Landroid/widget/LinearLayout;->addView(Landroid/view/View;ILandroid/view/ViewGroup$LayoutParams;)V
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->updateWidget()V[/COLOR]
.line 601
return-void
.end method
next find this method :
Code:
.method protected makeStatusBarView()Landroid/view/View;
scroll down and add the blue code
Code:
const [COLOR="Red"]v11[/COLOR], 0x7f0e0041
invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object [COLOR="Red"]v11[/COLOR]
check-cast [COLOR="Red"]v11[/COLOR], Landroid/widget/ScrollView;
iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
[COLOR="Blue"]const [COLOR="Red"]v11[/COLOR], 0x7f0e0096
invoke-virtual {[COLOR="Red"]v2, v11[/COLOR]}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object [COLOR="Red"]v11[/COLOR]
check-cast [COLOR="Red"]v11[/COLOR], Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object [COLOR="Red"]v11, p0[/COLOR], Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
.line 375
new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
invoke-direct {v11, p0, v1, v6}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;-><init>(Lcom/android/systemui/statusbar/phone/PhoneStatusBar;Landroid/content/Context;Landroid/view/View;)V
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mTicker:Lcom/android/systemui/statusbar/phone/Ticker;
pay attention on the red code in the part of blue code, it has to be written the same like above it/previous part
and also every mediatek device may be have diferent code,. see my another example in here : http://forum.xda-developers.com/showpost.php?p=44095535&postcount=7
next still in the same method, scroll down , and add the blue code
Code:
const-string v11, "android.intent.action.SIM_INFO_UPDATE"
invoke-virtual {v9, v11}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 450
iget-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSIMInfoReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v1, v11, v9}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 454
return-object v6
.line 312
.end local v3 #filter:Landroid/content/IntentFilter;
.end local v4 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v6 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end local v8 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v9 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v10 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
Click to expand...
Click to collapse
for AOSP / XPERIA
find this method
Code:
# virtual methods
.method public addIcon(Ljava/lang/String;IILcom/android/internal/statusbar/StatusBarIcon;)V
scroll down and add the blue code
Code:
const-string v8, "android.intent.action.SCREEN_OFF"
invoke-virtual {v2, v8}, Landroid/content/IntentFilter;->addAction(Ljava/lang/String;)V
.line 373
iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v6, 0x7f0e0096
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 375
return-object v4
.line 306
.end local v2 #filter:Landroid/content/IntentFilter;
.end local v6 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterView;
.end local v7 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:catch_0
move-exception v8
goto/16 :goto_0
.end method
Click to expand...
Click to collapse
CONTINUE TO POST #2
2. Download source_ICS_Lidroid_SytemUI.apk
Exstract it and merge to your decompiled SystemUI.apk
NOTE !! if your device has arrays.xml in res/values/here
please do check again the source_ICS_Lidroid_SytemUI.apk and adapt the arrays.xml code in it with yours
done and Recompile your SystemUI.apk
3. Decompile the newly Recompiled APK again and go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
next
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
with Notepad++ , control+F
MEDIATEK DEVICES
Code:
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;
const v11, [COLOR="Red"]0x7f0e0096[/COLOR]
invoke-virtual {v2, v11}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v11
check-cast v11, Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object v11, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
.line 375
new-instance v11, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$MyTicker;
Click to expand...
Click to collapse
AOSP/XPERIA
Code:
invoke-virtual {v0, v8, v2}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
iget-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mExpandedView:Lcom/android/systemui/statusbar/phone/ExpandedView;
const v6, [COLOR="Red"]0x7f0e0096[/COLOR]
invoke-virtual {v5, v6}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v5
check-cast v5, Lcom/lidroid/systemui/quickpanel/PowerWidget;
iput-object v5, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
iget-object v6, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v6}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V
.line 375
return-object v4
Click to expand...
Click to collapse
Replace 0x7f0e0096 with the new ids from second decompiled public.xml
Code:
<public type="id" name="[COLOR="Blue"]adi_quickpanel[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />
NEXT CONTINUE IN POST #3
4. Download ICS_Lidroid_public.xml
and open it with Notepad++
so now you have two public.xml which is opened in the Notepad++
1. second decompiled public.xml
2. ICS_Lidroid_public.xml
- go to , smali/com/lidroid/systemui/quickpanel/here...
there are a lot of smalis there
FIND ALL IDS in all that smalis THAT'S STARTED WITH
Code:
[COLOR="Red"]0x7fxxxxxx[/COLOR]
EXAMPLE :
AirplaneButton.smali
find this :
Code:
const v0, [COLOR="Red"]0x7f080089[/COLOR]
find 0x7f080089 in ICS_Lidroid_public.xml
Code:
<public type="string" name="quickpanel_lockscreen_text" id="0x7f080088" />
<public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7f080089[/COLOR]" />
<public type="string" name="quickpanel_flashlight_text" id="0x7f08008a" />
we find that 0x7f080089 is for string .... quickpanel_airplane_text
Next, find string .... quickpanel_airplane_text new ids in your
public.xml of second decompiled SystemUI.apk
Code:
<public type="[COLOR="Blue"]string[/COLOR]" name="[COLOR="Green"]quickpanel_airplane_text[/COLOR]" id="[COLOR="Red"]0x7fxxxxxx[/COLOR]" />
change the ids in AirplaneButton.smali with your new ids from public.xml of second decompiled systemui.apk.
Do it too, to all
Code:
[COLOR="Red"]0x7fxxxxxx[/COLOR]
in all smalis in the lidroid folder.
6. Download this QuickPanel_Settings.apk and push to system/app with right permission
Done
Additional Guide
[HOWTO] Enable 2G/3G, 2G, 3G Toggle
only for devices that support 3G/HSDPA
Go to this thread [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher
But don't follow the lidroid step, coz we have it already
or Without patching Phone.apk , but with editing Lidroid and Android.manifest
go here : http://forum.xda-developers.com/showpost.php?p=40971646&postcount=30
[Porting Guide][ICS] Mod 4.2 Statusbar tilesview (TABS, Slider, Flip Anim, Lidroid )
http://forum.xda-developers.com/showthread.php?t=2423398
Guide How to full screen Expanded Pulldown JB style
http://forum.xda-developers.com/showthread.php?p=45130177#post45130177
I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok
My device is Lenovo A390
Sorry for my bad English!
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
I get errors while recompiling the apk. Here's the full error http://pastebin.com/EKEVsGQh. I'm attaching my SystemUI and framework-res for reference. Please do not just mod it and give it to me, explain if you can so I can know what exactly is the problem
SystemUI.apk
framework-res.apk
try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel
Code:
[COLOR="Red"]const v13, 0x7f0e0042
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Landroid/widget/ScrollView;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;[/COLOR]
[B]blue lines below is basically a copy from above red lines[/B]
[COLOR="Blue"]const v13, 0x7f0e0042 <-- adi_quickpanel
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Lcom/lidroid/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
dafuqChicken said:
I think that should be done before step 2 because I have the error code in PhoneStatusBar.smali 0x7f0e0096 in step 1
View attachment 2152085
I made 2 previous steps then get the code received from <public type="id" name="adi_quickpanel" id="0x7fxxxxxx" /> instead PhoneStatusBar.smali then recompile and it's ok
View attachment 2152086
My device is Lenovo A390
Sorry for my bad English!
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
oke , how is the result now ?, is there any I can help
How to Port Lidroid Toggles to CM7
Thanks
x-dira said:
How to Port Lidroid Toggles to CM7
Thanks
Click to expand...
Click to collapse
I cannot experimenting on CM7 , coz we don't have CM7 roms on my device,.
but CM7 is Gingerbread, so I think it will be same guide like for Stok GB too
Still doesn't work
Adi Aisiteru Reborn said:
try this @grvrulz
add the blue code, but don't add <-- adi_quickpanel
Code:
[COLOR="Red"]const v13, 0x7f0e0042
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Landroid/widget/ScrollView;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mScrollView:Landroid/widget/ScrollView;[/COLOR]
[B]below is a copied from above[/B]
[COLOR="Blue"]const v13, 0x7f0e0042 <-- adi_quickpanel
invoke-virtual {v3, v13}, Lcom/android/systemui/statusbar/phone/ExpandedView;->findViewById(I)Landroid/view/View;
move-result-object v13
check-cast v13, Lcom/lidroid/systemui/quickpanel/PowerWidget;
move-object/from16 v0, p0
iput-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;[/COLOR]
Click to expand...
Click to collapse
Thank you. I completed the whole guide with this, but the quickpanel doesn't show up. I tried rebooting a couple of times and placing the quickpanel widget at different points in the layout, but it still doesn't show up. I took a logcat with 'adb logcat -d > logcat2.txt' and I'm attaching it here for reference.
Yeah! I have done!!
Thank you for this mod!
Can you help me remove it?
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
grvrulz said:
Thank you. I completed the whole guide with this, but the quickpanel doesn't show up. I tried rebooting a couple of times and placing the quickpanel widget at different points in the layout, but it still doesn't show up. I took a logcat with 'adb logcat -d > logcat2.txt' and I'm attaching it here for reference.
Click to expand...
Click to collapse
can you attach me your modded PhoneStatusBar.smali ?
dafuqChicken said:
Can you help me remove it?
View attachment 2153404
Gửi từ Lenovo A390_ROW của tôi bằng cách sử dụng Tapatalk 2
Click to expand...
Click to collapse
Code:
android:layout_height="[COLOR="Red"]0.0dip[/COLOR]"
Adi Aisiteru Reborn said:
Additional Guide
[HOWTO] Enable 2G/3G, 2G, 3G Toggle
only for devices that support 3G/HSDPA
Go to this thread [HOWTO] Enable 2G/3G Toggle from Statusbar/Launcher
But don't follow the lidroid step, coz we have it already
or Without patching Phone.apk , but with editing Lidroid and Android.manifest
go here : http://forum.xda-developers.com/showpost.php?p=40971646&postcount=30
Click to expand...
Click to collapse
Additional Guide added
Adi Aisiteru Reborn said:
can you attach me your modded PhoneStatusBar.smali ?
Click to expand...
Click to collapse
Here's my Phonestatusbar.smali. It's renamed because xda doesn't accept smali files as attachments(but you probably knew it already )
grvrulz said:
Here's my Phonestatusbar.smali. It's renamed because xda doesn't accept smali files as attachments(but you probably knew it already )
Click to expand...
Click to collapse
Code:
const-string v13, "file"
invoke-virtual {v6, v13}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V
.line 473
move-object/from16 v0, p0
iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v2, v13, v6}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 475
return-object v8
.line 320
.end local v4 #filter:Landroid/content/IntentFilter;
.end local v5 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v6 #mediaEjectFilter:Landroid/content/IntentFilter;
.end local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end local v10 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v11 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v12 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:cond_1
const v13, 0x7f030020
const/4 v14, 0x0
invoke-static {v2, v13, v14}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v8
check-cast v8, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.restart local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
goto/16 :goto_0
.line 337
:catch_0
move-exception v13
goto/16 :goto_1
.end method
you havn't add the blue code
Adi Aisiteru Reborn said:
Code:
const-string v13, "file"
invoke-virtual {v6, v13}, Landroid/content/IntentFilter;->addDataScheme(Ljava/lang/String;)V
.line 473
move-object/from16 v0, p0
iget-object v13, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v2, v13, v6}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
[COLOR="Blue"]iget-object v1, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/lidroid/systemui/quickpanel/PowerWidget;
invoke-virtual {v1}, Lcom/lidroid/systemui/quickpanel/PowerWidget;->setupWidget()V[/COLOR]
.line 475
return-object v8
.line 320
.end local v4 #filter:Landroid/content/IntentFilter;
.end local v5 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v6 #mediaEjectFilter:Landroid/content/IntentFilter;
.end local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.end local v10 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v11 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v12 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:cond_1
const v13, 0x7f030020
const/4 v14, 0x0
invoke-static {v2, v13, v14}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
move-result-object v8
check-cast v8, Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
.restart local v8 #sb:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
goto/16 :goto_0
.line 337
:catch_0
move-exception v13
goto/16 :goto_1
.end method
you havn't add the blue code
Click to expand...
Click to collapse
After adding this, I get the error
Code:
[8180,1] The register number must be less than v16
I also tried adding
Code:
move-object/from16 v0, p0
just before that line but it's still the same..
grvrulz said:
After adding this, I get the error
Code:
[8180,1] The register number must be less than v16
I also tried adding
Code:
move-object/from16 v0, p0
just before that line but it's still the same..
Click to expand...
Click to collapse
try to use PhoneStatusBar.smali code for AOSP/XPERIA from OP,.
or for Touchwizz in here http://forum.xda-developers.com/showthread.php?t=1725411
but change
Code:
Lcom/wanam/systemui/quickpanel/PowerWidget;
to :
Code:
Lcom/lidroid/systemui/quickpanel/PowerWidget;
HOW TO PORT JB 4.2 HORIZONTAL LIDROID TOGGLES
TO MTK / STOK BASE / NON CM / JB 4.2 /JB 4.3 / KK
Oke guys, I am back again here, I want to share how to port Lidroid toggle for Jelly Bean 4.2 up. : MTK / STOK BASE / NON CM / JB 4.2 / JB 4.3 / KK
do not try this on CM Base rom, or you will ended with SystemUI force closes :laugh::fingers-crossed:
Credit & Thank you very much , to
- lidroid, and Wanam for Guide [MOD][Android 4.1.2] Add Customizable 23 Statusbar Toggles To Samsung Jelly bean Roms,. and Thanks too to peetr_I learn some code from his thread [MOD][JB][ICS] Xperia T/TX/V port of Lidroid power widget,. and also thanks to
XDA.AGM I learn some code from his thread too [ JB ] [ A.0.400/1.100 ] [ XP-XU ]SystemUI with Lidroid Custom 18 Toggles [version 6], and you must thanks them too
- Recognized contributor @BOND1987
- Denny Mbol , Device Lenovo a316i MTK 6572
- CyanogenMod
- and also Thanks to Recognized Developer/themer @serajr for some toggles created by him
- [Unofficial Community] Galaxy Wonder CyanogenMod Indonesia
so we are going to port 21 Lidroid toggles :
( -Lock screen/screen-off action, -Reboot action, -Shutdown action, -Bluetoth, -GPS, -Flashlight, -Lockscreen, -MobileData, -Orientation, -ScreenTimeOut, -Sound, -Sync, -Wi-fi, -Wi-fi Hotspot, Battery info, USB Connection mode, USB Debugging, PlayPause, Next track, Previous track, Network mode 2G/3G )
ok lets go to Guide:
first of all need some requirement for this MOD-GUIDE
REQUIREMENT:
- BRAIN
- Patient
- experience
- Know how to decompile/recompiling Apk file
- Know how to decompile/recompiling jar Apk file
- notepad++
- Tool for decompiling, : apkmanager/apktool/Virtous/apkmultitools/ or else[/B]
STEP - 1
Decompile your SystemUI.apk
- Download attached Merge_to_SystemUI.apk exstract it and merge to your decompiled systemUI.apk
- SystemUI.apk/res/layout/gemini_status_bar_expanded.xml
add the red line
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NotificationPanelView android:id="@id/notification_panel" android:background="@drawable/notification_panel_bg" android:paddingTop="@dimen/notification_panel_padding_top" android:layout_width="0.0dip" android:layout_height="wrap_content" android:layout_marginLeft="@dimen/notification_panel_margin_left"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<View android:id="@id/handle" android:background="@drawable/status_bar_close" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/close_handle_height" />
<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/gemini_carrier_label" />
<LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/close_handle_underlap" android:animateLayoutChanges="false">
<include android:layout_width="fill_parent" android:layout_height="@dimen/notification_panel_header_height" layout="@layout/status_bar_expanded_header" />
[COLOR="Red"]<com.adi.systemui.powerwidget.PowerWidget android:id="@id/adi_widget" android:layout_width="fill_parent" android:layout_height="wrap_content" />[/COLOR]
<FrameLayout android:id="@id/toolBarSwitchPanel" android:background="@drawable/notification_header_bg" android:layout_width="fill_parent" android:layout_height="103.0dip">
<include layout="@layout/toolbar_view" />
<include layout="@layout/toolbar_indicator" />
<include layout="@layout/toolbar_divider" />
</FrameLayout>
<FrameLayout android:layout_width="fill_parent" android:layout_height="wrap_content">
<ViewStub android:id="@id/flip_settings_stub" android:layout="@layout/flip_settings" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<ScrollView android:id="@id/scroll" android:fadingEdge="none" android:layout_width="fill_parent" android:layout_height="wrap_content" android:overScrollMode="ifContentScrolls">
<com.android.systemui.statusbar.policy.NotificationRowLayout android:id="@id/latestItems" android:layout_width="fill_parent" android:layout_height="wrap_content" systemui:rowHeight="@dimen/notification_row_min_height" />
</ScrollView>
</FrameLayout>
</LinearLayout>
</com.android.systemui.statusbar.phone.NotificationPanelView>
- SystemUI.apk/res/values/arrays.xml
add the red lines, to end of it before </resources>
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<array name="navbar_search_targets">
<item>@null</item>
<item>@*android:drawable/ic_action_assist_generic</item>
<item>@null</item>
<item>@null</item>
</array>
<array name="navbar_search_target_descriptions">
<item>@null</item>
<item>@*android:string/description_target_search</item>
<item>@null</item>
<item>@null</item>
</array>
<array name="navbar_search_direction_descriptions">
<item>@null</item>
<item>@*android:string/description_direction_up</item>
<item>@null</item>
<item>@null</item>
</array>
[COLOR="Red"]<string-array name="shutdown_reboot_options">
<item>@string/reboot</item>
<item>@string/reboot_recovery</item>
<item>@string/reboot_download</item>
</string-array>
<string-array name="shutdown_reboot_actions">
<item></item>
<item>recovery</item>
<item>download</item>
</string-array>
<string-array name="usb_connection_mode_options">
<item>@string/usb_mpt_mode</item>
<item>@string/usb_msc_mode</item>
</string-array>
<string-array name="usb_connection_mode_actions">
<item>mtp</item>
<item>mass_storage</item>
</string-array>
<string-array name="battery_info_options">
<item>@string/battery_info_info</item>
<item>@string/battery_info_usage</item>
</string-array>
<string-array name="battery_info_actions">
<item>battery_info</item>
<item>battery_usage</item>
</string-array>[/COLOR]
</resources>
- SystemUI.apk/res/values/ids.xml
add the red lines, to end of it before </resources>
Code:
<item type="id" name="sim_name">false</item>
<item type="id" name="sim_switch">false</item>
<item type="id" name="tool_bar_view">false</item>
<item type="id" name="close">false</item>
<item type="id" name="title">false</item>
<item type="id" name="bottom">false</item>
<item type="id" name="notification_inspect_item">false</item>
<item type="id" name="recent_remove_item">false</item>
<item type="id" name="recent_inspect_item">false</item>
[COLOR="Red"]<item type="id" name="adi_widget">false</item>
<item type="id" name="power_widget_button_text">false</item>
<item type="id" name="power_widget_button_indic">false</item>
<item type="id" name="power_widget_button">false</item>
<item type="id" name="power_widget_button_image">false</item>[/COLOR]
</resources>
- SystemUI.apk/res/values/integers.xml
add the red lines, to end of it before </resources>
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="config_maxNotificationIcons">5</integer>
<integer name="config_show_search_delay">200</integer>
<integer name="config_vibration_duration">0</integer>
<integer name="config_search_panel_view_vibration_duration">20</integer>
<integer name="one_finger_pop_duration_ms">10</integer>
<integer name="status_bar_recents_bg_gradient_degrees">90</integer>
<integer name="navigation_bar_deadzone_hold">333</integer>
<integer name="navigation_bar_deadzone_decay">333</integer>
<integer name="config_recent_item_min_alpha">3</integer>
<integer name="quick_settings_num_columns">3</integer>
<integer name="quick_settings_user_time_settings_tile_span">1</integer>
<integer name="quick_settings_brightness_dialog_short_timeout">2000</integer>
<integer name="quick_settings_brightness_dialog_long_timeout">4000</integer>
<integer name="blinds_pop_duration_ms">10</integer>
<integer name="notification_panel_layout_gravity">0x37</integer>
<integer name="settings_panel_layout_gravity">0x37</integer>
[COLOR="Red"]<integer name="quickpanel_scroll_threshold_port">5</integer>
<integer name="quickpanel_scroll_threshold_land">8</integer>[/COLOR]
</resources>
- SystemUI.apk/res/values/strings.xml
add the red lines, to end of it before </resources>
Code:
<string name="status_bar_help_text">"Access them anytime by swiping down.
Swipe down again for system controls."</string>
<string name="shutdown_prompt_title">Shutdown</string>
<string name="shutdown_prompt_message">Low battery and then will be auto shutdown</string>
<string name="shutdown_prompt_message_before">Low battery ! Your phone will shutdown in</string>
<string name="shutdown_prompt_message_after">seconds</string>
[COLOR="Red"]<string name="quickpanel_wifi_text">Wi-Fi</string>
<string name="quickpanel_dc_text">Data</string>
<string name="quickpanel_network_mode_text">Network</string>
<string name="quickpanel_sound_text">Sound</string>
<string name="quickpanel_sound_vibration_text">Ring.vibrate</string>
<string name="quickpanel_silent_text">Silent</string>
<string name="quickpanel_vibration_text">Vibration</string>
<string name="quickpanel_rotation_text">Rotation</string>
<string name="quickpanel_bluetooth_text">Bluetooth</string>
<string name="quickpanel_gps_text">GPS</string>
<string name="quickpanel_autosync_text">Auto Sync</string>
<string name="quickpanel_brightness_text">Brightness</string>
<string name="quickpanel_screen_timeout_text">Timeout</string>
<string name="quickpanel_lockscreen_text">Lockscreen</string>
<string name="quickpanel_airplane_text">Flightmode</string>
<string name="quickpanel_flashlight_text">Flashlight</string>
<string name="quickpanel_reboot_text">Reboot</string>
<string name="quickpanel_shutdown_text">Shutdown</string>
<string name="airplane_mode">In Flight mode</string>
<string name="shutdown_confirm">Your phone will shut down.</string>
<string name="screen_timeout_seconds">Screen timeout set to: %d second(s)</string>
<string name="screen_timeout_minutes">Screen timeout set to: %d minute(s)</string>
<string name="screen_timeout_hours">Screen timeout set to: %d hour(s)</string>
<string name="hamster">Phone Options</string>
<string name="yes">OK</string>
<string name="no">Cancel</string>
<string name="reboot">Reboot</string>
<string name="reboot_recovery">Recovery</string>
<string name="reboot_download">Download</string>
<string name="quickpanel_nfc_text">NFC</string>
<string name="quickpanel_wifi_ap_text">Wifi AP</string>
<string name="quickpanel_lockscreen_action_text">Sleep</string>
<string name="quickpanel_androidbeam_text">Android Beam</string>
<string name="brightness_settings_automatic">AUTO</string>
<string name="brightness_settings_title" />
<string name="quickpanel_usb_debugging_text">Debugging</string>
<string name="quickpanel_usb_connection_mode_text">USB Mode</string>
<string name="quickpanel_usb_current_mtp_title">Current mode: MPT</string>
<string name="quickpanel_usb_current_msc_title">Current mode: MSC</string>
<string name="usb_mpt_mode">MPT - Media Transfer</string>
<string name="usb_msc_mode">MSC - Mass Storage</string>
<string name="quickpanel_stay_awake_plugged_text">Stay Awake</string>
<string name="quickpanel_battery_info_text">Battery</string>
<string name="battery_info_info">Battery Information</string>
<string name="battery_info_usage">Battery Power Usage</string>
<string name="quickpanel_playpause_text">Play-Pause</string>
<string name="quickpanel_next_text">Next</string>
<string name="quickpanel_previous_text">Previous</string>
<string name="quickpanel_screenshots_text">Screenshot</string>[/COLOR]
</resources>
- Done and recompile your systemUI.apk
NOTE :
if you are using Apk Tool 2.0 or newer, and gettings error recompiling in the smali file,. check this explanation by :
- Recognized Themer @lacoursiere18 , here http://forum.xda-developers.com/showpost.php?p=53798727&postcount=34
and by Recognized Themer @Ticklefish, here http://forum.xda-developers.com/showpost.php?p=53824313&postcount=37
Credits and Thanks to them
STEP - 2
- Decompile the newly Recompiled APK again
Next go to
res/values/public.xml
open it with Notepad++
leave it, but keep it open
- smali/com/android/systemui/statusbar/phone/PhoneStatusBar.smali
add the red lines :
Code:
.field private mOldPlmn:Ljava/lang/String;
.field mPixelFormat:I
.field private mPlmnLabel:Landroid/widget/TextView;
.field mPositionTmp:[I
.field mPostCollapseCleanup:Ljava/lang/Runnable;
[COLOR="Red"].field mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;[/COLOR]
.field private mPreviousConfigFontScale:F
.field private mPrevioutConfigOrientation:I
.field mQS:Lcom/android/systemui/statusbar/phone/QuickSettings;
.field mQueueLock:Ljava/lang/Object;
.field private mRecentsClickListener:Landroid/view/View$OnClickListener;
Code:
.end local v6 #signal:Landroid/view/View;
.end local v7 #systemIcons:Landroid/view/View;
:cond_0
iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOutAnimation:Landroid/animation/Animator;
invoke-virtual {v8}, Landroid/animation/Animator;->cancel()V
.line 2213
iget-object v8, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOnAnimation:Landroid/animation/Animator;
invoke-virtual {v8}, Landroid/animation/Animator;->cancel()V
.line 2215
if-eqz p1, :cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOutAnimation:Landroid/animation/Animator;
.line 2216
.local v0, a:Landroid/animation/Animator;
:goto_0
invoke-virtual {v0}, Landroid/animation/Animator;->start()V
.line 2218
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setAreThereNotifications()V
.line 2219
return-void
.line 2215
.end local v0 #a:Landroid/animation/Animator;
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mLightsOnAnimation:Landroid/animation/Animator;
goto :goto_0
.end method
[COLOR="Red"].method private setupPowerWidget()V
.locals 2
.prologue
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;
const v1, [COLOR="Blue"]0x7f08012a[/COLOR]
invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;
move-result-object v0
check-cast v0, Lcom/adi/systemui/powerwidget/PowerWidget;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/adi/systemui/powerwidget/PowerWidget;->setupWidget()V
iput-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPowerWidget:Lcom/adi/systemui/powerwidget/PowerWidget;
invoke-virtual {v0}, Lcom/adi/systemui/powerwidget/PowerWidget;->updateWidget()V
return-void
.end method[/COLOR]
.method private showAlwaysAskOrInternetCall(J)V
.locals 3
.parameter "simId"
.prologue
const/4 v2, 0x0
.line 3231
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIconShow:Z
.line 3232
const-wide/16 v0, -0x2
cmp-long v0, p1, v0
if-nez v0, :cond_0
.line 3233
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;
const v1, 0x7f020137
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V
.line 3239
:goto_0
iget-boolean v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mAirplaneMode:Z
if-nez v0, :cond_2
.line 3240
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;
invoke-virtual {v0, v2}, Landroid/widget/ImageView;->setVisibility(I)V
.line 3245
:goto_1
return-void
.line 3234
:cond_0
const-wide/16 v0, -0x3
cmp-long v0, p1, v0
if-nez v0, :cond_1
.line 3235
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;
const v1, 0x7f020136
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V
goto :goto_0
.line 3237
:cond_1
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSimIndicatorIcon:Landroid/widget/ImageView;
const v1, 0x7f020135
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setBackgroundResource(I)V
goto :goto_0
change this, 0x7f08012a according to the value you got in your own public.xml
Code:
<public type="id" name="adi_widget" id="0x7f??????" />
search this method
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
scroll down in that method and add the red line
Code:
move-object/from16 v0, p0
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v11, v1, v12}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 772
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->resetUserSetupObserver()V
[COLOR="Red"] invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V[/COLOR]
.line 774
new-instance v20, Landroid/content/IntentFilter;
invoke-direct/range {v20 .. v20}, Landroid/content/IntentFilter;-><init>()V
.line 775
.local v20, simInfoIntentFilter:Landroid/content/IntentFilter;
const-string v1, "android.intent.action.SIM_SETTING_INFO_CHANGED"
OR
you can put the line here
Code:
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mMediaEjectBroadcastReceiver:Landroid/content/BroadcastReceiver;
invoke-virtual {v11, v1, v15}, Landroid/content/Context;->registerReceiver(Landroid/content/BroadcastReceiver;Landroid/content/IntentFilter;)Landroid/content/Intent;
.line 800
move-object/from16 v0, p0
[COLOR="Red"] invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V[/COLOR]
iget-object v1, v0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarView:Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
return-object v1
.line 440
.end local v12 #filter:Landroid/content/IntentFilter;
.end local v14 #indicator:Lcom/android/systemui/statusbar/toolbar/ToolBarIndicator;
.end local v15 #mediaEjectFilter:Landroid/content/IntentFilter;
.end local v19 #signalCluster:Lcom/android/systemui/statusbar/SignalClusterViewGemini;
.end local v20 #simInfoIntentFilter:Landroid/content/IntentFilter;
.end local v21 #tickerView:Lcom/android/systemui/statusbar/phone/TickerView;
:cond_d
const/4 v1, 0x0
goto/16 :goto_0
NOTE !! if your device / os
Code:
.method protected makeStatusBarView()Lcom/android/systemui/statusbar/phone/PhoneStatusBarView;
doesn't have this line
Code:
move-object/from16 v0, p0
change this
Code:
invoke-direct/range {p0 .. p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V
to like this
Code:
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setupPowerWidget()V
STEP -3
Next : Download attached Powerwidget_public, and open it with Notepad++
so you have two public.xml now which is opened in the Notepad++
1. secondly decompiled public.xml
2. Powerwidget_public.xml
- go to , smali/com/adi/systemui/powerwidget/here...
there are a lot of smalis there
FIND ALL IDS in all that smalis THAT'S STARTED WITH
Code:
0x7fxxxxxx
EXAMPLE :
AutoRotateButton.smali
Code:
.method protected getText()I
.locals 1
const v0, [COLOR="Red"]0x7f0b00f9[/COLOR]
return v0
.end method
find this const v0, 0x7f0b00f9 in PowerWidget_public.xml what is calling for
and we find that is for
Code:
<public type="[COLOR="Red"]string[/COLOR]" name="[COLOR="Red"]quickpanel_rotation_text[/COLOR]" id="[COLOR="Blue"]0x7f0b00f9[/COLOR]" />
the IDS can be strings, ids, integer, arays, drawable, or layout, so you have to pay attention to this
next go to your own public.xml search for the value you got
Code:
<public type="[COLOR="Red"]string[/COLOR]" name="[COLOR="Red"]quickpanel_rotation_text[/COLOR]" id="[COLOR="Blue"]0x7f0??????[/COLOR]" />
and change the IDS in the smali with your own value
Code:
.method protected getText()I
.locals 1
const v0, [COLOR="Blue"]0x7f0??????[/COLOR]
return v0
.end method
Do it too, to all
Code:
0x7fxxxxxx
in all smalis in the Powerwidget folder.
STEP - 4
- Disable signature check
here : http://forum.xda-developers.com/showthread.php?t=1698352
or in here : http://forum.xda-developers.com/showpost.php?p=47592101&postcount=3
- AndroidManifest.xml
add the red line
Code:
<manifest [COLOR="Red"]android:sharedUserId="android.uid.system" android:process="system"[/COLOR] android:versionCode="17" android:versionName="4.2.2-eng.njdbuild03.1389868812" package="com.android.systemui" coreApp="true"
Code:
<uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
[COLOR="Red"]<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />[/COLOR]
<application android:label="@string/app_label" android:icon="@*android:drawable/platlogo" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false">
<service android:name="SystemUIService" android:exported="true" />
<service android:name=".screenshot.TakeScreenshotService" android:exported="false" android:process=":screenshot" />
Code:
<service android:label="@string/jelly_bean_dream_name" android:name=".BeanBagDream" android:enabled="false" android:exported="true">
<intent-filter>
<action android:name="android.service.dreams.DreamService" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
<activity android:theme="@*android:style/Theme.Wallpaper.NoTitleBar" android:label="@string/start_dreams" android:icon="@mipmap/ic_launcher_dreams" android:name=".Somnambulator" android:exported="true" android:excludeFromRecents="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.DESK_DOCK" />
</intent-filter>
</activity>
[COLOR="Red"]<receiver android:name="com.adi.systemui.powerwidget.NetworkModeReceiver" android:process="com.android.phone">
<intent-filter>
<action android:name="com.serajr.powertoggles.POWERTOGGLES_CHANGE_NETWORK_MODE" />
<action android:name="com.serajr.powertoggles.POWERTOGGLES_NEW_NETWORK_MODE" />
</intent-filter>
</receiver>[/COLOR]
</application>
</manifest>
- Done and recompile it , don't forget to sign it,
I ussually use ApkMultitools to decompile/recompile/sign APK
so if you use ApkMultitools, you can use my signer keys
download attached file, exstract it and merge to your ApkMultitools / other / here
- Download Attached Powerwidget.apk and Torch.apk, push it to your system/app/reboot
- edit your build.prop , to make USB connection mode toggle working properly
Code:
ro.sys.usb.storage.type=mtp[COLOR="Red"],mass_storage[/COLOR]
Additional :
- if the Flashlight toggle force closes, try to use this Torch.apk by raffie_archildz http://d-h.st/n99
- But if still force closes try to use this guide
if the Flashlight toggle from the guide doesn't work, try to use this smali http://d-h.st/mgb
- and don't forget to match the IDS too,.
- AndroidManifest.xml
Code:
<uses-permission android:name="android.permission.ACCESS_ALL_DOWNLOADS" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
[COLOR="Red"]<uses-permission android:name="android.permission.CAMERA" />[/COLOR]
[COLOR="Blue"]<uses-permission android:name="android.permission.REBOOT" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />[/COLOR]
<application android:label="@string/app_label" android:icon="@*android:drawable/platlogo" android:allowClearUserData="false" android:persistent="true" android:allowBackup="false">
<service android:name="SystemUIService" android:exported="true" />
Screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
fertamax om :victory: !!
Thread Updated !, please use New_PowerWidget.apk,.
cuz re-order prefrence doesn't work on the old PowerWidget.apk
:laugh:
Finally EPIC mod for Mediatek has come.
Thanx mastah!
Thanks a lot
Thanks a lot SIR for making a guide for MTK Devices ..Will try today .....
Great job!!
Another awesome write up!! Congrats bro!!
And you have used my network mode receiver too... great! :highfive:
thanx...
Thanks a ton !!! Great Guide
got working in 2nd try on my Mediatek mt6577 (LAVA IRIS 405) DEVICE with JB 4.2.2 ...
thanks a lot ....
But if i toggle to 3g mode then no network .
still i need to fix reboot and flashlight rest all working fine i've attached logcat of reboot fc pls have a look, i googled didn't find anything useful
Again thanks a lot for this mod :good:
pavan kr said:
got working in 2nd try on my Mediatek mt6577 (LAVA IRIS 405) DEVICE with JB 4.2.2 ...
thanks a lot ....
But if i toggle to 3g mode then no network .
still i need to fix reboot and flashlight rest all working fine i've attached logcat of reboot fc pls have a look, i googled didn't find anything useful
Again thanks a lot for this mod :good:
Click to expand...
Click to collapse
please check again all IDS in your smali got the correct value
ihiirrrrr love it ....work like a charm mastah...on imo raptor...:good:
wow
:good:work ...thx teacher
your awesome...another great guides from u... sungkem dulu ama guru... _/|\_
thanks...
Sent from my GT-I9152 using Tapatalk
It's touchwiz 4.2 :good::laugh:
budi78 said:
:good:work ...thx teacher
Click to expand...
Click to collapse
sitifire said:
your awesome...another great guides from u... sungkem dulu ama guru... _/|\_
thanks...View attachment 2791477
Sent from my GT-I9152 using Tapatalk
Click to expand...
Click to collapse
awesome guide suhu sangat sangat Thanks :good:
thanks lord adi...
Working in my MTK device..
Working in my MTK device.. But pls someone help me to understand the Steps .. Wrongs icons and names and icons merging with the toggle names
Hi all, this time I want to provide a "Header Machine Guide", this guide for change the background of Expanded Header.. Hopefully it works for all ..
This guide is based on the Asus Zenfone 4S (T00Q) Lollipop firmware.
Feature:
Header BG with option (Default, Color, BG Picker, Timer/Omni)
Header BG Timer/Omni style (Default, Modern, Poly)
Header BG alpha
Header BG animation
Enable/disable blur BG
Add options to set date for Idul Fitri, Idul Adha and birthday
Add Blur BG preview
Requirement:
- Understanding about APK compile/decompile
- APKTool
- Notepad++ (PC)
Step:
Part AsusSystemUI:
1. Decompile AsusSystemUI.apk
2. Copy smali and res folder from guide to your systemui.. Overwrite if exist..
3. Open AndroidManifest.xml
Find:
Code:
<activity android:excludeFromRecents="true" android:name="com.android.keyguard.KeyguardIntruderView" android:screenOrientation="portrait" android:theme="@android:style/Theme.Translucent">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
Add this just below:
Code:
<activity android:theme="@android:style/Theme.Holo" android:label="Header Machine Preference" android:icon="@null" android:name="com.bamzzz.prefs.HeaderMachineActivity" android:excludeFromRecents="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
4. Open res/layout/asus_status_bar_expanded_header.xml (Asus) or status_bar_expanded_header.xml (Other phone)
Find:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.StatusBarHeaderView android:layout_gravity="@integer/notification_panel_layout_gravity" android:id="@id/header" android:background="@null" android:paddingBottom="@dimen/asus_quicksetting_panel_header_padding_bottom" android:focusable="true" android:clickable="true" android:layout_width="@dimen/notification_panel_width" android:layout_height="@dimen/asus_status_bar_header_height" android:baselineAligned="false" android:paddingStart="@dimen/notification_side_padding" android:paddingEnd="@dimen/notification_side_padding"
xmlns:android="http://schemas.android.com/apk/res/android">
Add this just below:
Code:
<com.bamzzz.HeaderMachine android:id="@id/header_machine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:scaleType="fitXY"
android:adjustViewBounds="true" />
For Asus Zenfone only:
Find:
Code:
<Button android:textSize="@dimen/asus_notification_clear_all_text_size" android:textColor="@color/asus_notification_clear_all_text_color" android:id="@id/clear_all_button" android:background="@drawable/ic_notify_clear" android:layout_width="wrap_content" android:layout_height="@dimen/asus_notification_clear_all_height" android:text="@string/status_bar_clear_all_button" android:layout_alignParentBottom="true" android:contentDescription="@string/accessibility_clear_all" android:fontFamily="sans-serif" android:layout_marginEnd="@dimen/asus_quicksetting_button_margin_right" android:layout_alignParentEnd="true" />
Add this after "<Button "
Code:
android:layout_marginBottom="@dimen/asus_quicksetting_panel_header_padding_bottom"
Looks like this:
Code:
<Button [COLOR="Blue"]android:layout_marginBottom="@dimen/asus_quicksetting_panel_header_padding_bottom"[/COLOR] android:textSize="@dimen/asus_notification_clear_all_text_size" android:textColor="@color/asus_notification_clear_all_text_color" android:id="@id/clear_all_button" android:background="@drawable/ic_notify_clear" android:layout_width="wrap_content" android:layout_height="@dimen/asus_notification_clear_all_height" android:text="@string/status_bar_clear_all_button" android:layout_alignParentBottom="true" android:contentDescription="@string/accessibility_clear_all" android:fontFamily="sans-serif" android:layout_marginEnd="@dimen/asus_quicksetting_button_margin_right" android:layout_alignParentEnd="true" />
5. Open res/values/ids.xml and add this:
Code:
<item type="id" name="header_machine">false</item>
<item type="id" name="header_machine_layout">false</item>
<item type="id" name="header_machine_time_title">false</item>
<item type="id" name="header_machine_idul_fitri_text">false</item>
<item type="id" name="header_machine_idul_fitri_button">false</item>
<item type="id" name="header_machine_idul_adha_text">false</item>
<item type="id" name="header_machine_idul_adha_button">false</item>
<item type="id" name="header_machine_birthday_text">false</item>
<item type="id" name="header_machine_birthday_button">false</item>
<item type="id" name="header_machine_background_title">false</item>
<item type="id" name="header_machine_background_content">false</item>
<item type="id" name="header_machine_checkBlur">false</item>
<item type="id" name="header_machine_background_button_pick">false</item>
<item type="id" name="header_machine_background_button_set">false</item>
<item type="id" name="header_machine_tip_text">false</item>
6. This step should not be applied !!! Especially for Asus Zenfone, is used to remove the default background or default theme:
Open /smali/com/android/systemui/statusbar/phone/StatusBarHeaderView.smali
Find:
Code:
# instance fields
Add this just below:
Code:
.field private mHeaderMachine:I
Find:
Code:
.method private setImageViewDrawable()V
Then find:
Code:
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setBackground(Landroid/graphics/drawable/Drawable;)V
Add this just above:
Code:
iget v8, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mHeaderMachine:I
const/4 v9, 0x0
if-ne v8, v9, :cond_brut
const-string v8, "BamzzzHeaderMachine"
new-instance v9, Ljava/lang/StringBuilder;
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
const-string v10, "Header Machine disable -> "
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v9
iget v10, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mHeaderMachine:I
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v9
invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v9
invoke-static {v8, v9}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
Find again:
Code:
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setBackground(Landroid/graphics/drawable/Drawable;)V
Add this just below:
Code:
goto :goto_brutt
:cond_brut
const-string v8, "BamzzzHeaderMachine"
new-instance v9, Ljava/lang/StringBuilder;
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
const-string v10, "Header Machine enable -> "
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v9
iget v10, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mHeaderMachine:I
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v9
invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v9
invoke-static {v8, v9}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
const/4 v8, 0x0
invoke-virtual {p0, v8}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setBackgroundResource(I)V
:goto_brutt
Find:
Code:
.line 199
.local v8, "paddingBottom":I
const/4 v12, 0x0
invoke-virtual {p0, v7, v12, v7, v8}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setPaddingRelative(IIII)V
.line 200
return-void
Above it add:
Code:
const/4 v8, 0x0
Find:
Code:
.method public updateEverything()V
Above return void add:
Code:
invoke-static {}, Lcom/bamzzz/HeaderMachine;->getVisibilities()I
move-result v0
iput v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mHeaderMachine:I
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setImageViewDrawable()V
7. Recompile SystemUI, then push and reboot phone.
8. Done
Part Settings:
Goto post 2
Attention: Don't rename or modify path of smali from this guide without my permissions !!!
Header Machine demo video: https://youtu.be/TaFGTlTdrMI
Created by [email protected]
fb.me/bamz4ever
http://forum.xda-developers.com/member.php?u=4672359
ZenControl by [email protected] & [email protected]
http://forum.xda-developers.com/android/apps-games/app-rom-control-app-devs-t3146567
Idea from StatusBar Header Machine and some drawables and some methods from OmniROM Project
Thanks to SyahrulLail for idea of Date picker preference
Part Settings
Optional..!!! You can using ZenControl.apk (Lollipop only) or/and include preference into Settings.apk
Add Preference using ZenControl.apk :
1. Decompile ZenControl.apk
2. Open res/xml/dropdown_prefs.xml and add this:
Code:
<PreferenceScreen android:title="@string/header_machine_title" android:summary="@string/header_machine_summary">
<PreferenceCategory android:title="@string/header_machine_title" />
<com.wubydax.romcontrol.prefs.MyListPreference
android:entries="@array/header_machine_style_entries"
android:title="@string/header_machine_style_title"
android:key="header_machine_style"
android:defaultValue="3"
android:entryValues="@array/header_machine_style_values" />
<com.wubydax.romcontrol.prefs.MyListPreference
android:entries="@array/header_machine_bg_style_entries"
android:title="@string/header_machine_bg_style_title"
android:key="header_machine_bg_style"
android:defaultValue="1"
android:entryValues="@array/header_machine_bg_style_values" />
<com.wubydax.romcontrol.prefs.ColorPickerPreference
android:title="@string/header_machine_color_title"
android:key="header_machine_color"
android:defaultValue="\#00000000"
alphaSlider="true" />
<com.wubydax.romcontrol.prefs.SeekBarPreference
android:icon="@null"
android:max="255"
android:title="@string/header_machine_bg_alpha_title"
android:key="header_machine_bg_image_alpha"
android:defaultValue="100"
min="0"
unitsRight="" />
<CheckBoxPreference
android:defaultValue="false"
android:title="@string/header_machine_bg_animated_title"
android:key="header_machine_bg_animated"
android:summaryOn="@string/header_machine_enable"
android:summaryOff="@string/header_machine_disable" />
<CheckBoxPreference
android:defaultValue="false"
android:title="@string/header_machine_bg_image_blur_title"
android:key="header_machine_bg_image_blur"
android:summaryOn="@string/header_machine_enable"
android:summaryOff="@string/header_machine_disable" />
<PreferenceScreen
android:summary="@string/header_machine_preference_summary"
android:title="@string/header_machine_preference_title">
<intent
android:targetClass="com.bamzzz.prefs.HeaderMachineActivity"
android:targetPackage="com.android.systemui" />
</PreferenceScreen>
</PreferenceScreen>
3. Open res/values/strings.xml then add this:
Code:
<string name="header_machine_title">Header Machine</string>
<string name="header_machine_summary">Enable various bg options in expanded header</string>
<string name="header_machine_style_title">Header Machine Style</string>
<string name="header_machine_style_1_title">Default</string>
<string name="header_machine_style_2_title">Color</string>
<string name="header_machine_style_3_title">Custom Image</string>
<string name="header_machine_style_4_title">Timer (OMNI)</string>
<string name="header_machine_bg_style_title">Timer Background Style</string>
<string name="header_machine_bg_style_1_title">Default</string>
<string name="header_machine_bg_style_2_title">Modern</string>
<string name="header_machine_bg_style_3_title">Poly HD</string>
<string name="header_machine_color_title">Header Color</string>
<string name="header_machine_bg_alpha_title">Header BG Alpha</string>
<string name="header_machine_bg_animated_title">BG Animated</string>
<string name="header_machine_bg_image_blur_title">Blur BG</string>
<string name="header_machine_enable">Enable</string>
<string name="header_machine_disable">Disable</string>
<string name="header_machine_preference_title">Header Machine Preference</string>
<string name="header_machine_preference_summary">Set Header Machine Date and Custom Image Background</string>
4. Open res/values/arrays.xml and add this:
Code:
<string-array name="header_machine_bg_style_entries">
<item>@string/header_machine_bg_style_1_title</item>
<item>@string/header_machine_bg_style_2_title</item>
<item>@string/header_machine_bg_style_3_title</item>
</string-array>
<string-array name="header_machine_bg_style_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="header_machine_style_entries">
<item>@string/header_machine_style_1_title</item>
<item>@string/header_machine_style_2_title</item>
<item>@string/header_machine_style_3_title</item>
<item>@string/header_machine_style_4_title</item>
</string-array>
<string-array name="header_machine_style_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
5. Recompile ZenControl..
6. Install ZenControl.apk
Add Preference include settings:
1. First apply my guide: http://forum.xda-developers.com/zenfone-4/themes-apps/guide-easy-preference-control-t3317849
2. Open res/xml/zen_prefs.xml and add this
Code:
<PreferenceScreen android:title="@string/header_machine_title" android:summary="@string/header_machine_summary">
<com.android.settings.bamzzz.prefs.MyListPreference
android:entries="@array/header_machine_style_entries"
android:title="@string/header_machine_style_title"
android:key="header_machine_style"
android:defaultValue="3"
android:entryValues="@array/header_machine_style_values" />
<com.android.settings.bamzzz.prefs.MyListPreference
android:entries="@array/header_machine_bg_style_entries"
android:title="@string/header_machine_bg_style_title"
android:key="header_machine_bg_style"
android:defaultValue="1"
android:entryValues="@array/header_machine_bg_style_values" />
<com.android.settings.bamzzz.prefs.ColorPickerPreference
android:title="@string/header_machine_color_title"
android:key="header_machine_color"
android:defaultValue="\#00000000"
alphaSlider="true" />
<com.android.settings.bamzzz.prefs.SeekBarPreference
android:icon="@null"
android:max="255"
android:title="@string/header_machine_bg_alpha_title"
android:key="header_machine_bg_image_alpha"
android:defaultValue="100"
min="0"
unitsRight="" />
<CheckBoxPreference
android:defaultValue="false"
android:title="@string/header_machine_bg_animated_title"
android:key="header_machine_bg_animated"
android:summaryOn="@string/header_machine_enable"
android:summaryOff="@string/header_machine_disable" />
<CheckBoxPreference
android:defaultValue="false"
android:title="@string/header_machine_bg_image_blur_title"
android:key="header_machine_bg_image_blur"
android:summaryOn="@string/header_machine_enable"
android:summaryOff="@string/header_machine_disable" />
<PreferenceScreen
android:summary="@string/header_machine_preference_summary"
android:title="@string/header_machine_preference_title">
<intent
android:targetClass="com.bamzzz.prefs.HeaderMachineActivity"
android:targetPackage="com.android.systemui" />
</PreferenceScreen>
</PreferenceScreen>
3. Open res/values/strings.xml and add this:
Code:
<string name="header_machine_title">Header Machine</string>
<string name="header_machine_summary">Enable various bg options in expanded header</string>
<string name="header_machine_style_title">Header Machine Style</string>
<string name="header_machine_style_1_title">Default</string>
<string name="header_machine_style_2_title">Color</string>
<string name="header_machine_style_3_title">Custom Image</string>
<string name="header_machine_style_4_title">Timer (OMNI)</string>
<string name="header_machine_bg_style_title">Timer Background Style</string>
<string name="header_machine_bg_style_1_title">Default</string>
<string name="header_machine_bg_style_2_title">Modern</string>
<string name="header_machine_bg_style_3_title">Poly HD</string>
<string name="header_machine_color_title">Header Color</string>
<string name="header_machine_bg_alpha_title">Header BG Alpha</string>
<string name="header_machine_bg_animated_title">BG Animated</string>
<string name="header_machine_bg_image_blur_title">Blur BG</string>
<string name="header_machine_enable">Enable</string>
<string name="header_machine_disable">Disable</string>
<string name="header_machine_preference_title">Header Machine Preference</string>
<string name="header_machine_preference_summary">Set Header Machine Date and Custom Image Background</string>
4. Open res/values/arrays.xml and add this:
Code:
<string-array name="header_machine_bg_style_entries">
<item>@string/header_machine_bg_style_1_title</item>
<item>@string/header_machine_bg_style_2_title</item>
<item>@string/header_machine_bg_style_3_title</item>
</string-array>
<string-array name="header_machine_bg_style_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
</string-array>
<string-array name="header_machine_style_entries">
<item>@string/header_machine_style_1_title</item>
<item>@string/header_machine_style_2_title</item>
<item>@string/header_machine_style_3_title</item>
<item>@string/header_machine_style_4_title</item>
</string-array>
<string-array name="header_machine_style_values" translatable="false">
<item>0</item>
<item>1</item>
<item>2</item>
<item>3</item>
</string-array>
5. Compile Settings. Done.
Attention: Don't rename or modify path of smali from this guide without my permissions !!!
Fix header machine on some devices
Fix header machine on some devices
Download attached file (smaliheader2.zip) and overwrite existing smali.. Then
Replace old script from statusbar_expanded_header.xml with this:
Code:
<com.bamzzz.HeaderMachine
android:id="@id/header_machine"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
Rebuild your SystemUI.. Done.
nicee niceee niceeeeeeeee :3
Yeay mas octo..
Why not for Asus ZenFone 400cg... and is there any way to change battery icon without xposed and disable headsup notification ( except calls ) with out xposed
....
Sent from my ASUS_T00I using XDA Free mobile app
Bro its affect on my notification bg ...my header is still black can you please help me
bamzzz said:
Hi all, this time I want to provide a "Header Machine Guide", this guide for change the background of Expanded Header.. Hopefully it works for all ..
This guide is based on the Asus Zenfone 4S (T00Q) Lollipop firmware.
Feature:
Header BG with option (Default, Color, BG Picker, Timer/Omni)
Header BG Timer/Omni style (Default, Modern, Poly)
Header BG alpha
Header BG animation
Enable/disable blur BG
Add options to set date for Idul Fitri, Idul Adha and birthday
Add Blur BG preview
Requirement:
- Understanding about APK compile/decompile
- APKTool
- Notepad++ (PC)
Step:
Part AsusSystemUI:
1. Decompile AsusSystemUI.apk
2. Copy smali and res folder from guide to your systemui.. Overwrite if exist..
3. Open AndroidManifest.xml
Find:
Code:
<activity android:excludeFromRecents="true" android:name="com.android.keyguard.KeyguardIntruderView" android:screenOrientation="portrait" android:theme="@android:style/Theme.Translucent">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
Add this just below:
Code:
<activity android:theme="@android:style/Theme.Holo" android:label="Header Machine Preference" android:icon="@null" android:name="com.bamzzz.prefs.HeaderMachineActivity" android:excludeFromRecents="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
4. Open res/layout/asus_status_bar_expanded_header.xml (Asus) or status_bar_expanded_header.xml (Other phone)
Find:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.StatusBarHeaderView android:layout_gravity="@integer/notification_panel_layout_gravity" android:id="@id/header" android:background="@null" android:paddingBottom="@dimen/asus_quicksetting_panel_header_padding_bottom" android:focusable="true" android:clickable="true" android:layout_width="@dimen/notification_panel_width" android:layout_height="@dimen/asus_status_bar_header_height" android:baselineAligned="false" android:paddingStart="@dimen/notification_side_padding" android:paddingEnd="@dimen/notification_side_padding"
xmlns:android="http://schemas.android.com/apk/res/android">
Add this just below:
Code:
<com.bamzzz.HeaderMachine android:id="@id/header_machine"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:scaleType="fitXY"
android:adjustViewBounds="true" />
For Asus Zenfone only:
Find:
Code:
<Button android:textSize="@dimen/asus_notification_clear_all_text_size" android:textColor="@color/asus_notification_clear_all_text_color" android:id="@id/clear_all_button" android:background="@drawable/ic_notify_clear" android:layout_width="wrap_content" android:layout_height="@dimen/asus_notification_clear_all_height" android:text="@string/status_bar_clear_all_button" android:layout_alignParentBottom="true" android:contentDescription="@string/accessibility_clear_all" android:fontFamily="sans-serif" android:layout_marginEnd="@dimen/asus_quicksetting_button_margin_right" android:layout_alignParentEnd="true" />
Add this after "<Button "
Code:
android:layout_marginBottom="@dimen/asus_quicksetting_panel_header_padding_bottom"
Looks like this:
Code:
<Button [COLOR="Blue"]android:layout_marginBottom="@dimen/asus_quicksetting_panel_header_padding_bottom"[/COLOR] android:textSize="@dimen/asus_notification_clear_all_text_size" android:textColor="@color/asus_notification_clear_all_text_color" android:id="@id/clear_all_button" android:background="@drawable/ic_notify_clear" android:layout_width="wrap_content" android:layout_height="@dimen/asus_notification_clear_all_height" android:text="@string/status_bar_clear_all_button" android:layout_alignParentBottom="true" android:contentDescription="@string/accessibility_clear_all" android:fontFamily="sans-serif" android:layout_marginEnd="@dimen/asus_quicksetting_button_margin_right" android:layout_alignParentEnd="true" />
5. Open res/values/ids.xml and add this:
Code:
<item type="id" name="header_machine">false</item>
<item type="id" name="header_machine_layout">false</item>
<item type="id" name="header_machine_time_title">false</item>
<item type="id" name="header_machine_idul_fitri_text">false</item>
<item type="id" name="header_machine_idul_fitri_button">false</item>
<item type="id" name="header_machine_idul_adha_text">false</item>
<item type="id" name="header_machine_idul_adha_button">false</item>
<item type="id" name="header_machine_birthday_text">false</item>
<item type="id" name="header_machine_birthday_button">false</item>
<item type="id" name="header_machine_background_title">false</item>
<item type="id" name="header_machine_background_content">false</item>
<item type="id" name="header_machine_checkBlur">false</item>
<item type="id" name="header_machine_background_button_pick">false</item>
<item type="id" name="header_machine_background_button_set">false</item>
<item type="id" name="header_machine_tip_text">false</item>
6. This step should not be applied !!! Especially for Asus Zenfone, is used to remove the default background or default theme:
Open /smali/com/android/systemui/statusbar/phone/StatusBarHeaderView.smali
Find:
Code:
# instance fields
Add this just below:
Code:
.field private mHeaderMachine:I
Find:
Code:
.method private setImageViewDrawable()V
Then find:
Code:
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setBackground(Landroid/graphics/drawable/Drawable;)V
Add this just above:
Code:
iget v8, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mHeaderMachine:I
const/4 v9, 0x0
if-ne v8, v9, :cond_brut
const-string v8, "BamzzzHeaderMachine"
new-instance v9, Ljava/lang/StringBuilder;
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
const-string v10, "Header Machine disable -> "
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v9
iget v10, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mHeaderMachine:I
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v9
invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v9
invoke-static {v8, v9}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
Find again:
Code:
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setBackground(Landroid/graphics/drawable/Drawable;)V
Add this just below:
Code:
goto :goto_brutt
:cond_brut
const-string v8, "BamzzzHeaderMachine"
new-instance v9, Ljava/lang/StringBuilder;
invoke-direct {v9}, Ljava/lang/StringBuilder;-><init>()V
const-string v10, "Header Machine enable -> "
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v9
iget v10, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mHeaderMachine:I
invoke-virtual {v9, v10}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object v9
invoke-virtual {v9}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v9
invoke-static {v8, v9}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
const/4 v8, 0x0
invoke-virtual {p0, v8}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setBackgroundResource(I)V
:goto_brutt
Find:
Code:
.line 199
.local v8, "paddingBottom":I
const/4 v12, 0x0
invoke-virtual {p0, v7, v12, v7, v8}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setPaddingRelative(IIII)V
.line 200
return-void
Above it add:
Code:
const/4 v8, 0x0
Find:
Code:
.method public updateEverything()V
Above return void add:
Code:
invoke-static {}, Lcom/bamzzz/HeaderMachine;->getVisibilities()I
move-result v0
iput v0, p0, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->mHeaderMachine:I
invoke-direct {p0}, Lcom/android/systemui/statusbar/phone/StatusBarHeaderView;->setImageViewDrawable()V
7. Recompile SystemUI, then push and reboot phone.
8. Done
Part Settings:
Goto post 2
Attention: Don't rename or modify path of smali from this guide without my permissions !!!
Header Machine demo video: https://youtu.be/TaFGTlTdrMI
Created by [email protected]
fb.me/bamz4ever
http://forum.xda-developers.com/member.php?u=4672359
ZenControl by [email protected] & [email protected]
http://forum.xda-developers.com/android/apps-games/app-rom-control-app-devs-t3146567
Idea from StatusBar Header Machine and some drawables and some methods from OmniROM Project
Thanks to SyahrulLail for idea of Date picker preference
Click to expand...
Click to collapse
I cant
Find: the Code:
<activity android:excludeFromRecents="true" android:name="com.android.keyguard.KeyguardIntruderView" android:screenOrientation="portrait" android:theme="@android:style/Theme.Translucent">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
</intent-filter>
</activity>
and then I also add the code
<activity android:theme="@android:style/Theme.Holo" android:label="Header Machine Preference" android:icon="@null" android:name="com.bamzzz.prefs.HeaderMachineActivity" android:excludeFromRecents="true" android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
,I finish all the guide,I find that Blur Bg cant work, I also cant find Header machine preference MENU in the setting,can you help me,send from my aosp lollipop.
Someone tell me how to make so that the picture overlaps the area allocated for the screenshot?
Baru jajal...?
.Nice guide mbah..?
Sent from my A75 using XDA-Developers Legacy app
@bamzzz
I'm using Asus Padfone S 4.4.2, and I found out there are two related xmls there:
Code:
asus_status_bar_expanded_header.xml
status_bar_expanded_header.xml
Which one should I edit? Could you tell me why there are two similar function xmls existing there, is it the feature of Asus UI?
By the way, do you konw how to change navbar size in Asus UI? I already tried to mod related strings in framework-res.apk, but only the change of status bar worked, the navbar ones didn't.
Big appreciate for your magic:good:
Nice work sir. I like this mod but i never succeeded in Header Machine Preference section in Rom Control
awatheeye said:
Nice work sir. I like this mod but i never succeeded in Header Machine Preference section in Rom Control
Click to expand...
Click to collapse
I will appreciate more if you put everything needed in zen control and upload for downloading because my major problem is with the intent area as seen in my attachment.
Thanks nice
nice
can u give me a clue this guide to apply on miui rom...???