GridView Resize Problem

I have a gridview with an adapter based on this tutorial . Problem: When moving up or down, on the right or left on the grid screen, for some reason the button size changes. for example, with 85 * 85 pixels, it reaches 100+ by 100+ and when you move your finger back to the default value. I do not know why this is happening, I searched a lot and found nothing. Am I the only one who has this error? I also tested it on a real phone - the same thing.

+5
source share
1 answer

I would change the attributes of the GridView and limit only the height of the Button and see how it behaves

<GridView 
  android:id="@+id/gridview"
  android:layout_width="wrap_content" 
  android:layout_height="wrap_content"
  android:numColumns="3"
  android:stretchMode="columnWidth"
  android:verticalSpacing="5dp"
  android:horizontalSpacing="5dp"
/>
0
source

All Articles