samedi 8 mars 2014

[GUIDE][HOW TO]Add Home and Lock Button at Status bar - S5 Toggle Settings topic




:good: Hit THANKS button if you like this :good:
=====Credits;=====
Inspired from a post by @galaxy1210, i got the line code from there..
i dont know anything, i did this just by reading in this forum.. so, many thanks to XDA forum and all members..
so here you go..


Requirements:
> Any tools to decompile and recompile apk (e.g ApkTool/AndroidMultitool)
> Notepad++
> Apks from your system; SystemUI.apk and framework-res.apk

GUIDE:

This steps will add Home Button on the left side status bar...;

STEP 1:
Open your ApkTool/Multitool.. Install framework-res.apk then Decompile your SystemUi.apk

STEP 2:
Go to your Decompiled_apk folder and navigate to res/layout/ and open status_bar.xml with notepad++

STEP 3:
Find this line;

Code:


<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" android:alpha="@dimen/notification_icon_area_alpha">

make an enter space before of line <LinearLayout android
at that blank space, paste the code below;

Code:


<com.android.systemui.statusbar.policy.KeyButtonView android:gravity="right" android:id="@id/home" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="0.0dip" android:src="@drawable/ic_sysbar_recent" android:singleLine="true" android:layout_alignParentRight="true" android:contentDescription="@string/accessibility_back" systemui:keyCode="3" systemui:glowBackground="@drawable/ic_sysbar_highlight" />


And this steps will add Lock Button on the right side status bar...;

STEP 4:
Find this line;

Code:


<com.android.systemui.statusbar.policy.Clock android:textSize="@dimen/status_bar_clock_text_size" android:textColor="#ffffffff" android:ellipsize="none" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:includeFontPadding="false" />

make a space (enter) after of line android:includeFontPadding="false" />..
at that blank space, paste the code below;

Code:


<com.android.systemui.statusbar.policy.KeyButtonView android:id="@id/back" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="0.0dip" android:src="@drawable/ic_sysbar_lock" android:singleLine="true" android:layout_toRightOf="@id/recent_apps" android:layout_alignParentLeft="true" android:contentDescription="@string/accessibility_back" systemui:keyCode="26" systemui:glowBackground="@drawable/ic_sysbar_highlight" />

STEP 5:
And then save the modded status_bar.xml

STEP 6:
make your pict (*.png) for both buttons, and paste it to folder drawable-xhdpi (res/layout/drawable-xhdpi)
or you can use pictures from the link below..

Follow this steps, if, and only if you want to change with S5 Toggles Setting


 




STEP 7:
download drawable-xhdpi.rar from the link below, extract it, then copy all pictures (81 pngs), to drawable-xhdpi folder (res/layout/drawable-xhdpi)

STEP 8:
if you want to remove the line below toggles, do this..

 




navigate to res/values-sw360dp-xhdpi/ and open dimens.xml with notepad++
change the value of quick_setting_button_status_height and quick_setting_button_status_padding into 0.0dip
then save it..
do that again, the same thing with dimens.xml at res/values-sw360dp-hdpi/
change the value of quick_setting_button_status_height and quick_setting_button_status_padding into 0.0dip
then save it..







LAST STEP:
Recompile your SystemUi
Dont forget to copy META-INF and AndroidManifest.xml from your old apk to your new apk (compiled apk)


LINK: https://drive.google.com/folderview?...2M&usp=sharing


Screenshot as attached, mine looks great with 240dpi mod.. :highfive:


FAQ:


 





> both button will act like physical button, home as home, and lock as power button
> so if you long press the button, the home button will shows recent apps, and the lock button will shows Device options
> if the lock button doesn't work, press the home button first..
> if you use wanam exposed, you can center the clock, and change color to get S5 blue color theme;

 




- go to Notification panel > Clock position=center
- go to Notification panel > Remove gaps between titles
- go to Theme:
Header background color > change color to : FF20738D
Text label color > change color to : FFFFFFFF
Tile background color > change color to : FF20738D
- reboot and done








THANKS MATE
i hope this guide works for you..








Attached Thumbnails


Click image for larger version<br/><br/>Name:	Screenshot_2014-03-08-15-22-06.png<br/>Views:	N/A<br/>Size:	18.5 KB<br/>ID:	2620257
 

Click image for larger version<br/><br/>Name:	Screenshot_2014-03-07-16-57-27.png<br/>Views:	N/A<br/>Size:	115.5 KB<br/>ID:	2620258
 
















Aucun commentaire:

Enregistrer un commentaire