Instead of calling "lL.addView(commentsView, i);", try just "lL.addView(commentsView);"
-- Kostya 2011/5/25 imran ali <[email protected]> > Thanks for reply, i also tried with null vale, > in this case it has been show last one only, > though my need to show all. > > Regards > Imran ali > > On May 25, 2:35 pm, Nikolay Elenkov <[email protected]> wrote: > > On Wed, May 25, 2011 at 6:29 PM, imran ali <[email protected]> wrote: > > > Hi all, > > > i have recipe_comment_sample.xml of LinearLayout i have been inflating > > > it, and i want to add this dynamically multiple times in another > > > Linearlayout lL, > > > as follows > > > > > for(int i=0;i<size;i++) > > > { > > > View commentsView = > > > > (LinearLayout)layoutInflater.inflate(R.layout.recipe_comment_sample,linearlayout > ); > > > /* > > ... > > > > > what is will be solution?? > > > > Pass null as the second parameter of inflate(). > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

