Hello there, noob here
I'm getting confused with all the info about the SGII out there, so I wonder:
1) I've got the Lightning ROM installed and it says there in the desc "better camera", is this a different hack from the one Potatoman released here? And if it is, can I savely install the 192kbps audio hack with that ROM and do I lose the camera improvements that came with that ROM?
2) Is there a way to invert the system colours easily, like have dark text on white background instead of the bright text on black background thingy?
I mean not just for themes (e.g. homescreens etc) but for the system menus etc, so it'll have a coherent, seemless look? I did stumble upon the "Change colours" tutorial here but it seems rather tricky and I'm scared to fiddle with the system files on my own :/
Or is there -perhaps- some ROM out there that includes such already?
Don't get me wrong, I don't think the white text on black bg is bad per se but I find it easier on the eyes if it's the other way round (like it's on the iPhone *cough*)
Cheers!
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!
You can't change them afaik! You can always use third party lockscreen app like Widget Locker to get your desired lock screen.
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://forum.xda-developers.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://forum.xda-developers.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.
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.
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.
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.
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:
Obviously, I still need to edit other aspects of that screen to tidy it up.
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.
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.
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)
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
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.
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.
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.
Check out the new thread here! http://forum.xda-developers.com/showthread.php?t=1330063
A little help
This line about android:background is in keyguard_screen_unlock_portrait? I think it's keyguard_screen_password_portrait
Title says it all. If anyone has ever found a decent guide that comprehensively explains how to edit .9.pngs and add guides please post here, i have tried reading more than 10 in google and none actually tought me how to add guides and edit pngs :S
It does take some getting used to.
http://developer.android.com/tools/help/draw9patch.html
right panel shows how the png will stretch
goal:
draw lines around the edges of the png to create stretchable and static parts of the png.
basically the pink content is stretchable.
stretchable content should be part of the png that is ok to get skewed
when it stretches. so if you have an image in stretchable area
you will need to make sure in the layout of the app it stretches the same on x axis and y axis
if only stretches on one axis image will become distorted.
on the right panel just make sure your png looks good in all 3 examples and you should be fine.
wes342 said:
It does take some getting used to.
http://developer.android.com/tools/help/draw9patch.html
right panel shows how the png will stretch
goal:
draw lines around the edges of the png to create stretchable and static parts of the png.
basically the pink content is stretchable.
stretchable content should be part of the png that is ok to get skewed
when it stretches. so if you have an image in stretchable area
you will need to make sure in the layout of the app it stretches the same on x axis and y axis
if only stretches on one axis image will become distorted.
on the right panel just make sure your png looks good in all 3 examples and you should be fine.
Click to expand...
Click to collapse
Really, i cant understand what means for the png to be strechable and what do the squares in the second image of link are
let me try again.
Define:
a 9patch is a .png that is cut into sections
and the green part is showing the sections
the pink part is showing the stretchable part of the .png
the whole point of a 9patched png is to make a png so it can be used
many different times in an app. sometimes the png will be a square and sometimes a rectangle. basically when you want to use the png as a rectangle its just stretching the square png along the x-axis to make it a rectangle.(like when you set an image that is too small as your desktop wallpaper the image becomes distorted) if you stretch a square image into a rectangle you are distorting the original image to make a rectangle (so things will look funny)
yes the 9patch tool takes some getting used to.
so if you load your png into the 9patch tool
you will be able to draw little lines around the edges.
look closely at the second image (you will see black lines at the bottom and on the right plus 2 small lines on the top and left.
this is what defines your patches.
once you draw the lines around your png you will see a pink section in the middle (this is the part of the png that will stretch when you use your png as a rectangle)
the green sections are showing you the sections that that you have made.
make sure you check the show patches and show content buttons at the bottom.
Now on the right side you will see 3 different shapes a square , vertical rectangle and horizontal rectangle. these are examples of what your png will look like if you stretch it.
as far as I can tell if the images of your png on the right look good and are not distorted then your png will look fine in the app.
If you need some more help
watch the top 3-4 videos that should give you a better handle on 9patch tool.
9patch tool youtube search
Wow thanks i didnt think that it was so simple ( Maybe i was really confused ) Thanks mate will also have a look at the videos
It really is quite simple once you get the basic concept down.
Yeap i managed to edit some .9 pngs with success thanks dude
Download the attachments below.
I attached my own Penguin battery icon that I made, but it looks too small when used. So you should try to use as much of the image canvas size as possible.
START
Open the battery blueprint PSD image file with Photoshop. There are 10 layer sets, each with 10 layers inside.
GET THE BATTERY TUBE IMAGE
Open the image you want to use as the battery, select the part of the image you want using marquee tool, magic wand, etc.
(the image better be of size smaller than 150x150). CTRL+C to copy the selected part of the image. close this image window (not the whole photoshop application).
PLACE THE BATTERY TUBE IMAGE
In the BATTERY image, switch to the 'BATTERY TUBE' layer (used as the topmost layer) and the press CTRL+V to paste
the previously selected image in that layer. The image will appear. Press CTRL+T and resize the image so that it
fits inside the canvas by dragging the corners of the selection (or you can move by dragging the image from inside
it)
EMPTY THE TUBE
While in BATTERY TUBE layer, select the part of the image where the battery juice should be contained/displayed
and press delete to make a hole in the layer.
PUT THE JUICE INSIDE THE TUBE
You need to resize the image so that the hole will cover all (and exactly) the battery bars. Using the rectangular
marquee tool, select an area that covers the entire battery tube image (THE WHOLE IMAGE NOT ONLY THE JUICE HOLE) .
Transform the image by pressing CTRL+T and drag or move such that the juice hole covers exactly the 1% bar from
the bottom and 100% bar from the top, that is, cover the battery juice (not necessarily exact if its too much of a
trouble). Make sure to center the image on the canvas size too. Move with arrow keys for more precision.
REMOVE ANY JUICE OUTSIDE THE TUBE
While still in the BATTERY TUBE layer. select the juice hole with magic wand, then press SHIFT+CTRL+I to invert
the selection. Now, without discarding the selection,
Switch to the 'Layer 1' and press delete.
Switch to the 'Layer 2' and press delete....
Continue doing this for all layers - Layer 3 upto Layer 100
(i.e., switch to each and every layer and press delete)
CHECK CURRENT STATUS
Congrats! Your battery icon is now complete!!!
If you get something that looks like an elephant, then you probably skipped reading some lines.
If you get something that looks exactly like what you started with, go and play hide and seek with your neighbour kids and come back five years later!!!
Otherwise, follow...
GET THE NAMES AND DIMENSIONS OF THE ORIGINAL BATTERY IMAGES
Minimise Photoshop.
Open your SystemUI.apk with WINRAR. Open the 'res' folder and extract the 'drawable-mdpi' or any folder containing
the battery icons (depends on your ROM) anywhere on your computer.
Close winrar. Open the extracted drawable-mdpi folder. Delete all other images except the ones used for the status bar battery.
These battery images are named as stat_sys_battery_<battery level>.png and stat_sys_battery_charge_anim<0 to
5>.png but they might differ depending on your ROM. Note the dimensions of a battery by placing your mouse
over an image or right click\properties\details.
For the sake of this tutorial, I take it that the battery icons are in res/drawable-mdpi folder
RESIZE YOUR IMAGE TO STANDARD SIZE
Restore Photoshop again. Resize the image (menu bar\Image\Image size...) and enter the dimensions you noted earlier.
SAVE THE BATTERY LEVEL IMAGES
In the layers window, hide all battery level layers and 'SAVE AS' (press CTRL+SHIFT+S) the image. Select the
format as 'PNG' and browse to the folder 'drawable-mdpi' (used earlier) containing the battery images. Click on
the stat_sys_battery_0.png and save, allowing the prompt to replace the existing image.
Then make the Layer 1 visible and 'SAVE AS' it in PNG format and click on the stat_sys_battery_1.png, replacing
the existing image. Next, make Layer 1 and Layer 2 visible and do the same, but replacing the
stat_sys_battery_2.png. Continue making the next higher layer (indicating the battery percentage) visible and
'SAVE AS' it as the stat_sys_battery_<battery level>.png where <battery level> is the highest visible layer.
Continue to 100%
Renaming the battery level images depends on your ROM. So match the names to the names of the images of your ROM.
SAVE THE CHARGING ANIMATIONS IMAGES
For the five charging animations images, Create another layer(topmost) and draw a charging indicator (like a
bolt). Center it.
Then make ONLY the Layer sets 1-10 and 11-20 visible and save as stat_sys_battery_charge_anim0.png
Next make the layer sets 21-30 and 31-40 also visible and save as stat_sys_battery_charge_anim1.png.
Continue like this till 100% by incrementing by 20% (or equivalently 2 layer sets) till you get
stat_sys_battery_charge_anim5.png.
Charging animation names also depend on your ROM.
EQUIP SYSTEMUI.APK
Now you have everything ready. Open your SystemUI.apk again with WINRAR. open the res\drawable-mdpi folder within
winrar. Switch to the window containing your newly made battery icons. CTRL+A to select all the images and then
drag them to the 'drawable-mdpi' folder of the WINRAR window, selecting OK for the prompt.
CLOSING
CLOSE EVERYTHING!!! Save your Battery image in Photoshop for future use.
BUILDING FLASH ZIP
Open the update.zip attachment with WinRAR. Open system folder then app folder (within the zip). Drag your edited SystemUI.apk to this app folder.
Close the WinRAR window.
TRANSFERRING
Place the update.zip in /sdcard of your phone
FLASHING
Reboot.into recovery. In recovery, choose apply update from sdcard (or manually install update.zip).
Reboot when done.
THINKING
?????
LOOKING
Be proud to see your own battery icon!!!
By default I've set the level colours as
RED - 0-14%
ORANGE - 15-29%
YELLOW - 30-39%
GREEN - 40-100%
Feel free to change the level colours or apply any styles to not make it look cartoonish
All the best.
great job, very well explained :highfive:
jose385 said:
great job, very well explained :highfive:
Click to expand...
Click to collapse
Thanks bro...
:good: :good: very :good: keep it up
Great works!!
next time i'll use it. Thanks man.
Keep great work
Defhawk said:
Great works!!
next time i'll use it. Thanks man.
Keep great work
Click to expand...
Click to collapse
Thanks man. Glad to help.
I'm using Android Studio 3.6.1 version in Windows
I'm in the initial screen in layout editor and i want to see the code of the User Interface in activity_main.xml. I'm looking for Design and Text tab near the bottom left of the screen (at the bottom of the Component Tree window) and i can;t see anything.
Thank you for your time
AnyOne ?
AnyOne to Know