Android TableLayout Width

后端 未结 6 785
耶瑟儿~
耶瑟儿~ 2021-01-30 21:33

I have a two column TableLayout as the only child of a scroll view. The first column contains TextViews (\'labels\') and the second column contains

6条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-30 22:09

    You may want to define the sizes of the columns by using a weight. So you will define the table layout height to fill parent but for each column you should set the width to "0px" and the weight to the percentage you want the column to span. So assuming you want the first column to be 30% of the screen width you set it's weight to "0.3" and the second column to "0.7".

    Try it and see if that works.

提交回复
热议问题