Monthly Archives: April 2017

Simple date-time using xml

A simple way to display date-time using xml. <android.widget.TextClock android:id=”@+id/time” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:timeZone=”GMT+0000″ <!–Greenwich –> android:format24Hour=”k:mm” android:format12Hour=”@null” android:textAppearance=”?android:attr/textAppearanceMedium” android:layout_centerVertical=”true” android:layout_centerHorizontal=”true” /> Omit the timeZone to pick up local settings from phone.

Posted in Android | Leave a comment