How to include constraint layout to another constraint layout and set constraint between each

后端 未结 5 1627
伪装坚强ぢ
伪装坚强ぢ 2020-12-13 16:44

I\'m using constraintLyout v 1.0.1.

I would like to include in my xml a sub ConstraintLayout corresponding to a part of my global layout (which itself is a Constrain

5条回答
  •  生来不讨喜
    2020-12-13 17:43

    We can use a layout tag if using Constraint layout. For Linear layout we can directly include the layout.

    I had a different requirement where i am having a tab view below toolbar. I had set toolbar elevation to 0dp and added a view file below the tab view so that both the tab view and toolbar looks as a single unit.

    
    
        
    
        
    
            
        
    
        
    
    
    

    This code is for Linear layout

    
    
        
    
        
    
        
    
    
    

    My elevation view file

    
    
    
    
    
    
    
    
    

    Hope this will help.

提交回复
热议问题