How to use a shape drawable together with an image?

后端 未结 2 517
醉话见心
醉话见心 2020-12-30 19:33

I have this difficulty to have both rounded corner and a background image in my LinearLayout.

I know I can achive the rounded corner by using the shape

2条回答
  •  温柔的废话
    2020-12-30 20:12

    You could use LayerDrawable, which could contain as many layers(shapes or images) as you need. You can create it either as resource or programmatically.

    
        
        
    
    

提交回复
热议问题