Skip to main content
1 de 2
Maguz
  • 1k
  • 2
  • 11
  • 24

Nunca ponga un Listview en un ScrollView o NestedScrollView, ya que ya es desplazable.

<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/activity_cat">

    <android.support.design.widget.AppBarLayout
        android:layout_width="match_parent"
        android:layout_height="184dp"
        android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">

        <android.support.design.widget.CollapsingToolbarLayout
            android:id="@+id/collapsing_toolbar"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:contentScrim="?attr/colorPrimary"
            app:layout_scrollFlags="scroll|exitUntilCollapsed"
            app:expandedTitleGravity="bottom|center">

            <ImageView
                android:layout_width="match_parent"
                android:layout_height="105dp"
                app:srcCompat="@drawable/ic_launcher"
                android:id="@+id/profile_id" />

            <android.support.v7.widget.Toolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="?attr/actionBarSize"
                app:layout_collapseMode="pin" />

        </android.support.design.widget.CollapsingToolbarLayout>

    </android.support.design.widget.AppBarLayout>


        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <View
                android:background="@drawable/degradado"
                android:id="@+id/separador1"
                android:layout_width="fill_parent"
                android:layout_height="18dp"
                android:layout_gravity="start" />

            <ListView
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:id="@+id/listview_tab"
                android:layout_alignParentRight="true"
                android:layout_alignParentEnd="true"
                android:layout_alignParentTop="true"
                android:divider="@drawable/list_divider"/>

        </LinearLayout>
</android.support.design.widget.CoordinatorLayout>

saludos

Maguz
  • 1k
  • 2
  • 11
  • 24