[Android General] xd123456ye:
This is for sharing what i learned.

I only tested it only on my cm10.1 based rom.(htc desire, jb4.22_VJCM10.1_vijendrahs_20130407)

So this may not work on other rom.

You need to have knowledge of decompiling.

I used APK-Multi-Tool, baksmali and smali to do this.

1. Increase widget maximum size.

View attachment 1891812

Decompile framework-res.apk

In \res\layout-port\

Modify keyguard_widget_pager.xml

Change left, right, top padding and pageSpacing as follows.

<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardWidgetPager
android:id="@id/app_widget_container" android:paddingLeft="[COLOR="red"]0dip[/COLOR]"
android:paddingTop="[COLOR="red"]0dip[/COLOR]" android:paddingRight="[COLOR="Red"]0dip[/COLOR]"
android:paddingBottom="@dimen/kg_widget_pager_bottom_padding"
android:clipToPadding="false" android:pageSpacing="[COLOR="red"]0dip[/COLOR]"/>

2. Disable initial page hint

View attachment 1891813

Decompile android.policy.jar

in com\android\internal\policy\impl\keyguard\KeyguardViewStateManager.smali

Remove following red string.

.method public showUsabilityHints()V

...

.line 307
iget-object v0, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardViewStateManager;->mKeyguardWidgetPager:Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;

[COLOR="Red"]invoke-virtual {v0}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetPager;->showInitialPageHints()V[/COLOR]

...

.end method

3. Disable white box while scrolling

View attachment 1891814

Decompile android.policy.jar

in com\android\internal\policy\impl\keyguard\

Modify KeyguardWidgetPager.smali

Change red string to green one as follows

.method animateOutlinesAndSidePages(ZI)V

...

.line 708
[COLOR="Red"].local v7, finalOutlineAlpha:F[/COLOR]
:goto_4e
invoke-virtual {v3, p0, p1, v7, p2}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->fadeFrame(Ljava/lang/Object;ZFI)V

...

.end method

.method animateOutlinesAndSidePages(ZI)V

...

.line 708
[COLOR="Lime"]const/4 v7, 0x0[/COLOR]
:goto_4e
invoke-virtual {v3, p0, p1, v7, p2}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->fadeFrame(Ljava/lang/Object;ZFI)V

...

.end method

4. Disable page hint when dragging beyond first or last page

View attachment 1891815

Decompile android.policy.jar

in com\android\internal\policy\impl\keyguard\

Modify KeyguardWidgetPager.smali

Remove red string in the follwing.

.method protected screenScrolled(I)V

...
.line 533
invoke-static {v5}, Ljava/lang/Math;->abs(F)F

move-result v9

cmpg-float v7, v5, v10

if-gez v7, :cond_61

const/4 v7, 0x1

:goto_51
[COLOR="Red"]invoke-virtual {v6, v9, v7}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->setOverScrollAmount(FZ)V[/COLOR]

...

.end method

5. (similar to 4 but) Only disable white gradiant

View attachment 1891823

Decompile android.policy.jar

in com\android\internal\policy\impl\keyguard\

Modify KeyguardWidgetFrame.smali

Change red string to green one.

.method setOverScrollAmount(FZ)V

...

.line 497
const/high16 v1, 0x3f00

mul-float/2addr v1, p1

const/high16 v2, 0x437f

mul-float/2addr v1, v2

[COLOR="Red"] invoke-static {v1}, Ljava/lang/Math;->round(F)I

move-result v1[/COLOR]

iput v1, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->mForegroundAlpha:I

...

.end method

.method setOverScrollAmount(FZ)V

...

.line 497
const/high16 v1, 0x3f00

mul-float/2addr v1, p1

const/high16 v2, 0x437f

mul-float/2addr v1, v2

[COLOR="Lime"]const/4 v1, 0x0[/COLOR]

iput v1, p0, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->mForegroundAlpha:I

...

.end method

6. Only show bounding box boarder

View attachment 1891824

decompile framework-res.apk

in /res/drawable-hdpi

Modify kg_bouncer_bg_white.9.png as follows

View attachment 1891825

7. Remove carrier, emergency call, battery infomation

View attachment 1891826

decompile framework-res.apk

in res\layout

modify keyguard_emergency_carrier_area.xml as follows (for emergency and carrier removal)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout ... >
<com.android.internal.policy.impl.keyguard.CarrierText [COLOR="Lime"]android:visibility="gone"[/COLOR] ... />
<LinearLayout [COLOR="Lime"]android:visibility="gone"[/COLOR] ... >
<com.android.internal.policy.impl.keyguard.EmergencyButton ... />
<Button ... />
</LinearLayout>
</LinearLayout>

modify keyguard_message_area.xml as follows (for battery stat removal)

<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.policy.impl.keyguard.KeyguardMessageArea ... [COLOR="Lime"]android:textSize="0sp"[/COLOR] ... />

8. Change small widget height

View attachment 1891923

small widget height is determined by unlock UI height.

decompile framework-res.apk

in res\layout-port

modify keyguard_host_view.xml as follows.

change green number as you want.

If you set larger number, the widget height will be smaller.

<com.android.internal.policy.impl.keyguard.KeyguardHostView ...>

...

<com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer ... androidprv:layout_height="[COLOR="Lime"]410dp[/COLOR]" >

...

</com.android.internal.policy.impl.keyguard.KeyguardHostView>

9. Change widget inner padding

View attachment 1891974

decompile android.policy.jar

in com\android\internal\policy\impl\keyguard\

modify KeyguardWidgetFrame.smali.

Add green text and change red number as you want.

you can remove default padding by setting 0.

.line 109
.local v0, density:F
invoke-virtual {v2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;

move-result-object v3

iget v3, v3, Landroid/util/DisplayMetrics;->density:F

const/high16 v4, 0x4100

mul-float/2addr v3, v4

float-to-int v1, v3
[COLOR="Lime"]const v1, 0x[/COLOR][COLOR="Red"]20[/COLOR]

.line 110
.local v1, padding:I
invoke-virtual {p0, v1, v1, v1, v1}, Lcom/android/internal/policy/impl/keyguard/KeyguardWidgetFrame;->setPadding(IIII)V

10. Move pattern input section

View attachment 1892014

You can move pattern input section by setting padding.

Decompile framework-res.apk

in res\layout-port\

Modify keyguard_host_view.xml

Inside KeyguardSecurityContainer element set padding value as you want.

<com.android.internal.policy.impl.keyguard.KeyguardHostView ... >

...

<com.android.internal.policy.impl.keyguard.KeyguardSecurityContainer ... [COLOR="Lime"]androidprv:paddingTop="80dp" [/COLOR] ... >

...

</com.android.internal.policy.impl.keyguard.KeyguardHostView>