yashsingh1/xdaforums huggingface dataset:
[Android Themes] Rycon33:
hi [MENTION=2948558]Spannaa[/MENTION] , got some quick question

my code is like this:

<TextClock android:format12Hour="@string/status_bar_clock_12hr_format" android:format24Hour="EEE HH:mm" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_gravity="bottom" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" />

and

<string name="status_bar_clock_12hr_format"><font size="14">EEE </font>h:mm<font size="14"> a</font></string>

It is working nicely on Xperia P AOSP ROM,

however, I tried the same exact code in Paranoid Android ROM, and my AM/PM becomes small caps. I wonder where to look so I can have it also as all-caps(the AM/PM wording).
[Android Themes] Spannaa:
Normally, you'd use android:textAllCaps="true" in the xml but, since you're using HTML tags in your string, you can't do this as it'd break the code by capitalising the html tags.

As I said in an earlier post, I'm pretty sure that the capitalisation of the day/month is controlled by your timezone and locale settings of your phone/rom and I don't think that's changeable.
[Android Themes] Rycon33:
Oh crap, I didn't pay attention when I was setting up my phone on Paranoid Android ROM and I chose my localization instead of English(US) that I normally prefer on Language and input setting. It's Ok now, thanks man, that fixed it, AM/PM is all-caps now.?

Tapatalked from my Xperia P
[Android Themes] davidwilson83:
Worked great Spannaa! Cheers for the great guide mate

In the second screen shot you can see the clock is higher than the date. Could I insert something like android:alignParentBottom='true' or something similar to bring it down a bit?

PurifieD Domination
[Android Themes] Spannaa:
Here's the code I used on my S3:

<TextClock android:textAppearance="@style/TextAppearance.StatusBar.Expanded.Clock"
android:layout_gravity="bottom"
android:id="@id/clock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="@dimen/notification_panel_header_clock_margin_left"
[COLOR="Red"]android:layout_marginTop="2.0dip"[/COLOR]
android:singleLine="true"
android:format12Hour="@string/status_bar_expanded_clock_12hr_format"
android:format24Hour="@string/status_bar_expanded_clock_24hr_format" />

I pushed mine down by adding the top margin.

Yours may be a different value though as I also increased the android:textSize to 32.0dip in styles.xml
[Android Themes] dec0der:
Guys, I just want to make this one to be so sure before I do it.

in my status_bar.xml code:

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

So, i just delete that line of code and replace with this one, right?

<TextClock android:format12Hour="EEE h:mm a" android:format24Hour="EEE HH:mm" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:singleLine="true" />

and add these lines on strings.xml, right?

<string name="status_bar_clock_12hr_format">EEE h:mm a</string>

<string name="status_bar_clock_24hr_format">EEE HH:mm</string>

Sorry for such a noob clarification, i just don't want to messed it. Thanks in advance
[Android Themes] Spannaa:
You don't need to add the lines to strings.xml because you've put the strings directly into status_bar.xml

Sent from my GT-I9300...
[Android Themes] dec0der:
So, i just need these lines? Okay I'll try it, hope it will work :fingers-crossed:

<TextClock android:format12Hour="EEE h:mm a" android:format24Hour="EEE HH:mm" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:id="@id/clock" androidaddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:singleLine="true" />

Edit:

AHA! Everything in status bar was gone :P
[Android Themes] Ticklefish:
Wrong. ;)

To quote myself from the other thread..

I could go into some detail about why but basically never delete a line with an '@id' in it. You need to hide your clock instead of deleting it. The easiest way to do that is to add another attribute:

<com.android.systemui.statusbar.policy.Clock [B][COLOR="Red"]android:visibility="gone"[/COLOR][/B] android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="6.0dip" />
[Android Themes] dec0der:
Okay, let me try that one. Thanks

Edit: Still can't make it work, thanks to all :D
[Android Themes] Ticklefish:
That could be caused by a typo in the xml...or by the way you've decompiled/recompiled/flashed the apk file.

Can you share your xml please? And let us know what your process is.
[Android Themes] Spannaa:
You can delete the original clock line if you use it's id in the new TextClock line so:

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" [COLOR="Red"]android:id="@id/clock"[/COLOR] android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:paddingStart="6.0dip" />

can be replaced with:

