Android: Setting up custom gradient for button

后端 未结 3 1800
遇见更好的自我
遇见更好的自我 2021-01-25 23:52

    
          


        
3条回答
  •  一生所求
    2021-01-26 00:31

    I am not sure what the XML you showed us has to do with gradients. You can define a gradient in an XML file in your drawable folder:

    
        
        
    
    

    (for example, save this as my_gradient.xml)

    Then in your layout xml file you can have:

提交回复
热议问题