Hi,
I want to add a count down timer in a list view. the time duration is
got from an xml in the format (PnYnMnDTnHnMnS). I used joda-time.jar
for parsing the time from Period.
I used
long totaltimeinmilliseconds = (H*24*60+M*60+S)*1000;
new CountDownTimer(totaltimeinmilliseconds, 1000) {
public void onTick(long
millisUntilFinished) {
mTimer.setText("left: " +
millisUntilFinished / 1000);
}
public void onFinish() {
mTimer.setText("done!");
}
}.start();
This code for making the countdown timer display.
I put the code just before
ll.addView(mTimer, new LinearLayout.LayoutParams
(LayoutParams.WRAP_CONTENT,
LayoutParams.WRAP_CONTENT));
in which, this linearlayout ll is used for making the list.
But my problem is if there is only 1 item in the list , the timer
will count down in each sec, but for more than one item, the dislpay
wil be in the interval of 3 or more seconds.how can i make it display
in each seconds???
Also I want to display in H:M:S format, with H,M,S synchronised.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---