开发者

Display images one by one

开发者 https://www.devze.com 2023-01-08 02:03 出处:网络
Hi i want to display the imageviews one开发者_StackOverflow社区 by one that means if image1 is displayed after 2 sec another image is displayed .but i don\'t want to use threads why because my applica

Hi i want to display the imageviews one开发者_StackOverflow社区 by one that means if image1 is displayed after 2 sec another image is displayed .but i don't want to use threads why because my application is small.I want to use handlers.So give me some suggestions,Thanks in advance


You can do one thing for displaying images in imageview at 2 sec's interval: Implement Timer Control.

And write image setting code on onTick method of CountDownTimer class.

 public void onTick(long millisUntilFinished) {
       imgView1.setImageResource(imgValue);
    }

You can refer This example and implement something like that.

Enjoy!!

0

精彩评论

暂无评论...
验证码 换一张
取 消