android - GridView element selection has different size -
i've gridview 3 columns , fixed height. seems fine when click on element, selector bigger clicked element. in image, can see, fifth element selected, , selection goes on elemen boundaries.
the gridview layout pretty simple
<gridview android:id="@+id/gridview" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:numcolumns="3" android:stretchmode="columnwidth" />
and item pretty straightforward
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="@dimen/row_height" android:gravity="center" > <imageview android:id="@+id/img" android:layout_width="@dimen/width" android:layout_height="@dimen/height" android:layout_gravity="center" android:background="@color/r1" /> </linearlayout>
what missing?
maybe using , old android theme on activity try using holo theme (@android:style/theme.holo.light.noactionbar) , check if solve problem, should.
Comments
Post a Comment