Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

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

OP Moose0704

23rd August 2012, 06:05 AM   |  #1  
Moose0704's Avatar
OP Senior Member
Thanks Meter: 4,355
 
2,255 posts
Join Date:Joined: May 2012
Donate to Me
More
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
Last edited by Moose0704; 23rd August 2012 at 06:45 AM.
The Following 33 Users Say Thank You to Moose0704 For This Useful Post: [ View ]
23rd August 2012, 06:07 AM   |  #2  
Moose0704's Avatar
OP Senior Member
Thanks Meter: 4,355
 
2,255 posts
Join Date:Joined: May 2012
Donate to Me
More
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
Last edited by Moose0704; 23rd August 2012 at 06:14 AM.
The Following 2 Users Say Thank You to Moose0704 For This Useful Post: [ View ]
23rd August 2012, 07:36 AM   |  #3  
Account currently disabled
Thanks Meter: 29
 
179 posts
Join Date:Joined: 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: [ View ]
23rd August 2012, 10:04 PM   |  #4  
Senior Member
Flag Montreal
Thanks Meter: 36
 
305 posts
Join Date:Joined: Sep 2011
More
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.
23rd August 2012, 10:54 PM   |  #5  
Senior Member
Thanks Meter: 203
 
826 posts
Join Date:Joined: May 2008
So we cant just replace the files we have to decompile and recompile. Can u make them complied and upload. Thank u
23rd August 2012, 11:19 PM   |  #6  
Moose0704's Avatar
OP Senior Member
Thanks Meter: 4,355
 
2,255 posts
Join Date:Joined: May 2012
Donate to Me
More
Quote:
Originally Posted by Bradl79

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.
Last edited by Moose0704; 23rd August 2012 at 11:24 PM.
24th August 2012, 02:23 AM   |  #7  
tnosz's Avatar
Senior Member
Flag Austin
Thanks Meter: 80
 
337 posts
Join Date:Joined: Jul 2010
More
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: [ View ]
24th August 2012, 03:03 AM   |  #8  
Member
Flag Lake Mary, FL
Thanks Meter: 18
 
65 posts
Join Date:Joined: May 2011
More
Talking
Quote:
Originally Posted by Moose0704

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!
24th August 2012, 07:29 AM   |  #9  
Moose0704's Avatar
OP Senior Member
Thanks Meter: 4,355
 
2,255 posts
Join Date:Joined: May 2012
Donate to Me
More
Quote:
Originally Posted by ColSaulTigh

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: [ View ]
24th August 2012, 09:48 PM   |  #10  
Recognized Developer
Flag Stockholm
Thanks Meter: 5,381
 
1,907 posts
Join Date:Joined: Apr 2012
Donate to Me
More
Thanks for this, I will get this changes on my nighlies for N7000.

Skickat från min GT-N7000 via Tapatalk 2
Last edited by Utacka; 25th August 2012 at 04:56 AM.

Post Reply Subscribe to Thread

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

Advanced Search
Display Modes