[Samsung Galaxy Nexus] djdarkknight96:
Lockscreen center clock mods.​

If you are using CM9/CM10 and would like to replace the weather images like I have, I will place instructions at the bottom of this post and attach the images.

Ok you will need to know this first:

1. How to decompile and compile the framework "This is not a how to for that" I will provide links to my tools!

2. How to ADB push or use 7zip to place your modded framework to an update.zip. I will provide a base to use to flash it in recovery after you mod your framework"

3. Edit XML's

That's it!!!

The reason behind doing a how to is because Frameworks change all the time with rom updates and phones all have different values in framework.

If you don't know how to do those things, please learn that before posting questions!!!! "Google is a wonderful thing"

SIMPLE MOD 1​

This is a mod that's easy to make but I only have the values for the Gnex sized screens:

I got this mod from here: [GUIDE][05 AUG] How To Make Lock Screen Clock Allign To Center in Jellybean and ICS

ALL CREDIT GOES TO blindndumb

Go thank/donate to him for finding the location and how to!!! I just wanted to share the values I found for Gnex screens.

This is my screenshot on CM10 JellyBro:

Ok here we go:

1. Extract the framework-res.apk from your phone or rom zip located in system/framework

2. Decompile using APK TOOL...here are my tools do decompile ICS or JB Frameworks: Tools

3. Locate the folder res/values inside the decompiled framework-res folder

4. Open the dimens.xml using an XML editor like XML Marker or Notepad++

5. locate the line:

<dimen name="keyguard_lockscreen_status_line_font_right_margin">42.0dip</dimen>

6. Change it to :

<dimen name="keyguard_lockscreen_status_line_font_right_margin">82.0dip</dimen>

"This is specific to Gnex phones only..if your phone has a different resolution you might have to change the 82 to something else"

7. Save your changes and compile the apk using the APK Multitool in the Tools zip from above!! ***You will need to move the framework folder to "projects" and the original framework-res.apk to the "place-apk-here-for-modding" of APK Multitool***

8. SIGN IT or Move the META-INF folder from the original apk to the modded one!!!! "I SIGNED MINE USING APK MULITITOOL"

9. Now that it's made you can either push it back with ADB or copy the framework-res.apk you modded to the system/framework folder in my Flashable-zip-template.zip attached at the bottom of the OP using 7zip.

10. Flash in recovery or if you did ADB reboot!!!

11. Enjoy!!!!!

ADVANCED MOD 2:​

This mod was created and given to me from a few guys on my Rootzwiki thread willyjay and bouchigo Go to my rootwiki thread and thank them!!!

Advanced centered clock:

Ok this will be a better looking centered clock but is a bit harder to make.

1. Extract the framework-res.apk from your phone or rom zip located in system/framework

2. Decompile using APK TOOL...here are my tools do decompile ICS or JB Frameworks: Tools

3. Locate the folder res/layout inside the decompiled framework-res folder

4. Open the keyguard_screen_tab_unlock.xml using an XML editor like XML Marker or Notepad++

5. Just to make things easier I will just have you copy and paste the lines to replace:

Take this and paste over lines 1-19

<?xml version="1.0" encoding="utf-8"?>
<GridLayout android:gravity="center_horizontal" android:orientation="vertical" android:id="@id/root" android:layout_width="match_parent" android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<com.android.internal.widget.DigitalClock android:layout_gravity="center" android:id="@id/time" android:layout_marginTop="@dimen/keyguard_lockscreen_status_line_clockfont_top_margin" android:layout_marginBottom="12.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_background" android:ellipsize="none" android:id="@id/timeDisplayBackground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplayForeground" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:layout_alignLeft="@id/timeDisplayBackground" android:layout_alignTop="@id/timeDisplayBackground" />
</com.android.internal.widget.DigitalClock>
<LinearLayout android:layout_gravity="center" android:orientation="horizontal">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />
</LinearLayout>
<LinearLayout android:layout_gravity="center" android:orientation="horizontal">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:id="@id/alarm_status" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:drawablePadding="4.0dip" />
</LinearLayout>
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_status_line_font_size" android:ellipsize="marquee" android:layout_gravity="center" android:id="@id/status1" android:singleLine="true" android:drawablePadding="4.0dip" />
<RelativeLayout android:orientation="horizontal" android:id="@id/weather_panel" android:paddingTop="4.0dip" android:layout_width="fill_parent" android:layout_height="wrap_content">
<ImageView android:id="@id/weather_image" android:paddingLeft="8.0dip" android:paddingRight="8.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:src="@drawable/ic_dialog_alert" android:layout_centerHorizontal="true" android:layout_centerVertical="true" />
<RelativeLayout android:orientation="horizontal" android:padding="4.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="@id/weather_image" android:layout_centerVertical="true">
<TextView android:textSize="14.0sp" android:textStyle="bold" android:textColor="?textColorPrimary" android:ellipsize="marquee" android:gravity="right" android:id="@id/weather_city" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_alignParentRight="true" />
<TextView android:textSize="12.0sp" android:textColor="?textColorPrimary" android:ellipsize="marquee" android:gravity="right" android:id="@id/weather_condition" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:layout_below="@id/weather_city" android:layout_alignParentRight="true" />
<TextView android:textSize="8.0sp" android:textColor="?textColorSecondary" android:gravity="right" android:id="@id/update_time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/weather_condition" android:layout_alignParentRight="true" />
</RelativeLayout>

6. Save your changes and compile the apk using the APK Multitool in the Tools zip from above!! ***You will need to move the framework folder to "projects" and the original framework-res.apk to the "place-apk-here-for-modding" of APK Multitool***

7. SIGN IT or Move the META-INF folder from the original apk to the modded one!!!! "I SIGNED MINE USING APK MULITITOOL"

8. Now that it's made you can either push it back with ADB or copy the framework-res.apk you modded to the system/framework folder in my Flashable-zip-template.zip attached at the bottom of the OP using 7zip.

9. Flash in recovery or if you did ADB reboot!!!

10. Enjoy!!!!!

Weather Images​

I have taken these images from AOKP but themed them Black and White to match the lockscreen font color.

1. Download the Weather Icons.zip from the Bottom of the OP.

2. Use 7zip to open your framework-res.apk "Take it from the rom zip or adb pull yours from the phone"

3. You will see a folder named "res" in the opened framework-res.apk - drop the folder "res" from my

Weather Icons zip into your framework-res.apk "NO NEED TO SIGN THE APK"

4. Close 7zip and place it in the system/framework folder in my Flashable-zip-template.zip attached at the bottom of the OP using 7zip then flash it in recovery - OR adb push it back to your phone.

5. Enjoy!!!!

If you want to add this the the center clock mod, just use these steps after you compile the apk.

Hope you like this mod, I love it!!! :victory:

DJ