Skip to main content
se eliminaron 732 caracteres en el cuerpo
Origen Enlace
Keops
  • 635
  • 1
  • 4
  • 12

Intenta agregar android:fillViewport="true" a tu NestedScrollView Ejemplo:

 <android.support.v4.widget.NestedScrollView
    android:fillViewport="true"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" >
 
 <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:padding="@dimen/activity_horizontal_margin">

        <GridView
            android:id="@+id/grid_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="5dp"
            android:columnWidth="300dp"
            android:drawSelectorOnTop="true"
            android:gravity="center"
            android:numColumns="2"
            android:stretchMode="columnWidth"
            android:verticalSpacing="10dp"
            android:focusable="true"
            android:clickable="true" />

    </LinearLayout>
</android.support.v4.widget

Editado

Agrega el siguiente código en el método donde declares a tu Gridview, ejemplo:

ViewCompat.NestedScrollView>setNestedScrollingEnabled(gridView, true);

Intenta agregar android:fillViewport="true" a tu NestedScrollView Ejemplo:

 <android.support.v4.widget.NestedScrollView
    android:fillViewport="true"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" >
 
 <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:padding="@dimen/activity_horizontal_margin">

        <GridView
            android:id="@+id/grid_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="5dp"
            android:columnWidth="300dp"
            android:drawSelectorOnTop="true"
            android:gravity="center"
            android:numColumns="2"
            android:stretchMode="columnWidth"
            android:verticalSpacing="10dp"
            android:focusable="true"
            android:clickable="true" />

    </LinearLayout>
</android.support.v4.widget.NestedScrollView>

Intenta agregar android:fillViewport="true" a tu NestedScrollView Ejemplo:

 <android.support.v4.widget.NestedScrollView
    android:fillViewport="true"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" >

Editado

Agrega el siguiente código en el método donde declares a tu Gridview, ejemplo:

ViewCompat.setNestedScrollingEnabled(gridView, true);
Origen Enlace
Keops
  • 635
  • 1
  • 4
  • 12

Intenta agregar android:fillViewport="true" a tu NestedScrollView Ejemplo:

 <android.support.v4.widget.NestedScrollView
    android:fillViewport="true"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    app:layout_behavior="@string/appbar_scrolling_view_behavior" >

 <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:padding="@dimen/activity_horizontal_margin">

        <GridView
            android:id="@+id/grid_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_margin="5dp"
            android:columnWidth="300dp"
            android:drawSelectorOnTop="true"
            android:gravity="center"
            android:numColumns="2"
            android:stretchMode="columnWidth"
            android:verticalSpacing="10dp"
            android:focusable="true"
            android:clickable="true" />

    </LinearLayout>
</android.support.v4.widget.NestedScrollView>