Show multiple images in a imageView one after another with left to right flip effect repeatedly

后端 未结 6 1324
天命终不由人
天命终不由人 2021-02-09 20:16

Suppose I have multiple images in drawable folder(ex-8 images). I want to show all these images in a imageView one after another with left to right flip effect repeatedly(

6条回答
  •  广开言路
    2021-02-09 20:44

    Use ViewFlipper and add your ImageView inside the ViewFlipper.

    Layout file:

    
    
        
    
        
    
    
    

    Then add below code in your activity.

    ViewFlipper viewFlipper = (ViewFlipper)findViewById(R.id.flipperid);
    

    and now you can start flipping the images automatically by calling viewFlipper.startFlipping();

    Hope this will help you..

提交回复
热议问题