Is there any control either in Android framework, or support libraries that allows me to display the fixed amount of other controls (lets say buttons) inside it and divide those other controls in rows if it needs to be?
Let me explain what I'm looking for with an example. Lets say I have 5 buttons named "A", "B", "C", "D" and "E". Now I want to put these buttons in some type of "ViewGroup" that will automatically place those buttons one after another depending on their visibility. So if I will set say, that there should be only at max 3 buttons in one row and all buttons are visible I should see this:
"A" "B" "C" "D" "E"
That's because only 3 buttons can be in a single row and so the parent "ViewGroup" moves the other buttons to the next row automatically. However if I hide say "B" button (Set its visibility to Gone) what I would expect to see is:
"A" "C" "D" "E"
It is important there is no fixed width set on the button controls as I want the size to be independent of the ppi of the screen. The width size of the buttons should be divided uniformly for them just like with the "weight" attribute inside LinearLayout.