How to make layout with rounded corners..?

后端 未结 18 3256
独厮守ぢ
独厮守ぢ 2020-11-22 09:37

How can I make a layout with rounded corners? I want to apply rounded corners to my LinearLayout.

18条回答
  •  忘掉有多难
    2020-11-22 09:58

    I have done this way:

    Check Screenshot:

    Create drawable file named with custom_rectangle.xml in drawable folder:

    
    
    
        
    
        
    
        
    
    
    

    Now apply Rectangle background on View:

    mView.setBackground(R.drawlable.custom_rectangle);
    

    Done

提交回复
热议问题