Related
Hi guys, since many are interested again on adding more icons in nav bar, I just want to give this info on how to make one. It's actually an original guide from rootzwiki page.
http://rootzwiki.com/topic/30278-how-to-step-by-step-guide-to-add-menu-and-search-soft-keys/
I won't rewrite here what has been mentioned there already but I'll try to help you guys in case you encounter any problem doing that mod. I thought of making this thread since we're better off posting here rather than there, coz I think there are more users here and their thread is long-time inactive already.
Many thanks to that guy(Detonation) in rootzwiki, it's the best guide that I came across to. You may also search for chrisjohn95's guide here in xda in nexus forum for other nav bar mod info.
It's in no way my original work, I'm just sharing this mod procedure so others can benefit as well.
EDIT: If there's a need to rewrite here, I'll do, just feedback to me. And to moderators, if this thread is unnecessary(since it's only a linked guide atm), pls feel free to remove the thread.
EDIT2: Sample for adding MENU permanent. - > At post #16
Tapatalked from my bricked TX
Have you tried it?
matt4321 said:
Have you tried it?
Click to expand...
Click to collapse
Yes, been my based mod for sometime.
Tapatalked from my bricked TX
Rycon33 said:
Yes, been my based mod for sometime.
Tapatalked from my bricked TX
Click to expand...
Click to collapse
Nice, does it look decent? May have to give it a try
I can concur this mod is sweet. I used it a while back, xperiment2.6.
I miss the permanent menu button.
matt4321 said:
Nice, does it look decent? May have to give it a try
Click to expand...
Click to collapse
Matt, below is a sample from my previous mod.
Tapatalked from my bricked TX
For TX 9.1.B.67 firmware only.
It's a shared folder for all my mods for 9.1.B.67 firmware, look for "navigation_bar_mods" folder for power-back-HOME-recent-menu nav icons
One thing to note, backup before flashing the zip as I didn't personally tested this particular mod, I have my own unique(or awkward) nav mod for myself.
http://www.mediafire.com/folder/lenfr4p337y6l/9.1.B.1.67_FW
Rycon33 said:
For TX 9.1.B.67 firmware only.
It's a shared folder for all my mods for 9.1.B.67 firmware, look for "navigation_bar_mods" folder for power-back-HOME-recent-menu nav icons
One thing to note, backup before flashing the zip as I didn't personally tested this particular mod, I have my own unique(or awkward) nav mod for myself.
http://www.mediafire.com/folder/lenfr4p337y6l/9.1.B.1.67_FW
Click to expand...
Click to collapse
The rootswiki paper doesn't mention how to add the power button.
May you add it here?
ashinh said:
The rootswiki paper doesn't mention how to add the power button.
May you add it here?
Click to expand...
Click to collapse
just replace the search with power:
.method public getPowerButton()Landroid/view/View;
.locals 2
.prologue
.line 97
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mCurrentView:Landroid/view/View;
const v1, 0x7f0c00ae
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
return-object v0
.end method
and:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;
move-result-object v6
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
move-result-object v7
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getPowerButton()Landroid/view/View;
move-result-object v8
if-eqz v1, :cond_6
move v3, v5
:goto_6
invoke-virtual {v6, v3}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {v7, v3}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {v8, v3}, Landroid/view/View;->setVisibility(I)V
The blue lines are the additional code. The id in red is the power I.D.
how can i av permanent menu brov?
whalesplaho said:
how can i av permanent menu brov?
Click to expand...
Click to collapse
same as what I posted above you but remove everything that concerns the "getPowerButton"
like this:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;
move-result-object v6
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
move-result-object v7
if-eqz v1, :cond_6
move v3, v5
:goto_6
invoke-virtual {v6, v3}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {v7, v3}, Landroid/view/View;->setVisibility(I)V
Rycon33 said:
just replace the search with power:
.method public getPowerButton()Landroid/view/View;
.locals 2
.prologue
.line 97
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/NavigationBarView;->mCurrentView:Landroid/view/View;
const v1, 0x7f0c00ae
invoke-virtual {v0, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
move-result-object v0
return-object v0
.end method
and:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;
move-result-object v6
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
move-result-object v7
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getPowerButton()Landroid/view/View;
move-result-object v8
if-eqz v1, :cond_6
move v3, v5
:goto_6
invoke-virtual {v6, v3}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {v7, v3}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {v8, v3}, Landroid/view/View;->setVisibility(I)V
The blue lines are the additional code. The id in red is the power I.D.
Click to expand...
Click to collapse
It's hard to combine this with 18 toggles.
Rycon33 said:
same as what I posted above you but remove everything that concerns the "getPowerButton"
like this:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;
move-result-object v6
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
move-result-object v7
if-eqz v1, :cond_6
move v3, v5
:goto_6
invoke-virtual {v6, v3}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {v7, v3}, Landroid/view/View;->setVisibility(I)V
Click to expand...
Click to collapse
dnt know how to do it... please can yhu post full tut here & also post tha files dat need to be downloaded?
download link not working on roowiki!
Ok guys, after the F1, I'll also rewrite the guide here in OP.
Tapatalked from my bricked TX
Rycon33 said:
Ok guys, after the F1, I'll also rewrite the guide here in OP.
Tapatalked from my bricked TX
Click to expand...
Click to collapse
hoping to see tha tut soon... thanks brov!
For adding "permanent" menu:
Decompile SystemUI.apk and go to SystemUI\smali\com\android\systemui\statusbar\phone, open the file NavigationBarView.smali and do the edit as below:
Look for .method public setDisabledFlags(IZ)V
Just immediately below that line, add one number to .locals because we're adding one new variable, it will look like below:
Code:
.method public setDisabledFlags(IZ)V
[COLOR="Red"].locals 8[/COLOR]
.parameter "disabledFlags"
.parameter "force"
Originally mine was .locals 7, so I just increase it to .locals 8
Further down below you will see this line:
Code:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;
move-result-object [COLOR="red"][B]v6[/B][/COLOR]
Insert the below line immediately after the code above.
Code:
[COLOR="Blue"][B]invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
move-result-object [COLOR="red"][B]v7[/B][/COLOR][/B][/COLOR]
And a little further down, you will see this:
Code:
invoke-virtual {[COLOR="red"][B]v6[/B][/COLOR], v3}, Landroid/view/View;->setVisibility(I)V
Insert the below line immediately after the code above.
Code:
[COLOR="Blue"][B]invoke-virtual {[COLOR="red"][B]v7[/B][/COLOR], v3}, Landroid/view/View;->setVisibility(I)V[/B][/COLOR]
Be mindful of V#, if previous is v6, you make yours to be v7
Next, find these two methods: .method public setMenuVisibility(Z)V and .method public setMenuVisibility(ZZ)V
Delete most of the contents of those two methods leaving it to look just like below:
Code:
.method public setMenuVisibility(Z)V
.locals 1
.parameter "show"
return-void
.end method
.method public setMenuVisibility(ZZ)V
.locals 2
.parameter "show"
.parameter "force"
return-void
.end method
Save your file NavigationBarView.smali, then proceed editing the navigation_bar.xml in SystemUI\res\layout.
Just copy mine replacing your original:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NavigationBarView android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="fill_parent" android:directionality="none"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/rot0" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_home" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/lights_out" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="@dimen/navigation_bar_deadzone_size" />
</FrameLayout>
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_recent_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_menu_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_home_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_back_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/lights_out" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:directionality="none">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="left" android:id="@id/deadzone" android:layout_width="@dimen/navigation_bar_deadzone_size" android:layout_height="fill_parent" />
</FrameLayout>
<View android:id="@id/rot270" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.NavigationBarView>
Rycon33 said:
For adding "permanent" menu:
Decompile SystemUI.apk and go to SystemUI\smali\com\android\systemui\statusbar\phone, open the file NavigationBarView.smali and do the edit as below:
Look for .method public setDisabledFlags(IZ)V
Just immediately below that line, add one number to .locals because we're adding one new variable, it will look like below:
Code:
.method public setDisabledFlags(IZ)V
[COLOR="Red"].locals 8[/COLOR]
.parameter "disabledFlags"
.parameter "force"
Originally mine was .locals 7, so I just increase it to .locals 8
Further down below you will see this line:
Code:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;
move-result-object [COLOR="red"][B]v6[/B][/COLOR]
Insert the below line immediately after the code above.
Code:
[COLOR="Blue"][B]invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
move-result-object [COLOR="red"][B]v7[/B][/COLOR][/B][/COLOR]
And a little further down, you will see this:
Code:
invoke-virtual {[COLOR="red"][B]v6[/B][/COLOR], v3}, Landroid/view/View;->setVisibility(I)V
Insert the below line immediately after the code above.
Code:
[COLOR="Blue"][B]invoke-virtual {[COLOR="red"][B]v7[/B][/COLOR], v3}, Landroid/view/View;->setVisibility(I)V[/B][/COLOR]
Be mindful of V#, if previous is v6, you make yours to be v7
Next, find these two methods: .method public setMenuVisibility(Z)V and .method public setMenuVisibility(ZZ)V
Delete most of the contents of those two methods leaving it to look just like below:
Code:
.method public setMenuVisibility(Z)V
.locals 1
.parameter "show"
return-void
.end method
.method public setMenuVisibility(ZZ)V
.locals 2
.parameter "show"
.parameter "force"
return-void
.end method
Save your file NavigationBarView.smali, then proceed editing the navigation_bar.xml in SystemUI\res\layout.
Just copy mine replacing your original:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NavigationBarView android:background="#ff000000" android:layout_width="fill_parent" android:layout_height="fill_parent" android:directionality="none"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/rot0" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_home" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/lights_out" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="@dimen/navigation_bar_deadzone_size" />
</FrameLayout>
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_recent_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_menu_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_home_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_back_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/lights_out" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" android:directionality="none">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="left" android:id="@id/deadzone" android:layout_width="@dimen/navigation_bar_deadzone_size" android:layout_height="fill_parent" />
</FrameLayout>
<View android:id="@id/rot270" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.NavigationBarView>
Click to expand...
Click to collapse
Works like a charm brov.... but tha arrangement is not too good, back home menu recent app, i want it to be back home recent app menu
whalesplaho said:
Works like a charm brov.... but tha arrangement is not too good, back home menu recent app, i want it to be back home recent app menu
Click to expand...
Click to collapse
Re-aarange the icons placement if you want your own arrangement
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_home" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
That first linearlayout is for portrait mode, you can see from the code, icons from top-to-bottom, it will show left-to-right on your phone. Cut and paste the whole line in place of the other, swap the menu and recent code lines.
The 3rd linear layout is for landscape, top-to-bottom code is also top-to-bottom in phone landscape. Justa swap menu and recent code lines as well.
And no need to touch the lights-out linear layout, that's the 2nd and 4th linear layout.
Rycon33 said:
Re-aarange the icons placement if you want your own arrangement
Code:
<LinearLayout android:orientation="horizontal" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_home" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
</LinearLayout>
That first linearlayout is for portrait mode, you can see from the code, icons from top-to-bottom, it will show left-to-right on your phone. Cut and paste the whole line in place of the other, swap the menu and recent code lines.
The 3rd linear layout is for landscape, top-to-bottom code is also top-to-bottom in phone landscape. Justa swap menu and recent code lines as well.
And no need to touch the lights-out linear layout, that's the 2nd and 4th linear layout.
Click to expand...
Click to collapse
i notice dat after flashing tha mod, my nav bar aint transparent anymore cos i mod it for transparency before.... but status bar still transparent!
whalesplaho said:
i notice dat after flashing tha mod, my nav bar aint transparent anymore cos i mod it for transparency before.... but status bar still transparent!
Click to expand...
Click to collapse
i'm not sure this mod can cause conflict to other mods, but if it does, you have to choose which one you intend to keep
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
Hi,
I was quite annoyed by the fact that noone made a Navbar with 4 softkeys instead of the default 3 (at least I couldn´t find any - specially not for 4.2.2).
I do use the menu key quite often and it is quite a hassle for me using menu keys on the top (with such a huge device).
Anyway, here you go: 4 Button Navigation Bar, Black (no idea how to get transparent - tell me if you know how and I will add it). Please note that I am using a 32dpi Navbar, so its smaller (using this MOD should not affect you Navigation Bar size - if it should download another dpi size http://forum.xda-developers.com/showthread.php?t=2171768&page=22 )
If you are using stock 4.2.2 Launcher with the semi-transparent Navbar....those will stay transparent. The screenshots posted use another launcher with black Top and Navbars.
Installation via CWM or TWRP!
DOWNLOAD files below!
Guide:
It is actually quite easy to change this, only 2 Files need to be modded:
1st decompile SystemUI.apk (using Tickle my Adroid is probably the easiest Tool to de- and recompile apps).
2. Now navigate to SystemUI\smali\com\android\systemui\statusbar\phone\NavigationBarView.smali
Find the followin method: .method public setDisabledFlags(IZ)V
Now, right below tthis line should be something like
Code:
.locals 10
As we add a variable we need to raise that number by 1, so change
Code:
.locals x
to
Code:
.locals x+1
in my case I had to change it to
Code:
.locals 11
Still within this .method, find the line
Code:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;
below that line should be
Code:
move-result-object v9
Now add
Code:
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
move-result-object v10
The result should look something like this - once again, the
Code:
move-result-object [B]v10[/B]
results from us addind a new var, so if that line before had v7 you would have to add v8, in my case it was v9, so I added v10.
A few lines below you will find
Code:
invoke-virtual {v9, v6}, Landroid/view/View;->setVisibility(I)V
right below add the same content and change v9 (or whatever number it is for you) and increment it by 1, so v9 would be v10, resulting in this:
Code:
invoke-virtual {v9, v6}, Landroid/view/View;->setVisibility(I)V
[B] invoke-virtual {v10, v6}, Landroid/view/View;->setVisibility(I)V[/B]
(Bold = New line added)
Thats more or less how this should look afterwards (numbers asides)
Code:
.line 261
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getHomeButton()Landroid/view/View;
move-result-object v9
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getMenuButton()Landroid/view/View;
move-result-object v10
if-eqz v1, :cond_9
move v6, v8
:goto_8
invoke-virtual {v9, v6}, Landroid/view/View;->setVisibility(I)V
invoke-virtual {v10, v6}, Landroid/view/View;->setVisibility(I)V
.line 262
invoke-virtual {p0}, Lcom/android/systemui/statusbar/phone/NavigationBarView;->getRecentsButton()Landroid/view/View;
3. Now find .method public setMenuVisibility(Z)V and .method public setMenuVisibility(ZZ)V
Pretty much delete everything, the result should look like this.
Code:
.method public setMenuVisibility(Z)V
.locals 1
.parameter "show"
return-void
.end method
.method public setMenuVisibility(ZZ)V
.locals 2
.parameter "show"
.parameter "force"
return-void
.end method
Save and close the file.
4. Open SystemUI/res/layout/navigation_bar.xml to add the button to the xml
I will just paste the conent of this file right below, you will notice the changes. What I basically did was to reformat the buttons and add menu buttons.
The lines startin with
Code:
<view ....
are only there for formatting reasons....you can change the value within
Code:
android:layout_width= and android:layout_height=
to dip values instead (0.0 meaning no gap). Just experiment with those....the worst that will happen is, that you have no navbar at all....so nothing to worry.
This is how the result of mine looks:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NavigationBarView android:background="@color/system_ui_opaque_background" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layoutDirection="ltr"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">
<FrameLayout android:id="@id/rot0" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="horizontal" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<View android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="0.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_back" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_home" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight" />
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/lights_out" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<View android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="70.0dip" android:layout_height="fill_parent" android:layout_marginLeft="0.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="70.0dip" android:layout_height="fill_parent" android:layout_marginRight="0.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
</LinearLayout>
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="center_horizontal" android:id="@id/search_light" android:visibility="gone" android:layout_width="80.0dip" android:layout_height="fill_parent" android:src="@drawable/search_light" android:scaleType="center" />
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:minSize="@dimen/navigation_bar_deadzone_size" systemui:maxSize="@dimen/navigation_bar_deadzone_size_max" systemui:holdTime="@integer/navigation_bar_deadzone_hold" systemui:decayTime="@integer/navigation_bar_deadzone_decay" systemui:orientation="horizontal" />
</FrameLayout>
<FrameLayout android:id="@id/rot90" android:paddingTop="0.0dip" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<LinearLayout android:orientation="vertical" android:id="@id/nav_buttons" android:clipChildren="false" android:clipToPadding="false" android:layout_width="fill_parent" android:layout_height="fill_parent" android:animateLayoutChanges="true">
<View android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:layout_width="fill_parent" android:layout_height="70.0dip" android:src="@drawable/ic_sysbar_menu_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/recent_apps" android:layout_width="fill_parent" android:layout_height="70.0dip" android:src="@drawable/ic_sysbar_recent_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/home" android:layout_width="fill_parent" android:layout_height="70.0dip" android:src="@drawable/ic_sysbar_home_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="fill_parent" android:layout_height="70.0dip" android:src="@drawable/ic_sysbar_back_land" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" systemui:glowBackground="@drawable/ic_sysbar_highlight_land" />
</LinearLayout>
<LinearLayout android:orientation="vertical" android:id="@id/lights_out" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_width="fill_parent" android:layout_height="70.0dip" android:layout_marginTop="0.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="70.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="70.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_large" android:scaleType="center" android:layout_weight="0.0" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:layout_width="fill_parent" android:layout_height="70.0dip" android:layout_marginBottom="0.0dip" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
</LinearLayout>
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="center_vertical" android:id="@id/search_light" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="80.0dip" android:src="@drawable/search_light" android:scaleType="center" />
<com.android.systemui.statusbar.policy.DeadZone android:layout_gravity="top" android:id="@id/deadzone" android:layout_width="fill_parent" android:layout_height="fill_parent" systemui:minSize="@dimen/navigation_bar_deadzone_size" systemui:maxSize="@dimen/navigation_bar_deadzone_size_max" systemui:holdTime="@integer/navigation_bar_deadzone_hold" systemui:decayTime="@integer/navigation_bar_deadzone_decay" systemui:orientation="vertical" />
</FrameLayout>
<View android:id="@id/rot270" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent" />
</com.android.systemui.statusbar.phone.NavigationBarView>
You´re done, recompile SystemUI.apk, prepare it, add it to zip and flash it via CWM/TWRP
Special Thanks to XperienceD for the .244 Version
Props for doing it but kinda looks awkward to me. Maybe because I'm used to the of now
Xperia Z Vanilla
Sweet, Thanks.
dreamville said:
Props for doing it but kinda looks awkward to me. Maybe because I'm used to the of now
Click to expand...
Click to collapse
Yeah, would look better keeping the main 3 buttons central, but should be easy enough to sort.
Good point, i did it this way for symmetry reasons....by default it would have been they way you prefer it. If there is interest in a Version that has the dfeault 3 Buttons and a off-centric Menü Button, I will compile a new Version.
thanks bro looks great. i was wondering why sony decided to leave out the menu button. now i just have to figure out how to make it open settings from home screen and ill be set
flintston314 said:
If there is interest in a Version that has the dfeault 3 Buttons and a off-centric Menü Button, I will compile a new Version.
Click to expand...
Click to collapse
You could also add a "How To".
thanx mate , good to see new navbar...could you make an option for closing active app by long press of back button? transparency would be nice as well
thanx a lot for your work
glukasil said:
thanx mate , good to see new navbar...could you make an option for closing active app by long press of back button? transparency would be nice as well
thanx a lot for your work
Click to expand...
Click to collapse
Ok, I tried changing the Navbar to transparent...this obviously wont work on 4.2.2 or at least I do not know how to. All the guides for changing it are 2-3 months old and those hacks wont´t work anymore. The transparency seems to be part of the system, because the launcher will show things semi-transparent by default, but if you install another launcher, that will be gone.
So, if anyone can link me a guide or a mod with transparent Nav/Statusbars that still works under 4.2.2 .423 I will gladly include it.
Kill on back seems to have the same problem....couldn´t find a working version for .423.
there is a chinese guy who is developing an app called FullNexus4 ..... it is a navbar which replaces original with a lot of options.....it works on 4.2.2 with transparency and app killing....check it out on xda talk to the guy , he may help you to get some ideas good luck , will be watching for new soft from you.
Hi. This is a great mod :highfive: Has anyone tried this on .244? And is it possible to add stock grey colour?
quantumtraveler said:
Hi. This is a great mod :highfive: Has anyone tried this on .244? And is it possible to add stock grey colour?
Click to expand...
Click to collapse
I tried with no success.
Sent from my C6603 using xda premium
glukasil said:
there is a chinese guy who is developing an app called FullNexus4 ..... it is a navbar which replaces original with a lot of options.....it works on 4.2.2 with transparency and app killing....check it out on xda talk to the guy , he may help you to get some ideas good luck , will be watching for new soft from you.
Click to expand...
Click to collapse
Sorry, this is way out of my league. There is also an App called Ultimate Dynamic Navbar, this is awesome and does way more than this little hack. I just wanted to have a Menu button, no more. Installing an APP was nothing I wanted.....
Concerning chaning colors: I did not manage to change those....might have something to do with 4.2.2. In 4.1.x you could just change the color of the menu or navbar within the XML (more or less), doing so now will not have any effect.
I am sure someone knowing how to de- and recompile a file can easily change the files to easily work in any other build. It´s really quite easy actually.
Thanks for the guide, works perfect on .244 and now I'm using it I actually prefer it as you've done it with the home button off center.
XperienceD said:
Thanks for the guide, works perfect on .244 and now I'm using it I actually prefer it as you've done it with the home button off center.
Click to expand...
Click to collapse
Would u mind to share it mate??
Blacklistest said:
Would u mind to share it mate??
Click to expand...
Click to collapse
Sure, see attachment for a deodexed SystemUi.apk ...
XperienceD said:
Sure, see attachment ...
Click to expand...
Click to collapse
thanks so much :highfive:
XperienceD said:
Sure, see attachment ...
Click to expand...
Click to collapse
Its workin on the latest Romaur 8.0 ...thanx fr the work:thumbup:
Dhruv'z xz
XperienceD said:
Sure, see attachment ...
Click to expand...
Click to collapse
try this one on .244 but only three buttons appeared.
i'm flash it via CWM, anything goes wrong ?
jimfactory said:
i'm flash it via CWM, anything goes wrong ?
Click to expand...
Click to collapse
Is your ROM deodexed?
XperienceD said:
Is your ROM deodexed?
Click to expand...
Click to collapse
No, stock rom.
Work on deodexed rom only ?
after reading many ICS+ users requests, they want 4.2 lock screen clock.. here it is
{
"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"
}
Things Needed:
* smali & baksmali
* Text Editor
* Your device framework.jar
Step 1 : in lockscreen digital clock, there are actually 2 clock views overlapping one another...
java source :
Code:
CharSequence newTime = DateFormat.format(mFormat, mCalendar);
mTimeDisplayBackground.setText(newTime);
mTimeDisplayForeground.setText(newTime);
mAmPm.setIsMorning(mCalendar.get(Calendar.AM_PM) == 0);
and
Code:
private static final String SYSTEM_FONT_TIME_BACKGROUND = SYSTEM + "AndroidClock.ttf";
private static final String SYSTEM_FONT_TIME_FOREGROUND = SYSTEM + "AndroidClock_Highlight.ttf";
so we just have to use both views to get what we wanted, to do so follow steps,
decompile framework.jar goto : com\android\internal\widget\ , open DigitalClock.smali with a text editor..
search for :
Code:
Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
you will see these lines :
Code:
iget-object v2, p0, Lcom/android/internal/widget/DigitalClock;->mTimeDisplayBackground:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
iget-object v2, p0, Lcom/android/internal/widget/DigitalClock;->mTimeDisplayForeground:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
Step 2: below this,
Code:
iget-object v2, p0, Lcom/android/internal/widget/DigitalClock;->mTimeDisplayBackground:Landroid/widget/TextView;
invoke-virtual {v2, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
add these lines :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, "h"
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
move-result-object v3
invoke-virtual {v2, v3}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;
move-result-object v1
so now we just used second clock view which is add to android at API level 11 (Honeycomb).. but not used after ICS...
Step 3 : last step, by default as i said second clock view visibility is turned off
java source :
Code:
mTimeDisplayBackground = (TextView) findViewById(R.id.timeDisplayBackground);
mTimeDisplayBackground.setTypeface(sBackgroundFont);
mTimeDisplayBackground.setVisibility(View.[COLOR="Red"]INVISIBLE[/COLOR]);
to do so delete this line :
Code:
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
Step 4 : download font in attachments push them to system\fonts\
Step 5 : Save all changes and compile flash/push/do whateva
for those who want to know what is happening study modified AOSP DigitalClock source in attachment (unmodified),
Credits :
* Android for source
* jesusfreke for smali & baksmali Tools
can u plz... provide this mod for micromax a110
arjunsharma said:
can u plz... provide this mod for micromax a110
Click to expand...
Click to collapse
ask any dev in a110 fourms... @BOND1987 @Akhilendra1711 or @khan_frd2002 can do this for you... its easy....
akash akya said:
ask any dev in a110 fourms... @BOND1987 @Akhilendra1711 or @khan_frd2002 can do this for you... its easy....
Click to expand...
Click to collapse
@akash akya I will do after competing the 4.2 Quick panel
after this mod the lockscreen handle goes below its original position
is there any way to get it back to its original position???
Help would be appreciated
Cute Idiot said:
after this mod the lockscreen handle goes below its original position
is there any way to get it back to its original position???
Help would be appreciated
Click to expand...
Click to collapse
lol, nope... it remain untouched...
Can you please tell me what went wrong?
Here's mine. Seems like the 2 fonts overlapped with each other.
joeyhuab said:
Here's mine. Seems like the 2 fonts overlapped with each other.
Click to expand...
Click to collapse
bro you surly missed here :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, [COLOR="Red"]"h"[/COLOR]
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
also give me your keygaurd_unlock_xxx.xml.. just a little correction is there...
akash akya said:
bro you surly missed here :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, [COLOR="Red"]"h"[/COLOR]
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
also give me your keygaurd_unlock_xxx.xml.. just a little correction is there...
Click to expand...
Click to collapse
Nah, I'm sure I copied everything. Here's my files, kindly check them out, thanks!
joeyhuab said:
Nah, I'm sure I copied everything. Here's my files, kindly check them out, thanks!
Click to expand...
Click to collapse
give me DigitalClock.smali also.. i will check once..
akash akya said:
bro you surly missed here :
Code:
new-instance v2, Ljava/text/SimpleDateFormat;
const-string v3, [COLOR="Red"]"h"[/COLOR]
sget-object v4, Ljava/util/Locale;->ENGLISH:Ljava/util/Locale;
invoke-direct {v2, v3, v4}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;Ljava/util/Locale;)V
iget-object v3, p0, Lcom/android/internal/widget/DigitalClock;->mCalendar:Ljava/util/Calendar;
invoke-virtual {v3}, Ljava/util/Calendar;->getTime()Ljava/util/Date;
also give me your keygaurd_unlock_xxx.xml.. just a little correction is there...
Click to expand...
Click to collapse
akash akya said:
give me DigitalClock.smali also.. i will check once..
Click to expand...
Click to collapse
Here you go, this is my DigitalClock.smali from my Stock framework.jar
joeyhuab said:
Here you go, this is my DigitalClock.smali from my Stock framework.jar
Click to expand...
Click to collapse
try this one...
http://www.mediafire.com/?cm6dza6nepkbxjt
Thanks man!
akash akya said:
try this one...
http://www.mediafire.com/?cm6dza6nepkbxjt
Click to expand...
Click to collapse
Although there's something with the hours that doesn't feel right, this one works like a charm! THANKS A LOT!
joeyhuab said:
Although there's something with the hours that doesn't feel right, this one works like a charm! THANKS A LOT!
Click to expand...
Click to collapse
change red code in your keygaurd_screen _tab_unlock.xml
Code:
<com.android.internal.widget.DigitalClock [COLOR="Red"]android:layout_gravity="left"[/COLOR] android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" [COLOR="Blue"]android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"[/COLOR] android:layout_marginBottom="12.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
<TextView android:textSize="14.0sp" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginTop="18.0dip" android:singleLine="true" android:layout_toRightOf="@id/timeDisplayForeground" android:layout_alignBottom="@id/timeDisplayForeground" />
</com.android.internal.widget.DigitalClock>
if it looks odd, then tune blue code....
akash akya said:
change red code in your keygaurd_screen _tab_unlock.xml
Code:
<com.android.internal.widget.DigitalClock [COLOR="Red"]android:layout_gravity="left"[/COLOR] android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" [COLOR="Blue"]android:layout_marginRight="@dimen/keyguard_lockscreen_status_line_font_right_margin"[/COLOR] android:layout_marginBottom="12.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
<TextView android:textSize="14.0sp" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginTop="18.0dip" android:singleLine="true" android:layout_toRightOf="@id/timeDisplayForeground" android:layout_alignBottom="@id/timeDisplayForeground" />
</com.android.internal.widget.DigitalClock>
if it looks odd, then tune blue code....
Click to expand...
Click to collapse
LOL THIS happened when I did that. ) No worries, I'll just put it back to the old format, it looks good anyways! THANKS A LOT! :victory:
joeyhuab said:
LOL THIS happened when I did that. ) No worries, I'll just put it back to the old format, it looks good anyways! THANKS A LOT! :victory:
Click to expand...
Click to collapse
oops missed this :silly:
Code:
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" [COLOR="Red"]android:layout_gravity="center" [/COLOR]android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" [COLOR="red"]android:layout_gravity="center" [/COLOR]android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
and as i said you have to tune left margin for cleaner look...
Hey, the files to edit the clock for me are not in framework.jar ): any helps=?
anerik said:
Hey, the files to edit the clock for me are not in framework.jar ): any helps=?
Click to expand...
Click to collapse
its impossible afiak... take look at xxx_framework.jar or framework_xxx.jar
akash akya said:
its impossible afiak... take look at xxx_framework.jar or framework_xxx.jar
Click to expand...
Click to collapse
Ok found it in android/widget in framework.jar, sorry that was my bad, but yet it is too different from yours to try!
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..