Hi I have created a gridlayout with columns of 4
but I have 7 which 3 at bottom I want to center
I want to make my gridlayout something like this.
how can I achieve it?
my gridlayout is this
<GridLayout
android:layout_width="242dp"
android:layout_height="fill_parent"
android:id="@+id/gridLayout"
android:columnCount="4"
android:layout_gravity="center"
android:stretchMode="columnWidth">
// appending
for(int x = 0; x < something.length(); x++) {
View view = to do///
gridLayout.addView(view);
}