[Optimus L3, L5, L7 Themes and Apps] yayakuya:
Hi devs...

Today i will share to you How to add/ Change All Clocks to Analog nor even with Seconds Digital Clock... :D

This method only for you who have experiences or familiar with Apktool/ Apk Multy tool/ etc.

So, Let's do this;

Required:

PC

Apktool or similar Tools

NotePad++ for edit xmls files

WinRAR or 7z

A Cup of coffee (Yeaahh...)

1. Change your Clock Lockscreen (From framework or UxpNxtLockscreen)

Only need to change "Textview" to "DigitalClock" for it;

> Decompile your framework-res.apk

> Navigate to /res/layout/

> Open keyguard_screen_tab_unlock.xml (for normal lockscreen) or keyguard_screen_password_portrait.xml (for Password lockscreen)

> Search for this line:

<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="12.0dip" android:layout_marginBottom="0.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0.0dip" android:singleLine="true" android:shadowColor="@color/lockscreen_clock_background" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" android:layout_centerInParent="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_am_pm_font_size" android:textColor="@color/lockscreen_clock_am_pm" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginBottom="0.0dip" android:singleLine="true" android:shadowColor="@color/lockscreen_clock_background" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBottom="@id/timeDisplay" />
</com.android.internal.widget.DigitalClock>

You just need to change the RED color text:

<[COLOR="Red"]TextView[/COLOR] android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0.0dip" android:singleLine="true" android:shadowColor="@color/lockscreen_clock_background" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" android:layout_centerInParent="true" />

to:

<[COLOR="Red"]DigitalClock[/COLOR]

> That's it, now save and Recompile...

Do the same way for UxpNxtLockscreen.apk with open w_clock.xml on /res/layout/

And we got look like this:

2. Change your Status bar Clock and Status bar Expanded Clock

> Decompile your SystemUI.apk

> Navigate to /res/layout/

> Open status_bar.xml (for Status bar Clock) and status_bar_expanded_header.xml (for JB status bar expanded clock)

> On status_bar.xml, search for this line:

<[COLOR="Red"]com.android.systemui.statusbar.policy.Clock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="left|center" android:id="@id/clock" android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />

> Change the RED code to:

<[COLOR="Red"]DigitalClock[/COLOR]

Yeah, we know what it should be ;)

> Save and Recompile...

Now play with expanded clock;

> Open status_bar_expanded_header.xml

> Search for this line:

<[COLOR="Red"]com.android.systemui.statusbar.policy.Clock[/COLOR] android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock" android:id="@id/clock" android:clickable="true" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:singleLine="true" />

> I bet you already knew what you have to do... yep, change the RED code to:

<[COLOR="Red"]DigitalClock[/COLOR]

> Save and Recompile...

> And we got look like this:

3. Change your lockscreen Clock to Analog Clock (from framework or UxpNxtLockScreen)

> Decompile framework-res.apk

> Navigate to /res/layout/

> Again, Open keyguard_screen_tab_unlock.xml (for normal lockscreen) or keyguard_screen_password_portrait.xml (for Password lockscreen)

> Search for this line:

<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="12.0dip" android:layout_marginBottom="0.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0.0dip" android:singleLine="true" android:shadowColor="@color/lockscreen_clock_background" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" android:layout_centerInParent="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_am_pm_font_size" android:textColor="@color/lockscreen_clock_am_pm" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginBottom="0.0dip" android:singleLine="true" android:shadowColor="@color/lockscreen_clock_background" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBottom="@id/timeDisplay" />
</com.android.internal.widget.DigitalClock>

You just need to change the RED color text:

<[COLOR="Red"]TextView[/COLOR] android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_clock_font_size" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0.0dip" android:singleLine="true" android:shadowColor="@color/lockscreen_clock_background" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" android:layout_centerInParent="true" />

> You need to HIDE these lines first (hide the Digital Clock) by add this code:

android:visibility="gone"

> Then, copy this line to show Analog Clock upside the above lines:

<AnalogClock android:layout_gravity="center_horizontal" android:id="@id/analogClock1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" />

> Now code lines should be look like this:

<AnalogClock android:layout_gravity="center_horizontal" android:id="@id/analogClock1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" />
<LinearLayout android:layout_gravity="top" android:orientation="vertical" [COLOR="Red"]android:visibility="gone"[/COLOR] android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="22.0dip">
<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="22.0dip" android:layout_marginBottom="3.0dip">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="62.0dip" android:textColor="@color/lockscreen_clock_foreground" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="0.0dip" android:singleLine="true" android:shadowColor="@color/lockscreen_clock_background" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" android:layout_centerInParent="true" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="@dimen/keyguard_lockscreen_am_pm_font_size" android:textColor="@color/lockscreen_clock_am_pm" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="8.0dip" android:layout_marginBottom="0.0dip" android:singleLine="true" android:shadowColor="@color/lockscreen_clock_background" android:shadowDx="1.0" android:shadowDy="1.0" android:shadowRadius="1.0" android:layout_toRightOf="@id/timeDisplay" android:layout_alignBottom="@id/timeDisplay" />
</com.android.internal.widget.DigitalClock>

