Showing posts with label dynamically-generated. Show all posts
Showing posts with label dynamically-generated. Show all posts

Sunday, January 15, 2012

Android Creating button dynamically and fill layout


I'm creating a button dynamically. The number of button is depend on the size of arraylist. the problem is, after creating the button I will add to the layout using addview method. The problem is I'm using linear layout, as by default orientation for linear layout is horizontal, so the button will fill the layout horizontally. Because of that some of the button is not visible. What I'm trying to achieve is something look like this