I want Chronometer to display my timer. When Chronometer.stop
is called, i want to stop timer and display text at same place.
Timer is getting stopped but after stopping when i try to
setText("Stopped");
It is not working. Please let me know if i'm doing valid things or not.
XML changes:
<Chronometer android:id="@+id/timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/green"
android:visibility="visible" />
Code changes:
mTimer = (Chronometer) mRootGroupView.findViewById(R.id.timer);
On two buttons i'm starting and stopping timer.
mTimer.stop();
mTimer.setText("stopped");
mTimer.setVisibility(View.VISIBLE);
mTimer.setTextColor(color.red);
Please HELP !!!