Android Studio countdowntimer seekbar? -


i have made countdowntimer in android studio. has progress bar shows progress. however, want seekbar seek specific time in countdown. i'm not sure how this. want able drag seekbar , countdowntimer change accordingly.

thanks in advance.

i done many time before.. fortunately have source of that...

mtxttime = (textview) findviewbyid(r.id.txt_time);     mskbcountdown = (seekbar) findviewbyid(r.id.count_down);     mskbcountdown.setprogress(mskbcountdown.getmax());      new mycountdown(100000, 1000).start();   public class mycountdown extends countdowntimer {      public mycountdown(long millisinfuture, long countdowninterval) {         super(millisinfuture, countdowninterval);         mskbcountdown.setmax((int) millisinfuture);     }      @override     public void onfinish() {         mtxttime.settext("it finished...!!");     }      @override     public void ontick(long millisuntilfinished) {         long timeremaining = millisuntilfinished;         mtxttime.settext(" " + millisuntilfinished / 1000 + "."+ millisuntilfinished % 1000);         mskbcountdown.setprogress((int) (timeremaining));         //log.i(tag, "time tick: " + millisuntilfinished);     } 

may helps you.. works fine me...


Comments