FORUMS
Remove All Ads from XDA

XML 101 - XML Modding Made Easy!

5,975 posts
Thanks Meter: 7,335
 
By Ticklefish, Recognized Themer on 5th November 2014, 04:01 PM
Post Reply Email Thread
5th November 2014, 04:06 PM |#11  
******* reserved *******
The Following 2 Users Say Thank You to Ticklefish For This Useful Post: [ View ] Gift Ticklefish Ad-Free
 
 
5th November 2014, 04:16 PM |#12  
serajr's Avatar
Recognized Developer / Recognized Themer
Flag Rafard - SP
Thanks Meter: 17,499
 
Donate to Me
More
Thumbs up
1st one!!

Great tuts as always... Keep rocking bro!! \m/
The Following User Says Thank You to serajr For This Useful Post: [ View ]
6th November 2014, 06:00 AM |#13  
DarkAngel's Avatar
Senior Member
Flag Arizona
Thanks Meter: 356
 
More
SeCoNd! TY for the Tutorial. I always enjoy reading these type of tuts.
The Following User Says Thank You to DarkAngel For This Useful Post: [ View ] Gift DarkAngel Ad-Free
6th November 2014, 11:35 AM |#14  
Hamidreza2010's Avatar
Senior Member
Thanks Meter: 467
 
More
lts perfectly like always.
Special thanks Ticklefish
The Following User Says Thank You to Hamidreza2010 For This Useful Post: [ View ] Gift Hamidreza2010 Ad-Free
6th November 2014, 01:56 PM |#15  
Aeyan Ashraf's Avatar
Senior Member
Flag ★◢↿ALIGARH↾◣★
Thanks Meter: 1,155
 
Donate to Me
More
Thanx Ticklefish,
Awesome tuts..... Especially the difference between fill parent and wrap content

Sent from my GT-S6802 using XDA Free mobile app
The Following User Says Thank You to Aeyan Ashraf For This Useful Post: [ View ] Gift Aeyan Ashraf Ad-Free
6th November 2014, 06:22 PM |#16  
Perseus's Avatar
Forum Moderator / Recognized Developer
Atlantis
Thanks Meter: 8,201
 
Donate to Me
More
As always Awesome Tutorials! I keep getting drawn back. Subscribed!
The Following User Says Thank You to Perseus For This Useful Post: [ View ]
9th November 2014, 10:29 PM |#17  
KronicSkillz's Avatar
Senior Member
Thanks Meter: 207
 
More
Quote:
Originally Posted by Ticklefish

****** reserved ******

Hey man thanks for all your helping out the community.

Here is a little trick i learned today to remove am/pm from clock in status bar on some older roms before 4.2 and on ones that dont have the traditional smali edit because the smali is different then the one with a static const that can be changed.

it took me hours and hours to find this, i read about 20 different threads on remove am/pm but none worked for my rom.

what threw me off was that mostly everything for the statusbar is in SystemUI.apk but after i gave up with that i decided to poke around framework-res.apk for a while just because i dont like to give up on things.

Here's what i found in framework-res.apk/res/values/strings.xml

Note:this version is already edited.
Code:
    <string name="am">a</string>
    <string name="pm">p</string>
    <string name="yesterday">Yesterday</string>
    <string name="today">Today</string>
    <string name="tomorrow">Tomorrow</string>
    <string name="hour_minute_24" formatted="false">%H:%M</string>
    <string name="hour_minute_ampm" formatted="false">%-l:%M</string>
    <string name="hour_minute_cap_ampm" formatted="false">%-l:%M</string>
    <string name="twelve_hour_time_format">h:mm</string>
    <string name="twenty_four_hour_time_format">HH:mm</string>
    <string name="numeric_date" formatted="false">%-m/%-e/%Y</string>
    <string name="numeric_date_format">M/d/yyyy</string>
    <string name="numeric_date_template" formatted="false">%s/%s/%s</string>
    <string name="month_day_year" formatted="false">%B %-e, %Y</string>
    <string name="time_of_day" formatted="false">%-l:%M:%S %p</string>
    <string name="date_and_time" formatted="false">%b %-e, %Y, %-l:%M:%S %p</string>
    <string name="date_time">%1$s, %2$s</string>
    <string name="time_date">%1$s, %3$s</string>
this seemed to be what i was looking for so i started playing around with it; it's pretty obvious that the %p is the am/pm tag, but when i removed it from all the ones that looked relevant to the clock... nothing happened... dang.

so i gave up on that and went back to looking for smali edits, but then i thought to myself in a eureka moment... most strings are defined inside their language folder, not values/

so i navigated to /framework-res.apk/res/values-en-rUS/strings.xml

i changed the same values and bam it worked. I am pretty sure u can also customize how the dates and days of the week show up in this folder too.

for my rom i'm pretty sure it was this value that removed the am/pm from the status bar.

/values-en-rUS/strings.xml
line 86: <string name="hour_minute_cap_ampm" formatted="false">%-l:%M%^p</string>
changed to:
<string name="hour_minute_cap_ampm" formatted="false">%-l:%M</string>

but if you aren't sure you can just exhaustively find all the strings.xml in your apk, and romove the %p and %^p from them, i'm pretty sure the second one (%^p) is upper case am/pm but not positive.
that's why i assumed it was line 86 because on mine the am pm was uppercase in the statusbar and its only logical that the ^ arrow up symbol defines uppercase PM. on mine i removed them all because i didn't wanna edit the file, pack the apk, flash it etc more than once when i didn't have to.

tested on LG stock rom 4.0.4 (p930) on this rom you don't even need to touch systemUI.apk to remove am/pm =D

