How to make Button overlap CardView at the bottom

前端 未结 7 1773
慢半拍i
慢半拍i 2020-12-29 00:33

I am creating an app that displays announcements, and I want to add a login. I am trying to make this XML design,

7条回答
  •  悲&欢浪女
    2020-12-29 01:12

    Using ConstraintLayout this issue can solve :

    
    
    
        
    
        
    
    
        
    
    
            
    
                
    
                    
    
                    
    
                    
    
    
                    
    
                    
    
    
                
    
            
    
        
    
        

    Here is the btn_rounded_primary:

    
    
        
    
            
                
                    
                        
                        
                        
                        
                    
                
            
    
        
        
    
            
                
                    
                        
                        
                        
                        
                    
                
            
    
        
    
        
    
            
                
                    
                        
                        
                        
                        
                    
                
            
    
        
    
    

    Here is the dimens.xml:

    
    2dp
    3dp
    5dp
    7dp
    10dp
    15dp
    18dp
    20dp
    25dp
    35dp
    40dp
    50dp
    55dp
    8dp
    

    colors.xml

    #f7f7f7
    #f2f2f2
    #e6e6e6
    #cccccc
    #999999
    #666666
    #37474F
    #263238
    

    Output using ConstraintLayout:

    Output using ConstraintLayout

提交回复
热议问题