5,603,646 Members 37,358 Now Online
XDA Developers Android and Mobile Development Forum

[FIX][JB][CM10]How to Center Align the Lock screen and Answer screen in Jellybean

Tip us?
 
Moose0704
Old
(Last edited by Moose0704; 23rd August 2012 at 05:45 AM.)
#1  
Moose0704's Avatar
Senior Member - OP
Thanks Meter 2761
Posts: 2,057
Join Date: May 2012

 
DONATE TO ME
Info 2 [FIX][JB][CM10]How to Center Align the Lock screen and Answer screen in Jellybean

How to Center Align the Lock screen and Answer screen in Jellybean


All, I like most others have been really excited about the new CM10, 4.1.1 Jellybean ROMS. I however have been annoyed by the off centered lock screen unlock handle. As most of you know just about all of them are off. Well after many hours of looking through code I have found out how to center that unlock handle on the lockscreen as well as the incall answer screen.

Now the changes that need to be made have to be made per ROM, it is not just a simple flashable zip and boom you have it on any ROM. The changes have to be made in two files inside the "framework-res.apk" and the "Phone.apk". So because there are so many different JB ROMs out there I decided to just share the code I changed and where I changed it.

So if you have a ROM and want them centered for your users, or you are a user that knows how to de-compile an APK and re-compile it, then this is for you!


Files to change:

framework-res.apk - The file that needs to be edited is "keyguard_screen_tab_unlock.xml" this file can be found in framework-res.apk/res/layout
Phone.apk - The file that needs to be edited is "incall_touch_ui.xml" this file can be found in Phone.apk/res/layout


Code to change: CHANGES ARE IN RED

framework-res.apk - BEFORE:

Code:
<com.android.internal.widget.multiwaveview.GlowPadView 
android:orientation="horizontal" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:id="@id/unlock_widget" 
android:gravity="top" 
android:focusable="true" 
android:layout_alignParentBottom="true" 
android:targetDrawables="@array/lockscreen_targets_with_camera" 
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" 
android:directionDescriptions="@array/lockscreen_direction_descriptions" 
android:handleDrawable="@drawable/ic_lockscreen_handle" 
android:outerRingDrawable="@drawable/ic_lockscreen_outerring" 
android:outerRadius="@dimen/glowpadview_target_placement_radius" 
android:innerRadius="@dimen/glowpadview_inner_radius" 
android:snapMargin="@dimen/glowpadview_snap_margin" 
android:feedbackCount="1" 
android:vibrationDuration="20" 
android:glowRadius="@dimen/glowpadview_glow_radius" 
android:pointDrawable="@drawable/ic_lockscreen_glowdot"

framework-res.apk - AFTER:

Code:
<com.android.internal.widget.multiwaveview.GlowPadView 
android:orientation="horizontal" 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:id="@id/unlock_widget" 
android:gravity="left|top" 
android:focusable="true" 
android:layout_alignParentBottom="true" 
android:targetDrawables="@array/lockscreen_targets_with_camera" 
android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" 
android:directionDescriptions="@array/lockscreen_direction_descriptions" 
android:handleDrawable="@drawable/ic_lockscreen_handle" 
android:outerRingDrawable="@drawable/ic_lockscreen_outerring" 
android:outerRadius="@dimen/glowpadview_target_placement_radius" 
android:innerRadius="@dimen/glowpadview_inner_radius" 
android:snapMargin="@dimen/glowpadview_snap_margin" 
android:feedbackCount="1" 
android:vibrationDuration="20" 
android:glowRadius="@dimen/glowpadview_glow_radius" 
android:pointDrawable="@drawable/ic_lockscreen_glowdot"

Phone.apk - BEFORE:

Code:
<com.android.internal.widget.multiwaveview.GlowPadView 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:id="@id/incomingCallWidget" 
android:visibility="gone" 
android:layout_marginBottom="-46.0dip" 
android:background="@color/incall_call_banner_background" 
android:layout_gravity="bottom|center" 
android:layout_marginTop="20.0dip" 
android:gravity="top" 
prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets" 
prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions" 
prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions" 
prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle" 
prvandroid:innerRadius="@android:dimen/glowpadview_inner_radius" 
prvandroid:outerRadius="@android:dimen/glowpadview_target_placement_radius" 
prvandroid:outerRingDrawable="@android:drawable/ic_lockscreen_outerring" 
prvandroid:snapMargin="@android:dimen/glowpadview_snap_margin" 
prvandroid:vibrationDuration="20" prvandroid:feedbackCount="1" 
prvandroid:glowRadius="@android:dimen/glowpadview_glow_radius" 
prvandroid:pointDrawable="@android:drawable/ic_lockscreen_glowdot"

Phone.apk - AFTER:

Code:
<com.android.internal.widget.multiwaveview.GlowPadView 
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:id="@id/incomingCallWidget" 
android:visibility="gone" 
android:layout_marginBottom="-46.0dip" 
android:background="@color/incall_call_banner_background" 
android:layout_gravity="bottom|center" 
android:layout_marginTop="20.0dip" 
android:gravity="left|top" 
prvandroid:targetDrawables="@array/incoming_call_widget_3way_targets" 
prvandroid:targetDescriptions="@array/incoming_call_widget_3way_target_descriptions" 
prvandroid:directionDescriptions="@array/incoming_call_widget_3way_direction_descriptions" 
prvandroid:handleDrawable="@drawable/ic_in_call_touch_handle" 
prvandroid:innerRadius="@android:dimen/glowpadview_inner_radius" 
prvandroid:outerRadius="@android:dimen/glowpadview_target_placement_radius" 
prvandroid:outerRingDrawable="@android:drawable/ic_lockscreen_outerring" 
prvandroid:snapMargin="@android:dimen/glowpadview_snap_margin" 
prvandroid:vibrationDuration="20" prvandroid:feedbackCount="1" 
prvandroid:glowRadius="@android:dimen/glowpadview_glow_radius" 
prvandroid:pointDrawable="@android:drawable/ic_lockscreen_glowdot"


