I am trying to implement a GridView in my Android app, but it seems the GridView keeps resizing. I have attached a video of this below (notice the scrollbar). Although its subtle, but it's really annoying and hampers with parallax scrolling that I am trying to implement.
Video: GridView Issue
Grid Item Layout:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="120dp"
android:orientation="vertical"
android:background="@drawable/card_background"
>
<TextView
android:id = "@+id/foo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_marginRight="10dp"
android:layout_marginBottom="40dp"
style="@style/PrimaryBlueHeading"
/>
<View
android:id="@+id/list_uinderline"
android:layout_marginTop="10dp"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:background="@android:color/white"/>
<Button
android:id="@+id/bar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:focusable="false"
android:background="@color/brand_color"
android:paddingTop="2dp"
android:paddingBottom="2dp"
android:text="@string/save"
android:textColor="@android:color/white" />
</LinearLayout>
GridView Layout:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ProtocolListActivity">
<!-- android:paddingTop="?android:attr/actionBarSize" -->
<GridView
android:id="@+id/protocol_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:clipToPadding="false"
android:columnWidth="200dp"
android:numColumns="auto_fit"
android:verticalSpacing="50dp"
android:background="@drawable/backgound_potrait"
android:horizontalSpacing="50dp"
android:stretchMode="columnWidth"
android:scrollbarStyle="outsideOverlay"
android:gravity="center">
</GridView>
</RelativeLayout>