android: layout inflater -


in layout want add images on screen when user clicks on button. number of images depend on user i.e decided @ runtime. how can layout inflater used purpose such view changes dynamically user input.

i think in case layout inflater not necessary can create imageviews dynamically in java , add main layout.

linearlayout ll=(linearlayout)findviewbyid(r.id.yourll); while(count<yourusersimagesneeded) { imageview imageview = new imageview(activity); // set src , other attrs ll.addview(imageview); count++; } 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -