Android LinearLayout Gradient Background

前端 未结 10 1794
渐次进展
渐次进展 2020-12-02 04:20

I am having trouble applying a gradient background to a LinearLayout.

This should be relatively simple from what I have read but it just doesn\'t seem to work. For r

10条回答
  •  情歌与酒
    2020-12-02 04:39

    Ok I have managed to solve this using a selector. See code below:

    main_header.xml:

    
    
    
    

    main_header_selector.xml:

    
    
    
        
            
        
    
    
    

    Hopefully this helps someone who has the same problem.

提交回复
热议问题