How to get gravity 'bottom' working on a drawable in xml

前端 未结 7 1482
南方客
南方客 2021-02-12 15:41

I have a simple aim. I want a light grey background on my FrameLayout with a black dividing line underneath it (only undernearth, not all around). So far I have this:

<         


        
7条回答
  •  不思量自难忘°
    2021-02-12 16:33

    Well, it's pretty old question, but none of the answers seem to answer the actual question (how to make gravity working) so here's a working example:

    
    
    
        
                    
        
    
        
            
                      
                   
            
        
    
    

    By analogy, if you want to use gravity left or right change attribute height to width

提交回复
热议问题