How do I display ImageView in Android every 1 second, then hide it for 1 sec and display it again for 1 sec, repeating indefinitely? I tried using the below technique. I am just a newbie.
ImageView v=(ImageView)findViewbyID(R.id.mypic);
Date d=new Date();
SimpleDateFormat sdf=new SimpleDateFormat("ss");
if(sdf.format(d)%2==0)
v.setVisibility(View.INVISIBLE);
The above code just makes the image invisible and does not run continuously.
1 Answer