开发者

Dynamically add views to tablerow

开发者 https://www.devze.com 2023-02-07 04:07 出处:网络
guys I am wondering about the lenght of a table row. In my application, views a开发者_运维知识库re dynamically created and added to tablelayout...and it gives no problems.

guys I am wondering about the lenght of a table row.

In my application, views a开发者_运维知识库re dynamically created and added to tablelayout...and it gives no problems.

However, if the length of row is longger than the width of screen(since too many views are contained on the row), I can't see some of views on screen.

Do you know how to check it in prior to actually display the row on screen?

Thanks for your help.


You can use the tableRow attributes and change the height and width of it dynamically

TableRow tableRow = findViewById(R.id.tableRow1);
tableRow.setMinimumHeight(minHeight);
tableRow.setMinimumWidth(minWidth);
tableRow.setWeightSum(weightSum);
0

精彩评论

暂无评论...
验证码 换一张
取 消