How to make a double gradient with XML (iphone like)

前端 未结 2 1440
离开以前
离开以前 2021-01-31 05:50

How can I make this kind of drawable gradient with XML?

\"Double

I can do a simple gradie

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-31 06:34

    I finally found a solution with a layer-list which is good enough for me :

    
    
        
         
            
    
                
    
            
        
        
         
            
                
            
    
        
    
    

    The middle is set to 20 sp because the container has a 40sp height , but you can adjust to your will by editing : android:bottom="20sp"

提交回复
热议问题