[Sony Cross-Device Development Themes and Apps] spuri78:
Hey guys,

Finally, I have ventured into the world of tutorials on XDA. It has taken me weeks to wrap my head around this and for my bro [MENTION=4970751]Rajeev[/MENTION] for his endless patience for putting up with my thousand queries lol. Without further adieu, here is my first tutorial on Making 5 button navigation bar mod. You can have one power button and one menu button with this tutorial. This guide is an updated version of my brother [MENTION=4970751]Rajeev[/MENTION] 's THIS tutorial. I just adapted it to work with lollipop.

THINGS NEEDED :-

PC

Any Latest Apktool

Notepad++

Deodexed SystemUI.apk

Lets start...

STEP 1:-

Decompile SystemUI.apk

Go to res/values/ids.xml

Add these lines to the end (Before </resources>)

<item type="id" name="lock">false</item>
<item type="id" name="newmenu">false</item>

Save and Close

Go to res/values/dimens.xml

Find

<dimen name="navigation_key_width">70.0dip</dimen>
<dimen name="navigation_extra_key_width">36.0dip</dimen>

Change The value to

<dimen name="navigation_key_width">60.0dip</dimen>
<dimen name="navigation_extra_key_width">80.0dip</dimen>

Save and Close

Go to res/values/strings.xml

Add this lines to the end (Before </resources>)

<string name="accessibility_lock">Lock</string>

Save and Close

Go to res/layout/navigation_bar.xml

Replace the whole content with this xml files

<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.phone.NavigationBarView android:background="@drawable/system_bar_background" android:layout_width="fill_parent" android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android" xmlns:systemui="http://schemas.android.com/apk/res-auto">
<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="1.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/lock" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_lock" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_lock" android:paddingStart="10.0dip" systemui:keyCode="26" systemui:keyRepeat="false" />
<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:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" android:paddingEnd="10.0dip" android:layout_marginStart="@dimen/navigation_key_outer_margin" systemui:keyCode="4" />
<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/home" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_home" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" />
<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/recent_apps" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_recent" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" android:layout_marginEnd="@dimen/navigation_key_outer_margin" />
<FrameLayout android:layout_width="70.0dip" android:layout_height="fill_parent" android:layout_weight="0.0">
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/newmenu" android:layout_width="70.0dip" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/menu" android:visibility="invisible" android:layout_width="@dimen/navigation_extra_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu" android:scaleType="center" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/ime_switcher" android:visibility="invisible" android:layout_width="@dimen/navigation_extra_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_ime_switcher_default" android:scaleType="centerInside" android:contentDescription="@string/accessibility_ime_switch_button" />
</FrameLayout>
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/lights_out" android:visibility="gone" android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:id="@id/back_lights_out" 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" android:layout_marginStart="@dimen/navigation_key_outer_margin_lights_out" />
<View android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" />
<ImageView android:id="@id/home_lights_out" 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:id="@id/recent_apps_lights_out" 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" android:layout_marginEnd="@dimen/navigation_key_outer_margin_lights_out" />
</LinearLayout>
<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">
<FrameLayout android:layout_width="fill_parent" android:layout_height="70.0dip" android:layout_weight="0.0">
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="top" android:id="@id/ime_switcher" android:visibility="invisible" android:layout_width="fill_parent" android:layout_height="@dimen/navigation_extra_key_width" android:src="@drawable/ic_ime_switcher_default" android:scaleType="centerInside" android:contentDescription="@string/accessibility_ime_switch_button" />
<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="top" android:id="@id/menu" android:visibility="invisible" android:layout_width="@dimen/navigation_extra_key_width" android:layout_height="fill_parent" android:src="@drawable/ic_sysbar_menu_land" android:scaleType="centerInside" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/newmenu" android:layout_width="fill_parent" android:layout_height="70.0dip" android:src="@drawable/ic_sysbar_menu_land" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_menu" systemui:keyCode="82" />
</FrameLayout>
<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/recent_apps" android:layout_width="fill_parent" android:layout_height="70.0dip" android:layout_marginTop="@dimen/navigation_key_outer_margin" android:src="@drawable/ic_sysbar_recent_land" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_recent" />
<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/home" android:paddingTop="10.0dip" android:layout_width="fill_parent" android:layout_height="70.0dip" android:src="@drawable/ic_sysbar_home_land" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_home" systemui:keyCode="3" systemui:keyRepeat="false" />
<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/back" android:paddingTop="10.0dip" android:layout_width="fill_parent" android:layout_height="70.0dip" android:layout_marginBottom="@dimen/navigation_key_outer_margin" android:src="@drawable/ic_sysbar_back_land" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_back" systemui:keyCode="4" />
<View android:visibility="invisible" android:layout_width="0.0dip" android:layout_height="@dimen/navigation_side_padding" android:layout_weight="0.0" />
<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/lock" android:paddingBottom="60.0dip" android:layout_width="fill_parent" android:layout_height="70.0dip" android:src="@drawable/ic_sysbar_lock_land" android:scaleType="center" android:layout_weight="0.0" android:contentDescription="@string/accessibility_lock" systemui:keyCode="26" systemui:keyRepeat="false" />
</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:id="@id/recent_apps_lights_out" android:layout_width="fill_parent" android:layout_height="@dimen/navigation_key_width" android:layout_marginTop="@dimen/navigation_key_outer_margin_lights_out" 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:id="@id/home_lights_out" android:layout_width="fill_parent" android:layout_height="@dimen/navigation_key_width" 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:id="@id/back_lights_out" android:layout_width="fill_parent" android:layout_height="@dimen/navigation_key_width" android:layout_marginBottom="@dimen/navigation_key_outer_margin_lights_out" android:src="@drawable/ic_sysbar_lights_out_dot_small" android:scaleType="center" android:layout_weight="0.0" />
</LinearLayout>
<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>
</com.android.systemui.statusbar.phone.NavigationBarView>

Save and Close.

STEP 2:-

Download THIS zip file and merge to your SystemUI

Done. Recompile and Replace SystemUI ( Reboot once ) and Enjoy..

CREDIT

[MENTION=4970751]Rajeev[/MENTION] for source, helping and teaching