[MOD] Toggle Am/Pm in status bar clock *2/18/2011*

Search This thread

s0niqu3

Senior Member
Feb 23, 2005
718
391
Hey again everyone,

Well, after several days of pulling my hair out, and many, MANY private messages to Untermensch for smali syntax help and debugging, I've finally finished adding a user-selectable option to toggle the AM/PM flag in the status bar clock!

Unlike the other various mods floating around, this will also not affect those that use 24-hour time, and does not matter if you use a custom font either. :)

Here's some screenshots of the toggle working:
device2.png
device4.png
device.png


UPDATE 2/17/2011 5:47pm: Source posted. If you plan on adding this to the 5/6 lockscreen mod, then you'll likely have to change the resource id's for the new strings in settings.apk from the id's I used.

UPDATE 2/18/2011 9:25am: I found a bug last night that would prevent auto-time from disabling. I've already fixed it, and have attached the newest, fixed, DateTimeSettings.smali file (in zip format.) I'll be out of the house for most of the day, but will generate a new diff file once I get home. In the meantime, please download the new zip in addition to the old source zip.

Anyway, I hope everyone enjoys this, and huge thanks to untermensch for his help!

Cheers, =)

P.S. I've never been one to ask for donations, I don't think they should ever be necessary for people to contribute and give back to the community. But I finally added the paypal "donate" button under my username for anyone that wants to donate to say thanks.

P.P.S. Next mod on the agenda (assuming it doesn't drive me completely crazy) accurate battery % via code, no more ~100+ png images added to framework-res.apk =)
 

Attachments

  • AM_PM_toggle_source.zip
    231.9 KB · Views: 942
  • DateTimeSettings.zip
    5.8 KB · Views: 593
Last edited:

dasunsrule32

Inactive Recognized Developer
Oct 9, 2009
2,336
2,066
Gilbert, AZ
Works perfect with the files I pushed, just need the source (whenever you get a chance, so I can make the clock white) Thank you!
 

BowLow

Senior Member
Aug 24, 2010
160
30
D
Aweeesooomee it would be godly if you can get a toggle to hide the whole clock too... ;) still GREAT work downloading now
 

s0niqu3

Senior Member
Feb 23, 2005
718
391
Aweeesooomee it would be godly if you can get a toggle to hide the whole clock too... ;) still GREAT work downloading now

LOL,

At this point, it'd be pretty easy for me to add that option, I might look into that once I port this to kb1/bionix-v 1.2.1 for myself.

Yep, its finally time to upgrade my rom, I'm not even sure what build I started all my mods on anymore. I've pushed so many updated system files over the past few weeks, I never felt the need to flash an entirely new rom.

Cheers, =)
 
  • Like
Reactions: ipnekgs

s0niqu3

Senior Member
Feb 23, 2005
718
391
Found a bug that won't let auto-time disable.

Falling asleep at the keyboard, but in the meantime, here's a fixed DateTimeSettings.smali file (in .zip format so I could attach it to this post) for settings.apk for anyone working on implementing this already.

I'll update the source/.diff files with the new changed tomorrow.

Sorry about that.

Cheers, =)
 

Attachments

  • DateTimeSettings.zip
    5.8 KB · Views: 29
Last edited:
  • Like
Reactions: Alex9090

s0niqu3

Senior Member
Feb 23, 2005
718
391
Hey Joc, thanks for this. Didn't even notice you had posted this in our forums. Great work as usual. Miss ya. Hope you're doing well.

=)

Thanks.

Kind of been bouncing between being utterly burned out on android, to feeling extremely adventurous enough to try building my own kernel, lol. (anyone care to hook me up with an uncompressed stock+voodoo ramdisk from KA6 or KA7 so I can get up and running quickly?)

I'm hoping to add a few other CM features to the vibrant eventually:

  • accurate battery % via code
  • user-changable status clock/date color
  • phone & mms tabs on android lockscreen

Of course, just like with CM, absolutely no promises will be made, and no release schedule/timetable given. ;)