> Save it

> We have new id for now then,

> Navigate to /res/values/

> Open ids.xml and add this line at the end of ids (above </resource> code )

<item type="id" name="analogClock1">false</item>

> Save and Recompile...

Now play with UxpNxtLockScreen clock;

> After decompiling

> Navigate to /res/layout/

> Open w_clock.xml

> Search for this line:

<RelativeLayout android:layout_gravity="center_horizontal" android:orientation="horizontal" android:id="@id/timeRelativeLayout24h" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="-6.0dip">
<TextView android:textAppearance="?android:textAppearanceMedium" android:textSize="76.0dip" android:textColor="@*android:color/white" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2.0dip" android:singleLine="true" android:shadowColor="@color/clock_text_shadow_color" android:shadowDx="@integer/clock_text_shadow_dx" android:shadowDy="@integer/clock_text_shadow_dy" android:shadowRadius="@integer/clock_text_shadow_radius" android:layout_centerHorizontal="true" />
<TextView android:textAppearance="?android:textAppearanceMedium" android:textSize="16.0dip" android:textColor="@*android:color/white" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="7.0dip" android:singleLine="true" android:shadowColor="@color/text_shadow_color" android:shadowDx="@integer/text_shadow_dx" android:shadowDy="@integer/text_shadow_dy" android:shadowRadius="@integer/text_shadow_radius" android:layout_toRightOf="@id/timeDisplay" android:layout_alignParentTop="true" />
</RelativeLayout>

> Again, HIDE the Digital Clock before add the Analog Clock by add this line:

android:visibility="gone"

> Just like the way we made for framework-res.apk, add the Analog Clock lines mentioned above.

> It's should be look like this:

<AnalogClock android:layout_gravity="center_horizontal" android:id="@id/analogClock1" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_width="fill_parent" android:layout_height="wrap_content" />
<RelativeLayout android:layout_gravity="center_horizontal" android:orientation="horizontal" android:id="@id/timeRelativeLayout24h" [COLOR="Red"]android:visibility="gone"[/COLOR] android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginBottom="-6.0dip">
<TextView android:textAppearance="?android:textAppearanceMedium" android:textSize="76.0dip" android:textColor="@*android:color/white" android:ellipsize="none" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="2.0dip" android:singleLine="true" android:shadowColor="@color/clock_text_shadow_color" android:shadowDx="@integer/clock_text_shadow_dx" android:shadowDy="@integer/clock_text_shadow_dy" android:shadowRadius="@integer/clock_text_shadow_radius" android:layout_centerHorizontal="true" />
<TextView android:textAppearance="?android:textAppearanceMedium" android:textSize="16.0dip" android:textColor="@*android:color/white" android:ellipsize="none" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="7.0dip" android:singleLine="true" android:shadowColor="@color/text_shadow_color" android:shadowDx="@integer/text_shadow_dx" android:shadowDy="@integer/text_shadow_dy" android:shadowRadius="@integer/text_shadow_radius" android:layout_toRightOf="@id/timeDisplay" android:layout_alignParentTop="true" />
</RelativeLayout>

> Wait, it's NOT perfect looks yet :cyclops:

> You need to make some MARGIN to the top of Clock, then:

> On second line, add the RED code and should be look like this:

<LinearLayout android:orientation="vertical" android:id="@id/clock_and_date" android:focusable="true" android:focusableInTouchMode="true" android:layout_width="fill_parent" android:layout_height="wrap_content" [COLOR="Red"]android:layout_marginTop="36.0dip"[/COLOR] android:layout_alignParentTop="true" android:layout_centerHorizontal="true

> Margin should be differ for some Screen Sizes. Then look up for your self... :p

> Done, Save and Recompile...

> And we got look like this:

4. Add Analog Clock in expanded status bar layout

> Decompile your SystemUI.apk

> Navigate to /res/layout/

> Open status_bar_expanded.xml (for JB devices)

> Search for this line:

xmlns:systemui="http://schemas.android.com/apk/res/com.android.systemui">

> Below the code, add this line:

<AnalogClock android:layout_gravity="bottom" android:id="@id/analogClock1" android:layout_width="fill_parent" android:layout_height="wrap_content" [COLOR="Red"]android:layout_marginBottom="100.0dip"[/COLOR] android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" />

> See the RED code? That mean depends on your Screen Sizes,.... you know what you have to do... ;)

> And we got look like this:

One more simple guide for change the Analog Clock Style: CLICK ME!

That's it for the Guides, if you have some questions related to this method, just post here...

But, don't ask me for how to use apktool or bla..bla..bla... Try to use your Search Bar Engine or CLICK ME!...

If you had Xperia E Single SIM on your hands, i have those things already for ya... CLICK ME! :cool:

CREDITS:

> XDA Developers Staff and Members

> Rizal Lovins for JB Apktool

> Google

> My Coffee...

> If someone forgotten by me, please PM then i will edit the Credits... Thanks

Give me a Motivate by Hit that THANKS button

or Help me for Upgrade my Damn Networking by DONATE to me:fingers-crossed:​