Q:

ImageButton doesn't overlap over the cardview, but a normal button // ImageButton no se sobrepone encima de cardview,pero un button normal lo hace

I am developing developing an app that at some point it will show some "study sheets". The problem is that for each item it should show two buttons that should overlap over the cardview, but it only works with a normal button when with an imagebutton it doesn't happen. 
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto">

    <android.support.v7.widget.CardView
        android:id="@+id/sheet_card_view"
        android:layout_width="match_parent"
        android:layout_height="120dp"
        android:layout_marginLeft="16dp"
        android:layout_marginTop="32dp"
        android:layout_marginRight="16dp"
        android:layout_marginBottom="32dp"
        android:elevation="8dp"
        app:cardCornerRadius="8dp">

        <RelativeLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:padding="8dp"
            android:background="?android:attr/selectableItemBackground">

            <TextView
                android:id="@+id/sheet_text_content"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_centerVertical="true"
                android:layout_centerHorizontal="true"
                android:text="SAMPLE OF CONTENT.SAMPLE OF CONTENT.SAMPLE OF CONTENT.SAMPLE OF CONTENT"
                android:textSize="15sp"
                android:autoSizeMinTextSize="10sp"
                android:autoSizeMaxTextSize="20sp"
                android:autoSizeStepGranularity="2sp"/>

        </RelativeLayout>

    </android.support.v7.widget.CardView>

    <ImageButton
        android:id="@+id/sheet_flip_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentRight="true"
        android:layout_alignTop="@id/sheet_card_view"
        android:layout_marginTop="-32dp"
        android:layout_marginRight="20dp"
        android:src="@drawable/ic_flip_white_24dp"/>

    <Button
        android:id="@+id/sheet_show_image_button"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_alignBottom="@id/sheet_card_view"
        android:layout_marginBottom="-32dp"
        android:layout_marginLeft="20dp"/>

</RelativeLayout>

A:

Button has default elevation (actually, it has a StateListAnimator that provides elevation when the button is enabled) under the Material theme, whereas ImageButton does not , so you have to add elevation by yourself .

