Android Change picture every 10 seconds

前端 未结 4 592
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-24 09:14

Im trying to write a very basic android app that displays around 5 pictures one after each other on the screen. I want it to display a different picture after about 10 secon

4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-24 09:24

    create blink.xml

    
    
    
    
    
    
    
    
    

    put blink.xml in drawable folder and in activity Code write this.

    ImageView mImageView ;
    mImageView = (ImageView)findViewById(R.id.imageView); //this is your imageView
    mImageView .setImageDrawable(getResources().getDrawable( R.drawable.blink));
    

    then you will get what you want.!

提交回复
热议问题