Nested shapes in Android

后端 未结 1 1051
暗喜
暗喜 2021-01-07 02:32

I am trying to draw a shape that has three rectangular shapes:

  1. solid color
  2. gradient
  3. white line

How do I do that?

W

1条回答
  •  鱼传尺愫
    2021-01-07 03:10

    If you're going to look into using multiple shapes, you should try a LayerListDrawable. Something like this works for me, but only for your example height of 60px. You may have to modify it to suit your needs exactly, but this should get you a good start:

    
    
    
        
            
        
    
    
        
            
            
        
    
    

    0 讨论(0)
提交回复
热议问题