Android LinearLayout in HorizontalScrollView with multiple rows

后端 未结 1 1119
遥遥无期
遥遥无期 2021-01-06 22:12

I am using LinearLayout in HorizontalScrollView the scrolling part is working but i can\'t figure out how to make 3 rows.


for Example:

Bold

1条回答
  •  执念已碎
    2021-01-06 22:44

    Instead of LinearLayout Try GridLayout which is part of Android support library.

    It has provision of setting number of columns and rows while implementation in XML layout.

    Something like below

     
    
        
    
            

    Edit - You can use TableLayout instead of GridLayout if you want to add child views of different width as below

      
    
        
    
            
    
                

    0 讨论(0)
提交回复
热议问题