[Samsung Galaxy Fit GT 5670] zcop:
Custom Date, Clock style on StatusBar

After unsolved problem with Kahvitahra's mods

I start new mod. It's not good as Kahvitahra's mods but for now it's ok

So let's start

Decompile SystemUI.apk

open DateView.smali

Find

.method private final updateClock()V

Delete all this method

paste the new one

.method private final updateClock()V
.locals 7

.prologue
.line 78

new-instance v4, Ljava/text/SimpleDateFormat;
[COLOR="blue"]# total options[/COLOR]
const/16 v1, 0x5

const/16 v2, 0x0

iget-object v0, p0, Lcom/android/systemui/statusbar/DateView;->mContext:Landroid/content/Context;

invoke-virtual {v0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v0

const-string v3, "custom_date_format"

invoke-static {v0, v3, v1}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0
[COLOR="Blue"]# Option number 1[/COLOR]
const/16 v2, 0x1

if-eq v2, v0, :cond_0
[COLOR="blue"]# Option number 2[/COLOR]
const/16 v2, 0x2

if-eq v2, v0, :cond_1

const/16 v2, 0x3

if-eq v2, v0, :cond_2

const/16 v2, 0x4

if-eq v2, v0, :cond_3

const/16 v2, 0x5

if-eq v2, v0, :cond_4
[COLOR="blue"]# you can add option number N after here[/COLOR]
[COLOR="green"]# const/16 v2, 0xN

#	if-eq v2, v0, :cond_N-1[/COLOR]

[COLOR="Blue"]#all date, time is in[/COLOR] [COLOR="Red"]Simple Date Format[/COLOR].[COLOR="blue"] Google it[/COLOR]
[COLOR="Blue"]#Format of Style number 1[/COLOR]
:cond_0
const-string	v5, "yyyy-MM-dd HH:mm:ss.SSSZ"
goto :goto_0
[COLOR="blue"]# Format of style number 2[/COLOR]
:cond_1
const-string	v5, "yyyy-MM-dd HH:mm:ssZ"
goto :goto_0

:cond_2
const-string	v5, "yyyy-MM-dd HH:mmZ"
goto :goto_0

:cond_3
const-string	v5, "yyyy-MM-dd"
goto :goto_0

:cond_4
const-string	v5, "HH:mm"
goto :goto_0

[COLOR="blue"]# After here put style number N[/COLOR]
[COLOR="green"]	:cond_N-1
const-string	v5, "dd/MM/yy E HH:mm"
goto :goto_0[/COLOR]

[COLOR="Purple"]# Below is Display date format to statusbar, no need to change[/COLOR]
:goto_0
invoke-direct	{v4,v5}, Ljava/text/SimpleDateFormat;-><init>(Ljava/lang/String;)V

.line 85

.local v4, sdf:Ljava/text/SimpleDateFormat;
new-instance v6, Ljava/util/Date;

invoke-direct {v6}, Ljava/util/Date;-><init>()V

.local v6, now:Ljava/util/Date;

invoke-virtual {v4, v6}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

move-result-object v6

invoke-virtual {p0, v6}, Lcom/android/systemui/statusbar/DateView;->setText(Ljava/lang/CharSequence;)V

.line 87
return-void
.end method

Recomplie SystemUI.apk

Decompile Settings.apk( or Decompile yourPart.apk if you want to put it in Part)

open /res/values/arrays.xml

Add

<array name="custom_date_entries">
<item>yyyy-MM-dd HH:mm:ss.SSSZ</item>
<item>yyyy-MM-dd HH:mm:ssZ</item>
<item>yyyy-MM-dd HH:mmZ</item>
<item>yyyy-MM-dd</item>
<item>HH:mm</item>
[COLOR="Blue"]/*add new option Name after this */[/COLOR]
</array>
<string-array name="custom_date_values">
<item>1</item>
<item>2</item>
<item>3</item>
<item>4</item>
<item>5</item>
[COLOR="Blue"]/*add new option number( [COLOR="Green"]N[/COLOR] ) after this */[/COLOR]
</string-array>

Put option in Settings.apk

Open /res/xml/date_time_prefs.xml

Put option in Part

open /res/xml/settings.xml

go to the end of file

above

</PreferenceScreen>

paste

<PreferenceCategory android:title="StatusBar Date">
<CheckBoxPreference android:title="Enable Custom Date" android:key="custom_date" android:summaryOn="Enabled" android:summaryOff="Disabled" android:defaultValue="false" />
<ListPreference android:persistent="true" android:entries="@array/custom_date_entries" android:title="Choose custom date" android:key="custom_date_format" android:defaultValue="4" android:entryValues="@array/custom_date_values" android:dependency="custom_date" />
</PreferenceCategory>

Recompile Settings.apk or yourPart.apk

If you want to add more option

Just do folow the COLOR TEXT

I dont think this perfect.

here is perfect

Try to port it for me :)