If you do not want to find and change the code, here is a ZIP that has both files with code in them so that you can just replace them with your old ones. I am pretty sure it is the same across devices, but the rest of the APK's may not be so only replace these files.

Center FIX Files




If you appreciate me sharing this information, please hit the THANKS button and/or the "Donate to Me" Button

The Following 33 Users Say Thank You to Moose0704 For This Useful Post: [ Click to Expand ]
 
Moose0704
Old
(Last edited by Moose0704; 23rd August 2012 at 05:14 AM.)
#2  
Moose0704's Avatar
Senior Member - OP
Thanks Meter 2761
Posts: 2,057
Join Date: May 2012

 
DONATE TO ME
If you want I nice smooth running CM10 ROM on your Samsung Galaxy Note i717 that already has the centered fixes, check out this ROM HERE by ManelScout4Life

The Following 2 Users Say Thank You to Moose0704 For This Useful Post: [ Click to Expand ]
 
Sharky157
Old
#3  
Account currently disabled
Thanks Meter 29
Posts: 179
Join Date: Mar 2011
Thanks for doing this moose! I appreciate it!

Sent from my SAMSUNG-SGH-I717 using xda app-developers app
The Following User Says Thank You to Sharky157 For This Useful Post: [ Click to Expand ]
 
andronikal659
Old
#4  
Senior Member
Thanks Meter 36
Posts: 290
Join Date: Sep 2011
Location: Montreal
Thank you for your hard work.

I don't know if this works for all rom but I just flash the inverted mms 4.1 (contacts.apk) without the phone.apk and it works beautifully.

The only problem I have with the paranoid rom is when I change the "settings" to phablet or tablet I get the offset lockscreen slider. & my system keeps rebooting from time to time but that's something with paranoid I guess.
 
Bradl79
Old
#5  
Senior Member
Thanks Meter 176
Posts: 715
Join Date: May 2008
So we cant just replace the files we have to decompile and recompile. Can u make them complied and upload. Thank u
 
Moose0704
Old
(Last edited by Moose0704; 23rd August 2012 at 10:24 PM.)
#6  
Moose0704's Avatar
Senior Member - OP
Thanks Meter 2761
Posts: 2,057
Join Date: May 2012

 
DONATE TO ME
Quote:
Originally Posted by Bradl79 View Post
So we cant just replace the files we have to decompile and recompile. Can u make them complied and upload. Thank u
Yes you have to do that. And no I cannot do that for you, this has to be done "per ROM" every framework-res.apk and Phone.apk is different per ROM.

Now if you tell me what ROM you are on I can do it then but I cannot just simply get you the file, it will boot loop your phone if you are not on the ROM I de-compile and re-compile from.

 
tnosz
Old
#7  
tnosz's Avatar
Senior Member
Thanks Meter 69
Posts: 298
Join Date: Jul 2010
Location: Austin
Thanks MOOSE O.G triple O.G

Sent from my SAMSUNG-SGH-I717 using xda premium
The Following User Says Thank You to tnosz For This Useful Post: [ Click to Expand ]
 
ColSaulTigh
Old
#8  
Member
Thanks Meter 18
Posts: 65
Join Date: May 2011
Location: Lake Mary, FL
Quote:
Originally Posted by Moose0704 View Post
Yes you have to do that. And no I cannot do that for you, this has to be done "per ROM" every framework-res.apk and Phone.apk is different per ROM.

Now if you tell me what ROM you are on I can do it then but I cannot just simply get you the file, it will boot loop your phone if you are not on the ROM I de-compile and re-compile from.
I am running [ROM]4.1.1[Android Open Kang Project] BUILD 1 + Lockscreen Targets **Aug. 22nd,, specifically this version: aokp_quincyatt_jb-build-1_AUG_22_12.zip

If you could make a flash-able zip, I'd be most grateful.

Thanks!
 
Moose0704
Old
#9  
Moose0704's Avatar
Senior Member - OP
Thanks Meter 2761
Posts: 2,057
Join Date: May 2012

 
DONATE TO ME
Quote:
Originally Posted by ColSaulTigh View Post
I am running [ROM]4.1.1[Android Open Kang Project] BUILD 1 + Lockscreen Targets **Aug. 22nd,, specifically this version: aokp_quincyatt_jb-build-1_AUG_22_12.zip

If you could make a flash-able zip, I'd be most grateful.

Thanks!
Hit that donate button under my name and I'll be glad to!

The Following User Says Thank You to Moose0704 For This Useful Post: [ Click to Expand ]
 
Utacka
Old
(Last edited by Utacka; 25th August 2012 at 03:56 AM.)
#10  
Recognized Developer
Thanks Meter 5374
Posts: 1,892
Join Date: Apr 2012
Location: Stockholm

 
DONATE TO ME
Thanks for this, I will get this changes on my nighlies for N7000.

Skickat från min GT-N7000 via Tapatalk 2

Tags
4.1.1, center, cm10, jelly, jellybean
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes