android studio: place recycleview on top of Edittext with transparent background - android-studio

I'm trying to implement a chat activity where the background of the EditText is transparent, so on scrolling up the messages are visible behind the Edittext. But this is the result :
As you can see it is not perfect, I want to be able to scroll a little more to make messages above the edittext completely not behind it!
<androidx.recyclerview.widget.RecyclerView
android:layout_below="#+id/bar_layout"
android:id="#+id/recycle_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="LinearLayoutManager"
android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"
android:overScrollMode="never"
/>
<RelativeLayout
android:id="#+id/bottom"
android:layout_width="match_parent"
android:padding="5dp"
android:layout_margin="#dimen/_10sdp"
android:background="#android:color/transparent"
android:layout_alignParentBottom="true"
android:layout_height="wrap_content">
<EditText
android:id="#+id/text_send"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toLeftOf="#+id/btn_send"
android:background="#drawable/sendmessage"
android:hint="Type a message ... "
android:padding="8dp"
android:layout_centerVertical="true"
/>
<ImageButton
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:id="#+id/btn_send"
android:background="#drawable/ic_paper_plane"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>

Wrap it all in a LinearLayout with orientation="vertical"
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout 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"
tools:context=".MainActivity"
android:id="#+id/root">
<androidx.recyclerview.widget.RecyclerView
android:id="#+id/recycle_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never"
android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"
app:layoutManager="LinearLayoutManager" />
<RelativeLayout
android:id="#+id/bottom"
android:layout_width="match_parent"
android:padding="5dp"
android:background="#android:color/transparent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true">
<EditText
android:id="#+id/text_send"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerVertical="true"
android:layout_toLeftOf="#+id/btn_send"
android:hint="Type a message ... "
android:padding="8dp" />
<ImageButton
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_margin="5dp"
android:id="#+id/btn_send"
android:background="#000000"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
</RelativeLayout>

Related

marginRight not working in RelativeLayout

I have the following code but somehow the button I have on the right is stuck to the edge instead of having a margin of 41dp to the left of imageView. Is there anyway I can have have a working marginRight of 41dp (similar to the left button I have)
Have been stuck at this simple problem for a ridiculous amount of time, help is appreciated!
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_marginBottom="50dp">
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:padding="5dp"
app:cardCornerRadius="20dp">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="500dp">
<ImageView
android:id="#+id/image"
android:layout_width="338dp"
android:layout_height="338dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginStart="12dp"
android:layout_marginTop="4dp"
android:paddingTop="5dp"
android:paddingBottom="5dp"
app:srcCompat="#drawable/formal" />
<ImageButton
android:id="#+id/dislike"
android:layout_width="75dp"
android:layout_height="72dp"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="41dp"
android:layout_marginBottom="26dp"
app:srcCompat="#drawable/ic_thumbs_down_white" />
<ImageButton
android:id="#+id/like"
android:layout_width="75dp"
android:layout_height="72dp"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="41dp"
android:layout_marginBottom="26dp"
app:srcCompat="#drawable/ic_thumbs_up_white" />
<Button
android:id="#+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="#+id/image"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:layout_marginBottom="94dp"
android:text="WEAR THIS" />
</RelativeLayout>
</android.support.v7.widget.CardView>
Try this
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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:orientation="vertical">
<android.support.v7.widget.CardView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:padding="5dp"
app:cardCornerRadius="20dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="500dp"
android:orientation="vertical">
<ImageView
android:id="#+id/image"
android:layout_width="338dp"
android:layout_height="338dp"
android:src="#mipmap/ic_launcher"
android:layout_margin="10dp"/>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:text="WEAR THIS"/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="41dp"
android:layout_marginBottom="26dp"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:src="#mipmap/ic_launcher"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="41dp"
android:layout_marginBottom="26dp"
android:src="#mipmap/ic_launcher"/>
</RelativeLayout>
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
The result is

About android layout with two imageView

