First you need start your counter by calling start method
But be carefull, you can only change view from thread, which create this view. One way you can do it is post runnable on view:
CountDownTimer timer = new CountDownTimer(time*1000, 1000) {
@Override
public void onTick(long millisUntilFinished) {
txtV.post(new Runnable() {
@Override
public void run() {
txtV.setText("Activity starts"+millisUntilFinished/1000+"seconds"); // here is the txtV which isn't shown
}
});
}
@Override
public void onFinish() {
// TODO Auto-generated method stub
}
};
timer.start();