Constraint Layout Vertical Align Center

后端 未结 7 996
醉梦人生
醉梦人生 2020-12-13 05:20

How to vertically align and center objects in constraint layout? It is possible to align vertically or horizontally but I have not found a way to center at the same time bes

7条回答
  •  不知归路
    2020-12-13 05:58

    You can easily center multiple things by creating a chain. It works both vertically and horizontally

    Link to official documentation about chains

    Edit to answer comment :

    
    
        
        
        
        
    
    

    You have the horizontal chain : first_score <=> second_score <=> third_score. second_score is centered vertically. The other scores are centered vertically according to it.

    You can definitely create a vertical chain first_score <=> subtitle and center it according to second_score

提交回复
热议问题