[Samsung Epic 4G Touch] timmetal6669:
Status BarCenterClock and (Abbreviated). Day of the week MOD

​

Saw this Mod in the Galaxy S3 section.. Thought I'd port it over. I had to edit the code slightly to get it to look the way I wanted it to on our phone, but all credit for the original should give Thanks out to Didact74. Go to his thread HERE and give him some thanks!

If anyone has a busy schedule or just a plain bad memory like me, ya like to see the day of the week LOL, Anyway;

Decompile SystemUI and navigate to res/layout/tw_status_bar.xml

Find the following code

Code:

<com.android.systemui.statusbar.policy.Clock android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:paddingLeft="6.0dip" android:gravity="left|center" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:singleLine="true"

Above this line paste the following code:

<com.android.systemui.statusbar.policy.DateView android:textAppearance="@style/TextAppearance.StatusBar.Date" android:gravity="center|left" android:id="@id/date" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:layout_toLeftOf="@id/clock" android:includeFontPadding="false" />

Recompile System UI and Set aside.

Baksmali the SystemUI classes.dex

Navigate to smali/com/android/systemui/statusbar/policy/dateview.smali

Find the following code:

.method private final updateClock()V

The very next line, delete everything all the way to and including the first "end Method you come to and paste the following code in its place:

.locals 9

.prologue
const v8, 0x7f080002

const/4 v5, 0x2

const/4 v7, 0x1

const/4 v6, 0x0

.line 92
invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/DateView;->getContext()Landroid/content/Context;

move-result-object v0

.line 93
.local v0, context:Landroid/content/Context;
new-instance v3, Ljava/util/Date;

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

.line 94
.local v3, now:Ljava/util/Date;
const-string v4, "EEE"

invoke-static {v4, v3}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;Ljava/util/Date;)Ljava/lang/CharSequence;

move-result-object v2

.line 95
.local v2, dow:Ljava/lang/CharSequence;
invoke-static {v0}, Landroid/text/format/DateFormat;->getLongDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;

move-result-object v4

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

move-result-object v1

.line 98
.local v1, date:Ljava/lang/CharSequence;
sget-boolean v4, Lcom/android/systemui/statusbar/StatusBar;->useTouchWizGUI:Z

if-eqz v4, :cond_1

.line 99
sget-boolean v4, Lcom/android/systemui/statusbar/StatusBar;->canStatusBarHide:Z

if-eqz v4, :cond_0

.line 100

new-array v4, v5, [Ljava/lang/Object;

aput-object v1, v4, v6

aput-object v2, v4, v7

invoke-virtual {v0, v8, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v4

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

.line 108
:goto_0
return-void

.line 102

:cond_0
const v4, 0x7f080003

new-array v5, v5, [Ljava/lang/Object;

aput-object v2, v5, v6

aput-object v1, v5, v7

invoke-virtual {v0, v4, v5}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v4

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

goto :goto_0

.line 105
:cond_1

new-array v4, v5, [Ljava/lang/Object;

aput-object v2, v4, v6

aput-object v1, v4, v7

invoke-virtual {v0, v8, v4}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v4

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

goto :goto_0
.end method

Add back your drawable hdpi folder and Meta Inf folder back into your System ui you recompiled earlier,

Smali your classes.dex and add that to the system UI.. done.

Status BarCenterClock and (Abbreviated). Day of the week MOD (FI27)