[SOLVED] Pattern Lock Screen: How do I change the clock font and dots?

Search This thread

claimui

Senior Member
Sep 11, 2011
173
105
Taipei
UPDATE: All info in this thread summarized here: [GUIDE] Pattern lock tweaks - Wallpaper Brightness, Pattern Lock Dots, etc.

Rooted phone running Cognition 1.5.1. I am using a pattern lock so I have the standard Samsung lockscreen.

How can I change the clock font on the pattern lock screen? It looks very out of place compared to the other fonts.

Can I make the pattern lock dots smaller or more transparent? I don't like how it covers up almost all of my wallpaper. I know CyanogenMod has an option to make the pattern lock dots completely invisible. I don't really want that either, I just want them to be less obstructive.

Thanks in advance!
 
Last edited:

claimui

Senior Member
Sep 11, 2011
173
105
Taipei
I figured out how to change the clock font. Simply replace the Clockopia.ttf in /system/fonts. You can also use the Font Changer app, available on XDA or Market: http://xdaforums.com/showthread.php?t=874658

However I noticed that my replacement clock font did not seem to line up properly. I think this is a common problem with replacing Clockopia.ttf. So you might need to adjust your font with something like FontForge first. Check out the guide here: http://xdaforums.com/showthread.php?t=990853

UPDATE: This thread on Rootzwiki gives a good description of the Clockopia alignment problem and how to fix it. Basically, use a font editor to replace the glyphs in the Clockopia.ttf with the glyphs from your favorite font.

Still investigating the pattern lock dots.
 
Last edited:

claimui

Senior Member
Sep 11, 2011
173
105
Taipei
Figured out the pattern lock dots! The files are in the framework-res.apk, under res\drawable-hdpi. There are two files you need to edit:
btn_code_lock_default.png -- This is the white dot in the middle
indicator_code_lock_point_area_default.png -- This is the dark circular background of the dot

I reduced the size of the white dot by 50% and used a clear transparent background so it doesn't block the wallpaper. Files are attached below in case anyone wants to use these.
 

Attachments

  • btn_code_lock_default.png
    btn_code_lock_default.png
    796 bytes · Views: 506
  • indicator_code_lock_point_area_default.png
    indicator_code_lock_point_area_default.png
    432 bytes · Views: 448
Last edited:

claimui

Senior Member
Sep 11, 2011
173
105
Taipei
One more discovery today. Normally the pattern lock wallpaper is not as bright as the original -- there's a dim or dark filter over it. To change this, decompile framework-res.apk (need to use apktool or apk_manager), and edit res\layout\keyguard_screen_unlock_portrait.xml.

On line 4, change android:background="#70000000" to android:background="@color/transparent"

Compile framework-res.apk and put it back into system\framework. Reboot and you should see that the pattern lock wallpaper is much brighter!

Also I've made another set of pattern lock dots. For this one, I reduced both the white middle dot and the outer ring by 50%. Then I increased the transparency of both and made the outer ring a lighter gray. So now the dots are larger, but even less intrusive. I've attached the files below, plus a screenshot.
 

Attachments

  • btn_code_lock_default.png
    btn_code_lock_default.png
    575 bytes · Views: 1,118
  • indicator_code_lock_point_area_default.png
    indicator_code_lock_point_area_default.png
    1,010 bytes · Views: 1,163
  • SC20110924-030145.jpg
    SC20110924-030145.jpg
    35.4 KB · Views: 2,132
Last edited:

ICWiener_

New member
Dec 13, 2010
4
5
Thanks a lot for the background transparency trick ! That was exactly what I was loogking for.

Also, may I add something just for information if ppl need it :

There are other files if you want a complete edit :

the ones you told about :
btn_code_lock_default.png (the small dot in the center)
indicator_code_lock_point_area_default.png (the black circle around)

The pngs that shows up when the pattern is the wrong one :
indicator_code_lock_point_area_red.png (the circle around)
indicator_code_lock_drag_direction_red_up.png (the arrow showing the direction)

And if you use "visible pattern" in the options, these are the green ones :
indicator_code_lock_point_area_green.png
indicator_code_lock_drag_direction_green_up.png
btn_code_lock_touched.png (the small dot in the center, touched version)

One more thing, if you're only editing pngs, you don't need apk tool, a simple unzip with 7zip is possible.
 

LfcFan1977

Senior Member
Nov 7, 2010
452
164
Thanks for the modification ideas.
I am using a Htc Desire on dGB aosp rom but just to add to this thread. In the keyguard_screen_unlock_portrait.xml, I changed:
android:background="#70000000" to android:background="@drawable/patternlock_background"
Added an image called patternlock_background.png to the drawable-hdpi folder.
Made some of the images mentioned in the previous posts transparent.
And came up with this:
4xwf56HG

Obviously, I still need to edit other aspects of that screen to tidy it up.
 
  • Like
Reactions: claimui

claimui

Senior Member
Sep 11, 2011
173
105
Taipei
Great work LfcFan1977! I would be really interested in seeing more wallpapers that incorporate the pattern lock into their design. There could be some pretty cool ideas by mixing a pattern lock wallpaper with custom pattern dots and lines.
 

LfcFan1977

Senior Member
Nov 7, 2010
452
164
Yea, I have been wanting this kind of mod ever since I got my Android.
Here's a few ideas:
Galaxy with stars/rockets/shuttles/astronauts/planets/moons.
Dot to dot of a gingerbread man.
Flowers with the honeycomb bee.
Treasure maps and pirates.
Football.
Homer Simpson and donuts.
Pacman.

