java - How can i get the value from a textclock -
in app have textclock displaying current hour , want when click button value textclock , put in string variable. have this:
textclock time = (textclock) findviewbyid(r.id.horas); horas = time.gettext().tostring();
and in layout textclock this:
<textclock android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/horas" android:textsize="30dp" android:layout_below="@+id/space2" android:layout_centerhorizontal="true" />
but returns empty value.
this should do:
time.getformat12hour();
or:
time.getformat24hour();
you have working clock this:
Comments
Post a Comment