I am building a soundboard app, where I have some predefined buttons in a tablelayout, which is nested inside a relative layout. The layout is an own fragment (I use multiple tabs for different categories).

Sound and tabs are working fine, now I want to implement the function, that you generate a new button, once you click the "+" button and that the "+" button moves one row beneath the new button.
Is there a way to generate a new tablelayout, with the same attributes as the already existing without having to use blanks inside the xml-file?