How to make Button overlap CardView at the bottom

前端 未结 7 1780
慢半拍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 00:59

    I have read every answer here and I have discarded every single becouse the following motives

    1. I don't want to use negative margins, this is not recommended.
    2. I don't want to user LinearLayout
    3. The others answers dosen't work for me

    So, finally I have solved my problem just wrapping the Button in another ConstraintLayout and adding some elevation to this ConstraintLayout

    Here is my result

    Here is a working sample

    
    
    
        
    
            
    
                
    
                    
    
                    
    
                    
    
                
    
            
    
            
    
                

提交回复
热议问题