I found out the solution for this query. Have a look at this layout,
The idea is to have a
CoordinatorLayout as the root
--AppBar layout happens to be the direct child layout for Coordinator
Host the relative layout that will have the different textview/radiobutton (that you want to add as a header kind of thing)
---Close the appbarlayout
Add the recyclerview just below the appbarlayout.
It will work fine, check out the layout that I have used and don't forget to add app:behavior in proper places.
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="match_parent">
<android.support.design.widget.AppBarLayout
android:layout_height="wrap_content"
android:layout_width="match_parent">
<RelativeLayout
android:layout_width="match_parent"
app:layout_scrollFlags="scroll|enterAlways"
android:layout_height="wrap_content"
android:id="@+id/relLayout">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Large Text"
android:id="@+id/textView"
android:layout_marginLeft="97dp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_marginTop="37dp"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="New RadioButton"
android:id="@+id/radioButton"
android:layout_below="@+id/textView"
android:layout_alignLeft="@+id/textView"
android:layout_marginTop="49dp"/>
</RelativeLayout>
</android.support.design.widget.AppBarLayout>
<android.support.v7.widget.RecyclerView
app:layout_behavior="@string/appbar_scrolling_view_behavior"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_small"
android:layout_below="@+id/relLayout"
android:id="@+id/recyclerview_settings_list"
android:scrollbars="vertical"/>
</android.support.design.widget.CoordinatorLayout>