Android Animation Flicker

前端 未结 6 1368
天命终不由人
天命终不由人 2020-11-30 11:17

I\'ve been trawling through as many threads on this topic that I can find on the flicker that arises in Android 2.2 when dealing with AnimationListeners, but I can\'t quite

6条回答
  •  南方客
    南方客 (楼主)
    2020-11-30 11:47

    I faced the same error, but it only appeared in some views, although all had the same implementation. As it turned out, it happened for two reasons:

    • When I had android:animateLayoutChanges="true" in my root xml element
    • When the problematic view was directly connected to the root xml element

    So, two solutions, either remove the android:animateLayoutChanges="true" tag (suggested since you're not using it), or use a wrapper Layout around the problematic view! So instead of:

    
    
    
        
    
            
        
    ...
    
    

    , do

    
    
    
        
    
            
    
                
            
        
        ...
    
    

提交回复
热议问题