how can i add more same layout more then one
View v = (LinearLayout) inflater.inflate(R.layout.tab_frag2_layout,container, false);
RelativeLayout tv = (RelativeLayout) inflater.inflate(R.layout.post_layout,container,false);
RelativeLayout tv2 = (RelativeLayout) inflater.inflate(R.layout.post_layout,container,false);
((LinearLayout) v).addView(tv);
((LinearLayout) v).addView(tv);
((LinearLayout) v).addView(tv);
((LinearLayout) v).addView(tv);
((LinearLayout) v).addView(tv);
if i do this it give me error and then if i do this it shows it only one time
View v = (LinearLayout) inflater.inflate(R.layout.tab_frag2_layout,container, false);
RelativeLayout tv = (RelativeLayout) inflater.inflate(R.layout.post_layout,container,false);
RelativeLayout tv2 = (RelativeLayout) inflater.inflate(R.layout.post_layout,container,false);
((LinearLayout) v).addView(tv);
((LinearLayout) v).addView(tv2);
what to do please help
RelativeLayout