I am using two button s Date and Time .They are working well . but i need to add more button Clear . on click of clear button my Date N Time button should be empty (No date N Time should be display).
<Button
android:id="@+id/btn_qs_date"
style="@style/Text.Medium"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:text="Thu, 15/03/2012" />
<Button
android:id="@+id/btn_qs_time"
style="@style/Text.Medium"
android:layout_width="wrap_content"
android:layout_height="40dp"
android:layout_marginLeft="10dp"
android:text="11:00 AM" />
<ImageButton
android:id="@+id/reset_date_time"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_centerHorizontal="true"
android:layout_gravity="center"
android:layout_marginLeft="20dp"
android:background="@drawable/selector_reset_button" />
and my java code is:-
case R.id.btn_reset_radio_test_grp:
rgYes.setChecked(false);
rgNo.setChecked(false);
break;
case R.id.reset_date_time:
//i will have to write here
break;
Where clearButton is your
clearButtonin your UI