December 21st, 2009, 05:53 AM
|
#1 (permalink)
|
|
New Member
Join Date: Dec 2009
Posts: 2
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
|
how to set timer in android application
Hi Frens,
can anyone please tel me how to set timer in android application?
i have followed the code given below but it is not responding-
Timer t=new Timer();
im1=new ImageView(this);
TimerTask t1=new TimerTask()
{
synchronized
public void run()
{
im1.setImageResource(R.drawable.b);
setContentView(im1);
}
};
t.schedule(t1, 2*1000);
this code is not working.
so please anybody help me out.
thanx-
Ritu *****
|
|
|