Hiiii there, I have an xml layout and when a button is clicked I need to add a TableLayout view to that xml layout. I know how to do this with simple stuff like text views but tables would seem to be a lot harder to define programmatically, Im not quite sure what inflating is but is that what I should be using? Thanks.
Share
You can define the layout in an xml file and then simply inflate that layout using the
LayoutInflater. This will give you aView(in your case this will be a TableLayout), then add this view and you are done.Reference: LayoutInflater