Cheers, =)
 

Wayne561

Senior Member
Nov 10, 2010
289
13
Nice job! But is this compatible with Axura 2.3.1.0? I want to flash this but I'm not a test dummy.
 

Whitehawkx

Retired Recognized Developer
Oct 13, 2010
2,447
9,270
Emerald City
Nice job! But is this compatible with Axura 2.3.1.0? I want to flash this but I'm not a test dummy.

Axura has the 6 lockscreen mod and the one from this thread i ~think~ is for the 4 or 5 lockscreens. So flashing this would cause you to lose the Star Wars lockscreen.

Well, technically the lockscreen is still there; you just won't be able to select it in the display settings.
 

Wayne561

Senior Member
Nov 10, 2010
289
13
I dont care to much for the star wars unlock screen because it sends my phone into a bootloop
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    Hey again everyone,

    Well, after several days of pulling my hair out, and many, MANY private messages to Untermensch for smali syntax help and debugging, I've finally finished adding a user-selectable option to toggle the AM/PM flag in the status bar clock!

    Unlike the other various mods floating around, this will also not affect those that use 24-hour time, and does not matter if you use a custom font either. :)

    Here's some screenshots of the toggle working:
    device2.png
    device4.png
    device.png


    UPDATE 2/17/2011 5:47pm: Source posted. If you plan on adding this to the 5/6 lockscreen mod, then you'll likely have to change the resource id's for the new strings in settings.apk from the id's I used.

    UPDATE 2/18/2011 9:25am: I found a bug last night that would prevent auto-time from disabling. I've already fixed it, and have attached the newest, fixed, DateTimeSettings.smali file (in zip format.) I'll be out of the house for most of the day, but will generate a new diff file once I get home. In the meantime, please download the new zip in addition to the old source zip.

    Anyway, I hope everyone enjoys this, and huge thanks to untermensch for his help!

    Cheers, =)

    P.S. I've never been one to ask for donations, I don't think they should ever be necessary for people to contribute and give back to the community. But I finally added the paypal "donate" button under my username for anyone that wants to donate to say thanks.

    P.P.S. Next mod on the agenda (assuming it doesn't drive me completely crazy) accurate battery % via code, no more ~100+ png images added to framework-res.apk =)
    2
    Hey Joc, thanks for this. Didn't even notice you had posted this in our forums. Great work as usual. Miss ya. Hope you're doing well.

    =)

    Thanks.

    Kind of been bouncing between being utterly burned out on android, to feeling extremely adventurous enough to try building my own kernel, lol. (anyone care to hook me up with an uncompressed stock+voodoo ramdisk from KA6 or KA7 so I can get up and running quickly?)

    I'm hoping to add a few other CM features to the vibrant eventually:

    • accurate battery % via code
    • user-changable status clock/date color
    • phone & mms tabs on android lockscreen

    Of course, just like with CM, absolutely no promises will be made, and no release schedule/timetable given. ;)

    Cheers, =)
    1
    Aweeesooomee it would be godly if you can get a toggle to hide the whole clock too... ;) still GREAT work downloading now

    LOL,

    At this point, it'd be pretty easy for me to add that option, I might look into that once I port this to kb1/bionix-v 1.2.1 for myself.

    Yep, its finally time to upgrade my rom, I'm not even sure what build I started all my mods on anymore. I've pushed so many updated system files over the past few weeks, I never felt the need to flash an entirely new rom.

    Cheers, =)
    1
    You always do some of the coolest mods S0niqu3. Once again outstanding job.

    Oh, and you know I will... ;)

    What are you waiting for, slacker?!
    1
    Found a bug that won't let auto-time disable.

    Falling asleep at the keyboard, but in the meantime, here's a fixed DateTimeSettings.smali file (in .zip format so I could attach it to this post) for settings.apk for anyone working on implementing this already.

    I'll update the source/.diff files with the new changed tomorrow.

    Sorry about that.

    Cheers, =)