Wednesday, April 27, 2016

[GUIDE] [MOD] [LP/MM] [UPDATE :- 27.04.2016] How To Add Power Button To Lock Screen

Hello friends

Here is my latest simple tutorial for adding a power button in lock screen. Here you go ...


Things Needed :-
  • Latest Apktool
  • Notepad ++
  • PC
  • Deodexed SystemUI ( LP/MM )


Decompile SystemUI.apk

1) Go to res / values / ids.xml and add this line to last

Code:

<item type="id" name="lock">false</item>
Save it and close

2) Go to res / values / string.xml and add this line to last

Code:

<string name="accessibility_lock">Lock</string>
Save it and close

3) Go to res / layout / keyguard_bottom_area.xml and add this line before the last line

Code:

<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="bottom|center" android:id="@id/lock" android:layout_width="@dimen/keyguard_affordance_width" android:layout_height="@dimen/keyguard_affordance_height" android:src="@drawable/ic_sysbar_lock" android:scaleType="center" android:tint="#ffffffff" android:contentDescription="@string/accessibility_lock" systemui:keyCode="26" />
So it should be like this

Code:

<com.android.systemui.statusbar.policy.KeyButtonView android:layout_gravity="bottom|center" android:id="@id/lock" android:layout_width="@dimen/keyguard_affordance_width" android:layout_height="@dimen/keyguard_affordance_height" android:src="@drawable/ic_sysbar_lock" android:scaleType="center" android:tint="#ffffffff" android:contentDescription="@string/accessibility_lock" systemui:keyCode="26" />

</com.android.systemui.statusbar.phone.KeyguardBottomAreaView>

Save it and close

4) Move the attached png to res / drawable-hdpi-v4 or drawable-hdpi ( HERE )

Thats it. Done..

Recompile SystemUI and replace it by yours and enjoy...


from xda-developers http://ift.tt/1NzdwXk
via IFTTT

No comments:

Post a Comment