I am tring to make a circle pop after 3 seconds and disappear in 3 seconds in a loop. this program pop the circle after 3 seconds but I have problem with the 3 seconds duration beteen.
it will be great if some one will have a solution for me
public class TestView extends View{
private boolean isPop;
public TestView(Context context) {
super(context);
isPop=false;
// TODO Auto-generated constructor stub
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
canvas.drawColor(Color.RED);
Paint circle = new Paint();
circle.setColor(Color.BLUE);
if (isPop){
canvas.drawCircle(100, 100, 40, circle);
}
invalidate();
CountDownTimer count = new CountDownTimer(3000, 1000) {
public void onTick(long millisUntilFinished) {
}
public void onFinish() {
CountDownTimer count = new CountDownTimer(3000, 1000) {
public void onTick(long millisUntilFinished) {
isPop=true;
}
public void onFinish() {
isPop=false;
}
}.start();
}
}.start();