[Sony Cross-Device General] Anmol0022:
Simple Guide To make Pin Lockscreen from:

View attachment 3098270

To​

View attachment 3098268​

Requirements:

1. Knowledge of compiling/recompiling apk

2. Framework-res.apk of your phone

Steps:

1. De-compile framework-res.apk

2. After decompiling go to framework-res.apk\res\values folder and open arrays.xml

3. In arrays.xml find

<string-array name="lockscreen_num_pad_klondike">

It must be like this

<string-array name="lockscreen_num_pad_klondike">
<item></item>
<item></item>
<item>ABC</item>
<item>DEF</item>
<item>GHI</item>
<item>JKL</item>
<item>MNO</item>
<item>PQRS</item>
<item>TUV</item>
<item>WXYZ</item>
</string-array>

Simply remove all alphabets from it abc,def, so on

So that it look like this

View attachment 3098201

Save and close it.

4. In same folder open styles.xml and find

<style name="Widget.Button.NumPadKey" parent="@style/Widget.Button">

It must be something like this

<style name="Widget.Button.NumPadKey" parent="@style/Widget.Button">
<item name="textSize">34.0dip</item>
<item name="textStyle">normal</item>
<item name="textColor">#ffffffff</item>
[COLOR="Red"]<item name="gravity">left|center</item>[/COLOR]
<item name="background">?selectableItemBackground</item>
[COLOR="Red"]<item name="paddingLeft">20.0dip</item>[/COLOR]
<item name="paddingBottom">10.0dip</item>
<item name="singleLine">true</item>
<item name="fontFamily">sans-serif</item>
</style>

Simply change the red line with this

<item name="gravity">center</item>

<item name="paddingLeft">0.0dip</item>

Remeber 20.0dip we changed to 0.0dip will use it later. [maybe it is different in your case whatever it is just remember it]

So that the whole code looks like this

View attachment 3098219

We just made the keys 1,2,3 etc in center

5. Now go to framework-res.apk\res\layout folder and open keyguard_pin_view.xml

Find this line

<[COLOR="Red"]ImageButton androidprv:id="@id/key_enter"[/COLOR] androidprv:paddingRight="30.0dip" androidprv:layout_width="0.0px" androidprv:layout_height="fill_parent" androidprv:src="@drawable/sym_keyboard_return_holo" androidprv:layout_weight="1.0" androidprv:contentDescription="@string/keyboardview_keycode_enter"
style="@style/[COLOR="Red"]Widget.Button.NumPadKey[/COLOR]" />

Since we changed the style of Widget.Button.NumPadKey to fix it for enter key we will add this in the above line.

Remember the 20.0dip we changed its placed here if something else in your case put that

androidprv:paddingLeft="20.0dip"

Now new line will look like this

<ImageButton androidprv:id="@id/key_enter" [COLOR="Red"]androidprv:paddingLeft="20.0dip"[/COLOR] androidprv:paddingRight="30.0dip" androidprv:layout_width="0.0px" androidprv:layout_height="fill_parent" androidprv:src="@drawable/sym_keyboard_return_holo" androidprv:layout_weight="1.0" androidprv:contentDescription="@string/keyboardview_keycode_enter" style="@style/Widget.Button.NumPadKey" />

Since we made the keys in center then pin we enter is not above the 2 key so to make the pin in center find

<TextView androidprv:textAppearance="@style/TextAppearance.NumPadKey" androidprv:gravity="center" [COLOR="Red"]androidprv:id="@id/pinEntry"[/COLOR] androidprv:background="@null" androidprv:paddingLeft="40.0dip" androidprv:layout_width="0.0dip" androidprv:layout_height="fill_parent" androidprv:cursorVisible="false" androidprv:singleLine="true" androidprv:editable="true" androidprv:layout_weight="1.0" androidprv:imeOptions="actionDone|flagForceAscii" androidprv:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left" />

Add this in the above line

androidprv:paddingLeft="40.0dip"

Just double of 20.0dip

Now changed line will look like this

<TextView androidprv:textAppearance="@style/TextAppearance.NumPadKey" androidprv:gravity="center" androidprv:id="@id/pinEntry" androidprv:background="@null" [COLOR="Red"]androidprv:paddingLeft="40.0dip"[/COLOR] androidprv:layout_width="0.0dip" androidprv:layout_height="fill_parent" androidprv:cursorVisible="false" androidprv:singleLine="true" androidprv:editable="true" androidprv:layout_weight="1.0" androidprv:imeOptions="actionDone|flagForceAscii" androidprv:layout_marginStart="@dimen/keyguard_lockscreen_pin_margin_left" />

6. Save and Recompile and replace framework-res.apk and enjoy clean beautiful lockscreen.

If you like It Hit Thanks Button