How to I add CollapsingToolbarLyout
in my header_cover_image
see the picture below The blue Highlighted one.
I tried alot of work but still I can't figure it out. I hope you can help me Thank you!
<LinearLayout android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/layout">
<ImageView
android:id="@+id/header_cover_image"
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="?attr/selectableItemBackgroundBorderless"
android:scaleType="centerCrop"
android:src="@drawable/user_cover" />
<de.hdodenhof.circleimageview.CircleImageView
xmlns:app="http://schemas.android.com/apk/res-auto"
android:clickable="true"
app:civ_border_width="3dp"
app:civ_border_color="#FFFFFFFF"
android:id="@+id/profile"
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_below="@+id/header_cover_image"
android:layout_centerHorizontal="true"
android:layout_marginTop="-130dp"
android:elevation="5dp"
android:padding="20dp"
android:scaleType="centerCrop"
android:src="@drawable/hooman" />
<RelativeLayout
android:id="@+id/profile_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/header_cover_image"
android:background="@color/purpleCorallite"
android:elevation="4dp"
android:paddingBottom="24dp">
<ImageView
android:id="@+id/btnEdit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginLeft="16dp"
android:layout_marginRight="16dp"
android:layout_marginTop="16dp"
android:clickable="true"
android:src="@android:drawable/ic_menu_edit" />
<TextView
android:id="@+id/name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_marginTop="70dp"
android:text="Name"
android:textColor="#fff"
android:textSize="24sp"
android:textStyle="bold" />
<TextView
android:id="@+id/user_email"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/name"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:text="Email@email.com"
android:textColor="#fff"
android:textSize="18sp" />
</RelativeLayout>
</android.support.constraint.ConstraintLayout>
</RelativeLayout>
</ScrollView>
</LinearLayout>