I have to set a TextClock
to show the time as well as the date in another TextClock
. I want to be able to enable the user to change the format of the date. Eg. instead of dd MMMM yyyy
they want: MMMM dd yyyy
which will show January 01 2013.
I have set up a spinner and array to choose this in a config Activity but want to know how to change the TextClock
format to as I've mentioned. I have tried views.set.
... but have found nothing.
Surely there must be a way to change the format like I have in the xml file
android:format12Hour="dd MMMM yyyy"
android:format24Hour="dd MMMM yyyy"
in the java file..
Yes there is a setFormat12Hour(CharSequence) Method and 24Hour for a TextClock instance. The char sequence is just like the one you mention.