How to center vector drawable in layer-list without scaling

后端 未结 4 933
伪装坚强ぢ
伪装坚强ぢ 2020-12-12 17:11

I am attempting to use a VectorDrawable in a LayerList without scaling the vector. For example:


    

        
4条回答
  •  有刺的猬
    2020-12-12 17:35

    Been struggling with the same problem. The only way I found to fix this and avoid the drawable to scale up was to set the drawable size and using gravity to align it:

    
        
         
    
    

    Hope it helps!

提交回复
热议问题