Shared Element Transition on CardView with radius

后端 未结 3 1478
春和景丽
春和景丽 2021-02-01 07:18

I\'ve been working on this problem for weeks and I\'m still unable to solve this problem.

So, I have a CardView that contains a LinearLayout with an ImageView.

3条回答
  •  花落未央
    2021-02-01 07:33

    Based on Ovidiu's answer, here is a working transition which can animate the corners

    https://gist.github.com/StefanDeBruijn/d45807d386af0e066a03186fe00366e8

    This can either be added programatically to the enter shared transition set or through xml:

    
        
            
                
            
            
            
            
            
            
            
            
        
    
    

    Don't forget to add to your attrs.xml:

       
            
            
        
    

提交回复
热议问题