I have movies Application
and I am working in the details of the movie layout
now I have two posters for each movie (orginal poster and backdrop poster)
I am working to make some thing like this:
I am trying to do that but I have problem which is: the backdrop poster came to the front of orginal poster and hide it (backdrop poster hide the orginal poster)
how I can send the original poster to the front of backdrop poster
this is my code:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffff"
android:orientation="vertical"
android:scrollbarAlwaysDrawVerticalTrack="true">
<ImageView
android:id="#+id/iv_movie_poster1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="67dp"
android:src="#drawable/ic_launcher_background" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_above="#+id/relativeLayout2"
>
<ImageView
android:id="#+id/iv_movie_poster_back"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:src="#drawable/ic_launcher_background" />
<!--android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true"-->
</RelativeLayout>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="#+id/iv_movie_poster1"
android:layout_centerHorizontal="true"
android:background="#ffff"
android:elevation="4dp"
android:orientation="vertical"
android:padding="8dp"
android:id="#+id/relativeLayout2">
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingTop="30dp">
<TextView
android:id="#+id/tv_movie_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#57486c"
android:padding="16dp"
android:textSize="36sp"
tools:text="The Hunger Games" />
<TextView
android:id="#+id/tv_movie_lang"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="18sp"
android:textStyle="italic"
tools:text="English" />
<TextView
android:id="#+id/tv_movie_rating"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="7.4/10" />
<TextView
android:id="#+id/tv_movie_year"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textSize="30sp"
tools:text="2015"
/>
<TextView
android:id="#+id/tv_movie_overview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
tools:text="Katniss Everdeen and Peeta Mellark become targets of the Capitol after their victory in the 74th Hunger Games sparks a rebellion in the Districts of Panem. " />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
and thankyou
Made the layout i think it will fulfill your requirement. Using Frame Layout overlay the poster image on the back image and accordingly manage.
Follow this XML part for upper layer. Make changes accordingly relate to images you used.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="#+id/llMain"
android:layout_width="match_parent"
android:layout_height="280dp">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#FFFFFF">
<ImageView
android:id="#+id/iv_movie_poster1"
android:layout_width="match_parent"
android:layout_height="200dp"
android:contentDescription="#string/app_name"
android:scaleType="fitXY"
android:src="#drawable/testimage" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:layout_gravity="center_horizontal">
<ImageView
android:id="#+id/iv_movie_poster_back"
android:layout_width="150dp"
android:layout_height="150dp"
android:contentDescription="#string/app_name"
android:scaleType="fitXY"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:src="#drawable/com_facebook_button_icon_blue" />
</RelativeLayout>
</FrameLayout>
</LinearLayout>
</LinearLayout>
Here you can view the upper layer output.

Colapsing toolbar is not smooth when scrolling down

I have a problem with my collapsing toolbar. When I scroll up (toolbar is colapsing) it scrolls smoothly. Unfurtunately, when i scroll down (toolbar is expanding) scrolling stops waiting for nested scrolling view to get completely scrolled. I guess you will understand it with this GIF:
This is my XML:
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:fab="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="#+id/vDrawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#color/background"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<android.support.design.widget.CoordinatorLayout
android:id="#+id/vCoordinator"
style="#style/Layout.Coordinator"
tools:context="io.stepuplabs.settleup.ui.main.MainActivity">
<io.stepuplabs.settleup.ui.main.StateAwareAppBar
android:id="#+id/vAppBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:theme="#style/AppTheme.AppBarOverlay">
<android.support.design.widget.CollapsingToolbarLayout
android:id="#+id/vCollapsingToolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorAccent"
app:layout_scrollFlags="scroll|enterAlways|enterAlwaysCollapsed|exitUntilCollapsed|snap">
<ImageView
android:id="#+id/vPlaceholderCircles"
android:layout_width="match_parent"
android:layout_height="296dp"
android:contentDescription="#string/desc_circles"
android:scaleType="centerCrop"
android:src="#drawable/placeholder"
app:layout_collapseMode="none"
/>
<android.support.v7.widget.Toolbar
android:id="#+id/vToolbar"
style="#style/Layout.Toolbar"
android:layout_marginBottom="40dp"
app:layout_collapseMode="pin"
app:layout_collapseParallaxMultiplier="1"
app:popupTheme="#style/AppTheme.PopupOverlay">
<TextView
android:id="#+id/vWhoShouldPayTitle"
android:layout_width="wrap_content"
android:visibility="gone"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:text="#string/app_name"
android:textAppearance="#style/Text.Toolbar" />
</android.support.v7.widget.Toolbar>
<android.support.design.widget.TabLayout
android:id="#+id/vTabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
app:layout_collapseMode="parallax"
app:layout_collapseParallaxMultiplier="0"
app:tabIndicatorColor="#color/white"
app:tabMode="scrollable" />
</android.support.design.widget.CollapsingToolbarLayout>
</io.stepuplabs.settleup.ui.main.StateAwareAppBar>
<android.support.v4.view.ViewPager
android:id="#+id/vViewPager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="#string/appbar_scrolling_view_behavior" />
<android.support.v4.widget.ContentLoadingProgressBar
android:id="#+id/vActivityProgress"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center" />
<com.github.clans.fab.FloatingActionMenu
android:id="#+id/vFloatingActionMenu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="bottom|end"
android:contentDescription="#string/expense"
android:paddingBottom="10dp"
android:paddingLeft="10dp"
android:paddingRight="10dp"
app:layout_behavior="io.stepuplabs.settleup.ui.common.FloatingActionMenuBehavior"
fab:menu_animationDelayPerItem="0"
fab:menu_backgroundColor="#color/dim"
fab:menu_buttonSpacing="6dp"
fab:menu_fab_label="#string/expense"
fab:menu_icon="#drawable/fab_add"
fab:menu_labels_cornerRadius="30dp"
fab:menu_labels_ellipsize="end"
fab:menu_labels_paddingBottom="8dp"
fab:menu_labels_paddingLeft="16dp"
fab:menu_labels_paddingRight="16dp"
fab:menu_labels_paddingTop="8dp"
fab:menu_labels_position="left"
fab:menu_labels_textColor="#color/white"
fab:menu_labels_textSize="14sp">
<com.github.clans.fab.FloatingActionButton
android:id="#+id/vFabTransfer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:contentDescription="#string/transfer"
android:src="#drawable/ic_transfer"
fab:fab_label="#string/transfer"
fab:fab_size="mini" />
</com.github.clans.fab.FloatingActionMenu>
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:id="#+id/vNavigationDrawer"
android:layout_width="280dp"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#color/white"
android:fitsSystemWindows="true"
app:headerLayout="#layout/drawer_header"
app:itemBackground="#drawable/selector_items_background_color"
app:itemIconTint="#color/selector_drawer_items_foreground_color"
app:itemTextColor="#color/selector_drawer_items_foreground_color"
app:menu="#menu/drawer" />
</android.support.v4.widget.DrawerLayout>