this link also has another way to change the date format in the status bar that works on this rom also : http://forum.xda-developers.com/gala...6#post56622730 (post #26)

i removed my name from the screenshot that's why it's not centered. (at the bottom by the expanded handle) And yes that is an ICS rom even though it doesn't look like it (made alot of mods lol)
Attached Thumbnails
Click image for larger version

Name:	screenshot.jpg
Views:	606
Size:	68.9 KB
ID:	3007548  
The Following 3 Users Say Thank You to KronicSkillz For This Useful Post: [ View ] Gift KronicSkillz Ad-Free
11th November 2014, 11:52 AM |#18  
Quote:
Originally Posted by KronicSkillz

Hey man thanks for all your helping out the community.

Here is a little trick i learned today to remove am/pm from clock in status bar on some older roms before 4.2 and on ones that dont have the traditional smali edit because the smali is different then the one with a static const that can be changed.


it took me hours and hours to find this, i read about 20 different threads on remove am/pm but none worked for my rom.

what threw me off was that mostly everything for the statusbar is in SystemUI.apk but after i gave up with that i decided to poke around framework-res.apk for a while just because i dont like to give up on things.

Here's what i found in framework-res.apk/res/values/strings.xml

Note:this version is already edited.
Code:
    <string name="am">a</string>
    <string name="pm">p</string>
    <string name="yesterday">Yesterday</string>
    <string name="today">Today</string>
    <string name="tomorrow">Tomorrow</string>
    <string name="hour_minute_24" formatted="false">%H:%M</string>
    <string name="hour_minute_ampm" formatted="false">%-l:%M</string>
    <string name="hour_minute_cap_ampm" formatted="false">%-l:%M</string>
    <string name="twelve_hour_time_format">h:mm</string>
    <string name="twenty_four_hour_time_format">HH:mm</string>
    <string name="numeric_date" formatted="false">%-m/%-e/%Y</string>
    <string name="numeric_date_format">M/d/yyyy</string>
    <string name="numeric_date_template" formatted="false">%s/%s/%s</string>
    <string name="month_day_year" formatted="false">%B %-e, %Y</string>
    <string name="time_of_day" formatted="false">%-l:%M:%S %p</string>
    <string name="date_and_time" formatted="false">%b %-e, %Y, %-l:%M:%S %p</string>
    <string name="date_time">%1$s, %2$s</string>
    <string name="time_date">%1$s, %3$s</string>
this seemed to be what i was looking for so i started playing around with it; it's pretty obvious that the %p is the am/pm tag, but when i removed it from all the ones that looked relevant to the clock... nothing happened... dang.

so i gave up on that and went back to looking for smali edits, but then i thought to myself in a eureka moment... most strings are defined inside their language folder, not values/

so i navigated to /framework-res.apk/res/values-en-rUS/strings.xml

i changed the same values and bam it worked. I am pretty sure u can also customize how the dates and days of the week show up in this folder too.

for my rom i'm pretty sure it was this value that removed the am/pm from the status bar.

/values-en-rUS/strings.xml
line 86: <string name="hour_minute_cap_ampm" formatted="false">%-l:%M%^p</string>
changed to:
<string name="hour_minute_cap_ampm" formatted="false">%-l:%M</string>

but if you aren't sure you can just exhaustively find all the strings.xml in your apk, and romove the %p and %^p from them, i'm pretty sure the second one (%^p) is upper case am/pm but not positive.
that's why i assumed it was line 86 because on mine the am pm was uppercase in the statusbar and its only logical that the ^ arrow up symbol defines uppercase PM. on mine i removed them all because i didn't wanna edit the file, pack the apk, flash it etc more than once when i didn't have to.

tested on LG stock rom 4.0.4 (p930) on this rom you don't even need to touch systemUI.apk to remove am/pm =D

this link also has another way to change the date format in the status bar that works on this rom also : http://forum.xda-developers.com/gala...6#post56622730 (post #26)

i removed my name from the screenshot that's why it's not centered. (at the bottom by the expanded handle) And yes that is an ICS rom even though it doesn't look like it (made alot of mods lol)

That's fantastic work, well done!

I've put a link to this post in the OP.
13th November 2014, 02:30 PM |#19  
I've just updated the 8th post in this thread after getting a request (sort of) from @KronicSkillz.

Want to know about android:layout_gravity, android:gravity or android:layout_weight?

Then click here to find out more: http://forum.xda-developers.com/show...13&postcount=8!

The Following 5 Users Say Thank You to Ticklefish For This Useful Post: [ View ] Gift Ticklefish Ad-Free
16th November 2014, 11:19 AM |#20  
Ryo Kyun(Momo)'s Avatar
Senior Member
Thanks Meter: 90
 
More
I'm trying to make invisible button in legacy Xperia cm11, but the navigation bar xml is totally different, there is no @id/home, back etc, only @id/one,two. Any suggestions for me, sir.
The Following User Says Thank You to Ryo Kyun(Momo) For This Useful Post: [ View ] Gift Ryo Kyun(Momo) Ad-Free
16th November 2014, 02:48 PM |#21  
Quote:
Originally Posted by Ryo Kun(Momo)

I'm trying to make invisible button in legacy Xperia cm11, but the navigation bar xml is totally different, there is no @id/home, back etc, only @id/one,two. Any suggestions for me, sir.

You may have different id's but they should still do the same sort of thing. Can you share your xml please?
The Following User Says Thank You to Ticklefish For This Useful Post: [ View ] Gift Ticklefish Ad-Free
Post Reply Subscribe to Thread

Tags
center, clock, statusbar, tutorial, xml

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes