How to mimic the Material-design raised button style, even for pre-Lollipop (minus the special effects)?

后端 未结 7 1897
别跟我提以往
别跟我提以往 2020-12-07 16:54

Google has shown some nice ways that buttons are shown on Lollipop here.

I\'m talking about both the raised and the flat buttons.

How can I mimic them on pre

7条回答
  •  有刺的猬
    2020-12-07 17:10

    In addition to @spierce7 answer, I improved that layout a little bit. So now it has a relative layout in it, which sets our custom TextView exactly in a center of CardView. So here is it.

    
    
             //just my custom height
    
            
            
    
        
    

提交回复
热议问题