<TextClock android:format12Hour="EEE h:mm a" android:format24Hour="EEE HH:mm" android:textAppearance="@style/TextAppearance.StatusBar.Clock" [COLOR="Red"]android:id="@id/clock"[/COLOR] android:paddingLeft="6.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:singleLine="true" />

and it'll be fine.

[MENTION=5166389]dec0der[/MENTION] - You say you changed the code to:

<TextClock android:format12Hour="EEE h:mm a" android:format24Hour="EEE HH:mm" android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:id="@id/clock" android[COLOR="Red"][B]:p[/B][/COLOR]addingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="bottom" android:singleLine="true" />

typo marked in red ;)
[Android Themes] PetBel:
Great guide. Thank you.
[Android Themes] Ticklefish:
Try using Tickle My Android (tinyurl.com/ticklemyandroid) for your decompiling and recompilling. If you still have problems, you can share your 'history.txt' which will contain all the information we'd need to help you. :)
[Android Themes] avirk:
Do you sign the apk? Or did you put the META-INF folder from original to edited one? Be sure you did this.

IIRC you don't need to sign the apk until you don't make changes in Androidmanifiest.xml.
[Android Themes] dec0der:
Yes, I did signed the apk after recompiling. I tried what you've said

but still got empty status bar after reboot. What would be the changes in

?

Thanks for your effort mates, really appreciate it but I think, I must stay with whats on my phone right now :)
[Android Themes] engloa:
Post a logcat(if you can)

Easier to find out what went wrong:)
[Android Themes] dec0der:
Okay, logcat attached. But guys, don't get me wrong, okay? I know this thing works, I just don't know how to do it :D Thanks again :)
[Android Themes] Spannaa:
I'm no expert on reading logcats but it looks like your SystemUI.apk is corrupt.

When you decompiled it did you install the framework first?

When you recompiled it, was the framework still installed?

Did you copy the META-INF folder & AndroidManifest.xml from the original apk to the new one?

Another way of doing this would be to extract status_bar.xml from the recompiled apk and drop it into the

\vrtheme\system\priv-app\SystemUI.apk\res\layout

folder of an empty VRTheme template (attached) and then flash this.
[Android Themes] engloa:
Was browsing the list of issues in Android 4.4W and L Preview SDKs, can it be caused by TextClock class not present in the preview builds?:confused:

Will check later
[Android Themes] dec0der:
When you decompiled it did you install the framework first? Yes

When you recompiled it, was the framework still installed? Yes

Did you copy the META-INF folder & AndroidManifest.xml from the original apk to the new one? Yes

Another way of doing this would be to extract status_bar.xml from the recompiled apk and drop it into the

\vrtheme\system\priv-app\SystemUI.apk\res\layout

folder of an empty VRTheme template (attached) and then flash this. I got status 7 error flashing via CWM
[Android Themes] Spannaa:
Probably the update-binary in my zip is incompatible. Swap it with one that works with your rom/recovery or try dropping the status_bar.xml straight into the res\layout folder of the original SystemUI.apk using 7-Zip

Sent from my GT-I9300...
[Android Themes] eyesore123:
is there a guide for 4.0/CM9 here?
[Android Themes] Spannaa:
No - this is only for Android 4.2+

There is no TextClock in ICS

Sent from my GT-I9300...
[Android Themes] DedeDocil:
Not Work on MIUI V5 KitKat

Hi, sir i try this guide to change my status bar time format on MIUI V5 KitKat, but its not work. also changed this string

<string name="oldman_status_bar_time_format_24">HH:mm</string>

to

<string name="oldman_status_bar_time_format_24">EEEE</string>

& it still not working. any help?
[Android Themes] Spannaa:
If you want help, you'll need to give a lot more info than that!

Zip and attach all of the xml files relating to the clock and I'll take a look when I get the chance.

Sent from my GT-I9300...
[Android Themes] DedeDocil:
sorry sir, here is the files
[Android Themes] Spannaa:
I don't see any TextClock line in your statusbar xml...

Sent from my GT-I9300...
[Android Themes] DedeDocil:
oops sorry wrong file :D here is it
[Android Themes] Spannaa:
The Code looks Ok but I can't test it.

Does MIUI have TextClock support?

Sent from my GT-I9300...
[Android Themes] Ticklefish:
It's part of Android, so I'd assume so. Unless they specifically took it out for some reason..
[Android Themes] Hamidreza2010:
Its perfect guide

