How to animate .gif images in an android?

前端 未结 6 1690
一整个雨季
一整个雨季 2020-12-05 05:17

Here is the code for xml:



        
6条回答
  •  青春惊慌失措
    2020-12-05 06:07

    I wouldn't recommend using Movie or WebView classes but ImageView instead with source drawable set to animation-list. Look at example(mydrawable.xml):

    
    
    
    
    
     
    
    // in your layout : 
    

    Obviously, you have to slice your .gif into seperate images before using this solution.

提交回复
热议问题