Join the social network of Tech Nerds, increase skill rank, get work, manage projects...

 2 Answer(s)

  • Please elaborate your question. What kind of customization you want in ListView.
    For countdown timer you can use the below code:- f

    inal Handler handler = new Handler();
        Timer timer = new Timer();
        TimerTask doAsynchronousTask = new TimerTask() {       
            public void run() {
       Runnable() {
                    public void run() {       
                       // this line will execute in every 5 min
        timer.schedule(doAsynchronousTask, 0, 50000); //execute in every 50000 ms
  • Finally I got the solution of this problem. I have used the recyclerview instead of using Listview. From here you can download the source code of Countdown timer in listview

    Here is my adapter:

    package com.androidsolutionworld.multipletimer;
    import android.os.CountDownTimer;
    import android.util.Log;
    import android.view.LayoutInflater;
    import android.view.View;
    import android.view.ViewGroup;
    import android.widget.TextView;
    import java.util.ArrayList;
    public class Adapter extends RecyclerView.Adapter{
    private ArrayList al_data;
    public class MyViewHolder extends RecyclerView.ViewHolder{
        public TextView tv_timer;
        CountDownTimer timer;
        public MyViewHolder (View view){
            tv_timer = (TextView)view.findViewById(;
    public Adapter(ArrayList al_data) {
        this.al_data = al_data;
    public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.adapter_layout,parent,false);
        return new MyViewHolder(view);
    public void onBindViewHolder(final MyViewHolder holder, int position) {
        if (holder.timer != null) {
         long timer = Long.parseLong(al_data.get(position));
        timer = timer*1000;
        holder.timer = new CountDownTimer(timer, 1000) {
            public void onTick(long millisUntilFinished) {
              holder.tv_timer.setText("" + millisUntilFinished/1000 + " Sec");
            public void onFinish() {
    public int getItemCount() {
        return al_data.size();
Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: