How to create table layout dynamically inside thread

后端 未结 1 1719
离开以前
离开以前 2021-01-22 19:26

I am creating an android app consists of a custom alert dialog.In that dialog i want to create a table layout dynamically with 4 rows and 5 columns. I want to made this with in

1条回答
  •  渐次进展
    2021-01-22 20:06

    The lines

        table_row.addView(t_v_dialog);
    } 
    table_dialog.addView(table_row); 
    

    should be

        tablerow_dialog.addView(t_v_dialog);
    }
    table_dialog.addView(tablerow_dialog); 
    

    Don't forget to add table_dialog to your layout container.

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