I have a recylerview in books.xml
file where I am showing some regular book records as a list. What I am trying is to include books.xml
file in activity_main.xml
file to show the books record in home window. I need to show this records as a overlay window over main activity window as user can scroll them vertically to see the whole records. Looking like below image
And this is my current activity_main.xml
file. How can I achieve same result
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/activity_main"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white"
tools:context="com.trioangle.goferdriver.MainActivity"
android:keepScreenOn="true">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="50dp"
android:background="@color/colorblock"
android:id="@+id/relativeLayout2">
<ImageView
android:visibility="gone"
android:id="@+id/homelist"
android:layout_width="50dp"
android:layout_height="wrap_content"
android:padding="12dp"
android:layout_centerVertical="true"
android:src="@drawable/list"
android:tint="@color/white"/>
<View
android:visibility="gone"
android:id="@+id/view"
android:layout_width="1dp"
android:layout_height="match_parent"
android:layout_toRightOf="@+id/homelist"
android:background="@color/button_material_light"
android:layout_marginLeft="5dp"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"/>
<com.trioangle.goferdriver.custompalette.FontTextView
android:id="@+id/txt_driverstatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/offline"
android:paddingLeft="20dp"
android:layout_centerVertical="true"
android:textSize="18sp"
android:textColor="@color/white"
app:font="@string/font_UBERMedium"
android:layout_toRightOf="@+id/homelist"
/>
<android.support.v7.widget.SwitchCompat
style="@style/SwitchCompatStyle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/switch_driverstatus"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:checked="false"
android:layout_centerVertical="true"/>
<com.trioangle.goferdriver.custompalette.FontTextView
android:visibility="gone"
android:background="@color/ub__red"
android:id="@+id/txt_checkdriverstatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/checkstatus"
android:layout_alignParentRight="true"
android:layout_marginRight="20dp"
android:layout_centerVertical="true"
android:textSize="18sp"
android:padding="5dp"
android:textColor="@color/white"
app:font="@string/font_UBERMedium"
/>
</RelativeLayout>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/relativeLayout2">
<TextView
android:id="@+id/iv_line"
android:layout_width="50dp"
android:layout_height="5dp"
android:background="#ffffff"/>
</RelativeLayout>
<FrameLayout
android:id="@+id/frame_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/navigation"
android:layout_below="@+id/relativeLayout2">
</FrameLayout>
<android.support.design.widget.BottomNavigationView
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:layout_centerVertical="true"
android:id="@+id/navigation"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:background="@color/colorblock"
app:itemIconTint="@color/nav_item_state_list"
app:itemTextColor="@color/nav_item_state_list"
app:menu="@menu/bottom_nav_items"
android:animateLayoutChanges="false"
android:splitMotionEvents="false"/>