Works good on 4.3

Thanks
[Android Themes] avirale123:
is an excellent guide

I have 2 questions

1) I like to move the date of position without moving the clock

2) know how to put the date in double line
[Android Themes] Spannaa:
You mean the statusbar expanded date & clock rather than the statusbar clock then?
[Android Themes] avirale123:
perhaps this image understand

what I want

Thank you very much for answering
[Android Themes] Spannaa:
I've not seen a statusbar like that before!

What you want to do is possible, but it has nothing to do with TextClock - it's just styling:

andriod:singleLine="false" in layout\status_bar.xml and a line break in the corresponding date line in values\styles.xml for the double line date and some padding or a margin on the time or date to seperate them more.

You just need to experiment until you get the look you want.

Sent from my GT-I9300...
[Android Themes] avirale123:
really do not understand anything I just said :(

It was a miracle that after so many test compile the apk

all forms thanks for taking the time to respond :good:
[Android Themes] OjelaMorp:
Error

Sir, I cant' recompile my SystemUI.apk with these error:

C:\Android\apktool\IOS\res\layout\gemini_status_bar.xml:17: error: Error: No res

ource found that matches the given name (at 'format12Hour' with value '@string/s

tatus_bar_clock_12hr_format').

C:\Android\apktool\IOS\res\layout\gemini_status_bar.xml:17: error: Error: No res

ource found that matches the given name (at 'format24Hour' with value '@string/s

tatus_bar_clock_24hr_format').

Can you help me fix it? :confused: :confused:
[Android Themes] Vivek_Neel:
Go to res/values/strings.xml and find status_bar_clock_24hr_format

status_bar_clock_24hr_format

And modify those line something like below

<string name="status_bar_clock_24hr_format ">"format24Hour"</string>
<string name="status_bar_clock_12hr_format ">"format12Hour"</string>
[Android Themes] OjelaMorp:
I've just solved it sir :) I deleted the 2 strings and edited something.

I have now a 12 hour clock that has no am/pm but it isn't completely centered just like before when it was still with pm/am. Any Ideas sir?
[Android Themes] Vivek_Neel:
May be try changing the padding values.

Or try adding android:gravity="center"
[Android Themes] OjelaMorp:
problem solved

Someone helped on the othe thread and it's solved sir.

Thank you anyway! :)
[Android Themes] Planters76:
This works on Lollipop, Thanks
[Android Themes] Spannaa:
Are you telling us or asking us?

Sent via Bacon...
[Android Themes] Planters76:
Telling you, it works perfect :D
[Android Themes] tasstass99:
[MENTION=2948558]Spannaa[/MENTION] I edited my systemui and it ended up not working so can you check if i wrote something wrong using this rom http://xdaforums.com/galaxy-s4/i9505-develop/rom-i9505-lollzpop-touchwiz-candy-t3007528 and i want it to show seconds but just gave the regular a shot.
[Android Themes] Spannaa:
Post just the lines of code you changed or added, not the apks and I'll have a look.

Not sure showing seconds is a good idea...

Sent via Bacon...
[Android Themes] tasstass99:
Original Status_Bar.xml Line:

<com.android.systemui.statusbar.policy.Clock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:gravity="start|center" android:id="@id/clock" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:alpha="0.74" android:paddingStart="7.0dip" />

Modifyed Status_Bar.xml Line:

<TextClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_gravity="bottom" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:format12Hour="EEE h:mm a" android:format24Hour="EEE HH:mm" />

Strings.xml:

<string name="status_bar_clock_12hr_format">h:mm:ss a</string>
<string name="status_bar_clock_24hr_format">HH:mm:ss</string>

[MENTION=2948558]Spannaa[/MENTION]
[Android Themes] Spannaa:
Looks like you didn't follow the instructions in post #1 properly...

If you're setting the format12Hour & format24Hour values in status_bar.xml you don't need to add the lines again in strings.xml

If you want to set these values in strings.xml, change the format12Hour & format24Hour values in status_bar.xml to:

android:format12Hour="@string/status_bar_clock_12hr_format"
android:format24Hour="@string/status_bar_clock_24hr_format"
[Android Themes] tasstass99:
Ok could you change this code to what it is supposed to be if i wanna add seconds and what i'm gonna write in strings if so needed

<TextClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_gravity="bottom" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:format12Hour="EEE h:mm a" android:format24Hour="EEE HH:mm" />

[MENTION=2948558]Spannaa[/MENTION]
[Android Themes] Spannaa:
You don't need to tag me in every post!

As I just said, you don't need to add any strings if you're setting the format12Hour & format24Hour values in status_bar.xml

To add seconds, try adding :ss after mm to both values in status_bar.xml

<TextClock android:textAppearance="@style/TextAppearance.StatusBar.Clock" android:layout_gravity="bottom" android:id="@id/clock" android:paddingLeft="3.0dip" android:layout_width="wrap_content" android:layout_height="wrap_content" android:singleLine="true" android:format12Hour="EEE h:mm:ss a" android:format24Hour="EEE HH:mm:ss" />
[Android Themes] tasstass99:
Did change it to what you wrote but removed EEE and ss on both and it worked tested with ss first but systemui kept crashing so change back to h:ss a and HH:mm. One last question do you know how i can center the clock.
[Android Themes] Spannaa:
The same way you'd centre the normal statusbar clock (but that has nothing to do with this thread).

Sent via Bacon...
[Android Themes] Ticklefish:
It's off-topic so I won't say anything more than you can find out how to centre the clock here...http://xdaforums.com/general/xda-university/xml-101-xml-modding-easy-t2929816
[Android Themes] AlanDS:
Works fine on Xperia Z2 5.1.1

Thanks to OP.
[Android Themes] old.splatterhand:
Thanks [MENTION=2948558]Spannaa[/MENTION] for this great tutorial and [MENTION=4315551]Ticklefish[/MENTION] (through his posts I found this guide). :good: :)

Working great on HTC One M8 with Android 6.0 MM. This is til now the only solution that allows to add seconds to the statusbar clock on MM (as the most xposed modules which offer that option are not updated to MM).
[Android Themes] biglil1:
Worked great OP, many thanks!! Thought it was gonna be more complicated then that but very easy once I stopped over thinking things.
[Android Themes] Ticklefish:
Very nice. :)
[Android Themes] biglil1:
I thought I'd have to do this in the clock.smali but I've never messed with one before so it seemed over whelming. This is more of my comfort zone. I started to over think it though cuz I didn't want to lose centre clock but I just compared the two lines and it was plain as day.
[Android Themes] coolboy45:
I got problem when I used this code in my htc Butterfly (kitkat 4.4.4 Sense6)

