Rounded Inner corners with transparent inside frame

后端 未结 3 1699
旧巷少年郎
旧巷少年郎 2020-12-25 12:23

I am trying to make a frame from code so that I can apply it to make rounded inner corners with a solid fill outside and transparent inside. Just like a solid re

3条回答
  •  隐瞒了意图╮
    2020-12-25 13:08

    First of all, create 3 xml layout in drawable folder:

    1. First: frame.xml
    2. Second: frame_build.xml
    3. Third: red.xml

    (You can change this name as you wish),

    frame.xml:

    
    
        
        
    
    

    frame_build.xml :

    
    
        
        
    
    

    red.xml

    
    
        
        
        
    
    

    Finally refer your view or layout to Frame XML as follow :

      android:background="@drawable/frame"
    

    This tested and output as below image:

    Output image

    Hope this help .

提交回复
热议问题