Anyway, I had a bit more of a play with the xml/images and got this.
patternlockscreenshot3.png
 

ICWiener_

New member
Dec 13, 2010
4
5
Hi,
a few month ago I investigated the size of the background image to fit the pattern dots, and after a few experiments I saw that android was doing a bit of resizing, even if the image was exactly the screen size.

What worked for me, is to make an image smaller than 800 in height (763px to be precise) and 480 in width (regular width of 1 screen). But when done editing, I stretch its height back to 800. Then, when applying within gallery ("use as..."), it stretch it back to undeformed.

I made a template in photoshop, for those who are interested, also with my actual pattern background. Still can't post urls here, so...it's hosted at mediafire.com :
Code:
/?fo04gtvp82y1xw1 (the template)
/?82txu5qxdea6usb (the background)
 

HellcatDroid

Senior Member
Jul 15, 2011
1,043
754
Cologne Area
Wow, this thread is a great resource for customizing the lockscreen, and it's rather painless (not much APK tool messing to do, if simple unzip, rezip works, wonderfull :))

This is going into my bookmarks :D
 

jeems

Member
Oct 24, 2011
38
29
I wish I would have found this thread sooner. I was looking for which files to edit for the buttons but found them elsewhere. I still have one question, though. Does anyone know how to change the path color? I can't find which file it is located in. TIA.
 

LfcFan1977

Senior Member
Nov 7, 2010
452
164
I can only assume the colour is applied by something in the framework.jar but as my understanding of smali coding is practically none, I can not figure it out.

I was thinking that maybe re-posting all the previous information and the above question in the android themes thread may be better. I do not think any of it is device or rom specific and we may need a wider audience in order to resovle questions like the last one.
 

claimui

Senior Member
Sep 11, 2011
173
105
Taipei
I can't find the path color in the xml or png files so it must be something in smali code. Moving to the Android themes forum is a good idea. I am going to summarize everything and repost it in that forum.
 
  • Like
Reactions: LfcFan1977

rubik37

New member
Feb 19, 2015
1
0
A little help

This line about android:background is in keyguard_screen_unlock_portrait? I think it's keyguard_screen_password_portrait :)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Thanks a lot for the background transparency trick ! That was exactly what I was loogking for.

    Also, may I add something just for information if ppl need it :

    There are other files if you want a complete edit :

    the ones you told about :
    btn_code_lock_default.png (the small dot in the center)
    indicator_code_lock_point_area_default.png (the black circle around)

    The pngs that shows up when the pattern is the wrong one :
    indicator_code_lock_point_area_red.png (the circle around)
    indicator_code_lock_drag_direction_red_up.png (the arrow showing the direction)

    And if you use "visible pattern" in the options, these are the green ones :
    indicator_code_lock_point_area_green.png
    indicator_code_lock_drag_direction_green_up.png
    btn_code_lock_touched.png (the small dot in the center, touched version)

    One more thing, if you're only editing pngs, you don't need apk tool, a simple unzip with 7zip is possible.
    3
    I figured out how to change the clock font. Simply replace the Clockopia.ttf in /system/fonts. You can also use the Font Changer app, available on XDA or Market: http://xdaforums.com/showthread.php?t=874658

    However I noticed that my replacement clock font did not seem to line up properly. I think this is a common problem with replacing Clockopia.ttf. So you might need to adjust your font with something like FontForge first. Check out the guide here: http://xdaforums.com/showthread.php?t=990853

    UPDATE: This thread on Rootzwiki gives a good description of the Clockopia alignment problem and how to fix it. Basically, use a font editor to replace the glyphs in the Clockopia.ttf with the glyphs from your favorite font.

    Still investigating the pattern lock dots.
    3
    One more discovery today. Normally the pattern lock wallpaper is not as bright as the original -- there's a dim or dark filter over it. To change this, decompile framework-res.apk (need to use apktool or apk_manager), and edit res\layout\keyguard_screen_unlock_portrait.xml.

    On line 4, change android:background="#70000000" to android:background="@color/transparent"

    Compile framework-res.apk and put it back into system\framework. Reboot and you should see that the pattern lock wallpaper is much brighter!

    Also I've made another set of pattern lock dots. For this one, I reduced both the white middle dot and the outer ring by 50%. Then I increased the transparency of both and made the outer ring a lighter gray. So now the dots are larger, but even less intrusive. I've attached the files below, plus a screenshot.
    2
    Figured out the pattern lock dots! The files are in the framework-res.apk, under res\drawable-hdpi. There are two files you need to edit:
    btn_code_lock_default.png -- This is the white dot in the middle
    indicator_code_lock_point_area_default.png -- This is the dark circular background of the dot

    I reduced the size of the white dot by 50% and used a clear transparent background so it doesn't block the wallpaper. Files are attached below in case anyone wants to use these.
    1
    Thanks for the modification ideas.
    I am using a Htc Desire on dGB aosp rom but just to add to this thread. In the keyguard_screen_unlock_portrait.xml, I changed:
    android:background="#70000000" to android:background="@drawable/patternlock_background"
    Added an image called patternlock_background.png to the drawable-hdpi folder.
    Made some of the images mentioned in the previous posts transparent.
    And came up with this:
    4xwf56HG

    Obviously, I still need to edit other aspects of that screen to tidy it up.