I did a little modification in the original code: replace 4.0dip with 1.0dip. Just want to make sure the problem was not cause by decompile & recompile. The new apk with this small modification would work. So decompile & recompile should be ok.

After that, I followed the guide and replaced the com.android.systemui.statusbar.policy.Clock with your code. The new generated apk would stop working after reboot device.

Can you help me to find out solution? Thanks
[Android Themes] Spannaa:
I can't help if it's a decompile/recompile issue but, if you post the (before and after) code you edited in status_bar.xml and any other files you edited, I'll take a look ;)
[Android Themes] Spannaa:
Try dragging and dropping just the edited status_bar.xml from your recompiled SystemUI.apk into the original SystemUI.apk.

You don't need to mess with framework jar.
[Android Themes] coolboy45:
only drag status_bar_xml and resources.arsc into the original apk: still stop working:(
[Android Themes] Spannaa:
Why replace resources.arsc if you only edited status_bar_xml?

Try with just status_bar_xml

If that doesn't work, I don't know what's wrong.
[Android Themes] Ticklefish:
You shouldn't need to drag the resources.arsc over. As far as I can tell, you're not changing any of the resources.

The first thing I'd suggest is to hide the stock clock (change the width and height to 0.0dip) and put the TextClock in as a new line. Use the same XML as before but don't include the ID.

It's not impossible that your rom is complaining that it's no longer calling on the stock clock code. I can't see why that should be so but stranger things have happened!
[Android Themes] coolboy45:
I thought resources.arsc should also be rebuilt. You are right! Just status_bar.xml is already enough! Good to know.:)

I tried several things and now I find the issue! The original part com.android.systemui.statusbar.policy.Clock must be remained! I tried follwoing things:

1. I just add your code simply after the original part and regenerate new apk. After reboot, the status bar shows two clock! So the code works!