How to add more content in layout? is it possible to define more than 1 textview inside scrollView?

This my code in this I have been using scrollView and inside it two textViews to add more content but it is working only when there is one textView please what changes i do to add more content?And here I want space between those textViews(content) but in my code i am trying for that but the content is overlapped and there is no proper space between contents.please help me..!
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.hp.kludge.AndroidActivity">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:weightSum="1">
<TextView
android:id="#+id/tvA"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:text="ANDROID"
android:textColor="#f6080101"
android:textColorHighlight="#df1425"
android:textSize="35dp"
android:textStyle="bold" />
<View
android:layout_width="match_parent"
android:background="#e62027"
android:layout_height="2dp"
android:layout_below="#+id/tvC" />
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="#+id/scrollView"
android:fillViewport="true"
android:orientation="vertical">
<TextView
android:id="#+id/tvWhat"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_below="#+id/tvC"
android:layout_marginTop="44dp"
android:text="What is Android?"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textSize="22dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="Content"
android:id="#+id/tvt" />
</ScrollView>
</LinearLayout>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Next"
android:id="#+id/butNext"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:background="#abc3fb" />
</RelativeLayout>

Android Studio: How can I put image at the bottom of actionbar?

I'm using recyclerview that loops the images but it starts behind the actionbar as shown below. I wanted the image to appear starting below of the action bar. I tried using the android layout below but still doesn't. Any solution guys? Thanks !!!!
Activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
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:id="#+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<android.support.design.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context=".activity.MainActivity">
<android.support.v7.widget.RecyclerView
android:id="#+id/card_recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<android.support.design.widget.AppBarLayout
android:id="#+id/main_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="#style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="#+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:popupTheme="#style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<android.support.design.widget.FloatingActionButton
android:id="#+id/fab2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="160dp"
android:layout_gravity="bottom|end"
android:layout_marginRight="#dimen/fab_margin"
android:visibility="invisible"
app:backgroundTint="#color/colorFAB2"
app:elevation="6dp"
app:pressedTranslationZ="12dp"
android:src="#drawable/ic_android_black_24dp" />
<android.support.design.widget.FloatingActionButton
android:id="#+id/fab1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="90dp"
android:layout_gravity="bottom|end"
android:layout_marginRight="#dimen/fab_margin"
android:visibility="invisible"
app:elevation="6dp"
app:backgroundTint="#color/colorFAB1"
app:pressedTranslationZ="12dp"
android:src="#drawable/ic_android_black_24dp" />
<android.support.design.widget.FloatingActionButton
android:id="#+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
app:elevation="6dp"
app:backgroundTint="#color/colorAccent"
app:pressedTranslationZ="12dp"
android:layout_margin="#dimen/fab_margin"
android:src="#drawable/ic_add_white_24dp" />
</android.support.design.widget.CoordinatorLayout>
<android.support.design.widget.NavigationView
android:id="#+id/navigation_view"
android:layout_height="match_parent"
android:layout_width="wrap_content"
android:layout_gravity="start"
app:headerLayout="#layout/nav_header"
app:menu="#menu/menu_navigation"/>
</android.support.v4.widget.DrawerLayout>
Content_main.xml
<?xml version="1.0" encoding="utf-8"?>
<com.balysv.materialripple.MaterialRippleLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="#+id/lyt_parent"
style="#style/RippleStyleWhite"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_margin="#dimen/spacing_medium"
>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<ImageView
android:id="#+id/img_android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="#drawable/black_bg" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#drawable/shape_overlay"
android:padding="10dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:orientation="horizontal">
</LinearLayout>
<TextView
android:id="#+id/tv_android"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="Sample Title"
android:gravity="center"
android:textAppearance="#style/TextAppearance.AppCompat.Title"
android:textColor="#android:color/white"
android:textStyle="normal"
android:layout_centerVertical="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true" />
</RelativeLayout>
</RelativeLayout>
</com.balysv.materialripple.MaterialRippleLayout>
Have you tried adding margin top to the RecyclerView ?
<android.support.v7.widget.RecyclerView
android:id="#+id/card_recycler_view"
android:layout_marginTop="?android:attr/actionBarSize"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

Resources