Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
rehpyc
Old
#1  
Senior Member - OP
Thanks Meter 389
Posts: 189
Join Date: Sep 2010
Default [MOD] Change date string format in extended notification

Changing the date format
I own the VZW variant of the phone, but it seems this file is the same with all variants.

This mod will achieve this:


Method 1
1. Locate DateView.smali in smali\com\android\systemui\statusbar\policy
2. On line 262 delete
Code:
invoke-static {v0}, Landroid/text/format/DateFormat;->getLongDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;
3. Add
Code:
const-string v4, "EEEE, MMM d, yyyy"

invoke-static {v4, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;Ljava/util/Date;)Ljava/lang/CharSequence;
4. I prefer the "Day of week, Month (short), Day (w/o leading 0), Year" format, but you may choose to format it how you wish. Use this to help you with formatting.

Method 2
If you already like the way I've formatted the date. You can simply replace your DateView.smali with mine and compile your SystemUI.
The Following 2 Users Say Thank You to rehpyc For This Useful Post: [ Click to Expand ]
 
rob.allen78
Old
#2  
rob.allen78's Avatar
Member
Thanks Meter 0
Posts: 30
Join Date: Feb 2006
Quote:
Originally Posted by rehpyc View Post
Changing the date format
I own the VZW variant of the phone, but it seems this file is the same with all variants.

This mod will achieve this:


Method 1
1. Locate DateView.smali in smali\com\android\systemui\statusbar\policy
2. On line 262 delete
Code:
invoke-static {v0}, Landroid/text/format/DateFormat;->getLongDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;
3. Add
Code:
const-string v4, "EEEE, MMM d, yyyy"

invoke-static {v4, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;Ljava/util/Date;)Ljava/lang/CharSequence;
4. I prefer the "Day of week, Month (short), Day (w/o leading 0), Year" format, but you may choose to format it how you wish. Use this to help you with formatting.

Method 2
If you already like the way I've formatted the date. You can simply replace your DateView.smali with mine and compile your SystemUI.
Hi,

I'm not a programmer/developer - so how would the 'ordinary' person make this type of change? Is there a tool that I can download to my device or a tool to download to my desktop and copy the file over to my device?

I'm interested in this because I like a longer date view in my notification bar. Also - is there a mod for performing the same type of modification for the lock screen date format?
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...