2. I delete the original part and regenerate apk. This cause the error: systemui stop working.

3. I follow the advise of [MENTION=4315551]Ticklefish[/MENTION] and use 0.0dpi to hide the original clock. Error is gone! And the original clock is also successful hidden. Amazing!!! Now I get what I want!:fingers-crossed:

Thank you so much for your kindly help. Our discuss may help others.:good:

---------- Post added at 07:39 PM ---------- Previous post was at 07:32 PM ----------

Thank you so much! Your advise is exact the solution! :good::good:The original code must be remained. I hide the original clock using 0.0dip instead of replacement. The new clock works fine and no "stop working" any more!:fingers-crossed::fingers-crossed:
[Android Themes] Nirvana09:
Ty, its working on lp
[Android Q&A, Help & Troubleshooting] Skrail211:
Bump
[Android Q&A, Help & Troubleshooting] Skrail211:
Is this not posted in the correct forum? I'm just guessing no one knows of a solution?
[Android Q&A, Help & Troubleshooting] tolara:
Çözüme Yakın

Sizin sorununuz apk~classes.dex~.smali dosyalarının içinde gereksiz kodları siliniz. "Ayrıca Facebook klasörünü bulup siliniz (her clasess.dex'te bulunmaz)" ayrıca kimi classes.dex boyutu 9MB iken yükleniyor bazı clasess.dex dosyaları ise 7,8*MB olunca yüklenmiyor. Tabikide kodlar içinde dexOpt= dex options ayarı vardır ama ben bulamadım sadece bunları biliyorum. Umarım çözüm bulan çıkar. TR
[T-Mobile, Samsung Galaxy SIII] chazel3:
So, I keep getting a low memory storage space message on my phone. Looking at my memory settings it doesn't quite add up. Simple math. Any help? Thanks
[T-Mobile, Samsung Galaxy SIII] Perseus:
What are the Specs on your phone ? Is it a 16 GB or 32 GB version ?

The screen shows 12 GB total space. That sounds about right if its a 16 GB version. First try a factory Reset to see the same numbers then. Otherwise you may have to repartition the phone.
[T-Mobile, Samsung Galaxy SIII] chazel3:
16 gig version. Thanks for your help.
[T-Mobile, Samsung Galaxy SIII] Perseus:
In that Case your 12 GB sounds about right. Please do a factory Reset and then Look at the information. Also try the DiskInfo app.
[One (M8) Accessories] droidmarc:
I know it is very early in the phone's life to have a mount just for the m8, but does anyone have a bicycle mount for mountain biking they like. the case I had for my gnex is too small.
[One (M8) Accessories] droidmarc:
I bought the otter box defender case and a handlebar bottle cage mount. Now I need to get time to put it i. Only issue is the otterbox takes a minute to set uon
[One (M8) Accessories] droidmarc:
Over the weekend I received all the parts and put it together, I really like using the otter box for the phone mount. It was very sturdy and when needed I was able to take the phone off the clip easily.

only issue is it takes a minute to put the phone in the otter box each day.
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] panday74:
installed safestrap and a custom ROM. well i messed up the stock. i should have selected slot 1.

If i want to go back to MI9, how do i do that?

Thanks.
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] Walter.White:
What's your "a" flag in download mode? If it's 1 then you can go back to MI9 if it's 2 then you can go back to MJ5 and if it's 3 then you are stuck.
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] KennyLG123:
You can try Kies 3. It can restore back to M19 it has the image. This is the only method that I know of for the time being.
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] panday74:
i dont see the flag?

is that the AP SWAEV?
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] Walter.White:
No when you boot into download mode. You should see a line that's looks something like "P# S# R# A#..."
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] panday74:
so i did this

press and hold Volume Down, Home and Power, all at the same time.

then vol up to get to download mode

i see S1, T1, R1, A1, P1
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] Walter.White:
That's good it looks like you can easily go back to MI9.

Refer to this thread and download MI9 files and flash them. http://xdaforums.com/showthread.php?t=2502049
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] panday74:
Thank you.
[AT&T Galaxy Note 3 Q&A, Help & Troubleshooting] dave812:
root de la vega

I still run MI9 and use root de la vega to restore. Works the best in my view. Here is the link to the torrent, I am seeding.

http://d-h.st/tWZ