How to center the elements in ConstraintLayout

后端 未结 6 2027

I am using ConstraintLayout in my application to make applications layout. I am trying to a create a screen wheren one EditText and Button

6条回答
  •  一整个雨季
    2020-12-07 10:35

    Update:

    Chain

    You can now use the chain feature in packed mode as describe in Eugene's answer.


    Guideline

    You can use a horizontal guideline at 50% position and add bottom and top (8dp) constraints to edittext and button:

    
    
        
    
            
    
        
    
        
    
        
    
    
    

提交回复
热议问题