How to create parallelogram shape background?

后端 未结 4 1763
无人共我
无人共我 2020-11-28 11:10

I am trying to make parallelogram background for my textview but it is not displaying properly...it display following output

4条回答
  •  没有蜡笔的小新
    2020-11-28 11:25

    As alternative to @mmlooloo's answer, whom a credit goes to, I suggest a xml-drawable solution (since you haven't emphasized exactly what kind of solution you're looking for). In the example below I used a general View, however you can use any other.

    Here is the View

    
    

    and shape.xml itself

    
    
    
    
    
        
            
            
        
    
    
    
    
    
        
            
                
            
        
    
    
    
    
    
        
            
                
            
        
    
    
    
    

    Here is how it looks like:

    enter image description here

提交回复
热议问题