I am making an Android app, and I want to copy some XML code in a Linear Layout, and re-insert it into the Linear Layout so that there are two of the Relative Layouts in the
I FOR SURE got it working this time! I used this code:
LinearLayout item = (LinearLayout)findViewById(R.id.tileContainerME);
View child = getLayoutInflater().inflate(R.layout.activity_main, null);
item.addView(child);
It would copy the 'activity_main' class which holds solely the XML data for the tile. Then it copies it into the Horizontal Scroll View! Here is a screenshot of my solution:
http://i.stack.imgur.com/WxoJG.png