How Do I Use 'RotateDrawable'?

后端 未结 7 2145
没有蜡笔的小新
没有蜡笔的小新 2020-12-15 19:34

Could anyone tell me how they have got \'RotateDrawable\' to work whether it be from code or XML or both? The documentation on animating Drawables is pretty poor and animati

7条回答
  •  死守一世寂寞
    2020-12-15 20:20

    You could manually call RotatedDrawable.setLevel() to rotate the drawable, or you could read the code of ProgressBar, the indeterminate drawable is a LayerDrawable whose children were RotatedDrawable, like this one:

    
        
            
        
        
            
        
    
    

    The rotate animation was driven by ProgressBar's onDraw method.

提交回复
热议问题