I have an activity with a recycler view. But I need to add an image before recycler view (like instagram stories before feed). How do I implement it?
my xml file
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/colorPrimary"
app:layout_scrollFlags="scroll|enterAlways|snap"
app:title="Locations"
app:titleTextColor="@color/white" />
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/cropmap"
tools:listitem="@layout/item_marker" />
<ImageView
android:id="@+id/cropmap"
android:layout_width="match_parent"
android:layout_height="168dp"
android:background="@drawable/cropmap" />
<ProgressBar
android:id="@+id/main_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</android.support.design.widget.CoordinatorLayout>
Thanks!