<?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"
android:background="#FFFFFF"
tools:context=".MainActivity">
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="4dp">
<ImageView
android:id="@+id/photoImageView"
android:layout_width="match_parent"
android:layout_height="300dp"
android:alpha="1.0"
android:scaleType="centerCrop"
tools:src="@drawable/default_post_photo" />
<View
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_below="@+id/photoImageView"
android:background="@android:color/transparent"/>
<RelativeLayout
android:id="@+id/playRelativeLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/photoImageView"
android:layout_toLeftOf="@+id/shareFloatingActionButton"
android:layout_marginTop="-28dp"
android:layout_marginRight="16dp">
<ImageView
android:id="@+id/icon_play"
android:layout_width="56dp"
android:layout_height="56dp"
app:srcCompat="@drawable/ic_play2_white_24dp" />
<ProgressBar
android:id="@+id/playProgressBar"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_alignLeft="@+id/icon_play"
android:layout_alignTop="@+id/icon_play"
android:theme="@style/CircularProgress"
android:visibility="visible" />
</RelativeLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/shareFloatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="-28dp"layout_below="@+id/photoImageView"
android:layout_below="@+id/photoImageView"layout_marginRight="16dp"
android:layout_marginRight="16dp"layout_marginTop="-28dp"
app:backgroundTint="@color/colorPrimary"
app:srcCompat="@drawable/ic_share_white_24dp" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/relativeLayout"
android:layout_marginTop="-28dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Texto para rellenar"
android:layout_marginLeft="16dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Texto para rellenar"
android:layout_marginLeft="16dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Texto para rellenar"
android:layout_marginLeft="16dp"/>
</LinearLayout>
</RelativeLayout>
Mira esta edición explica tambien en caso que quieras agregar el texto y no se vaya muy abajo lo unico q debes colocar es el marginTop = -12dp o como veas conveniente tambien el FloatingButton faltaba colocar en negativo el marginTop
<?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"
android:background="#FFFFFF"
tools:context=".MainActivity">
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="4dp">
<ImageView
android:id="@+id/photoImageView"
android:layout_width="match_parent"
android:layout_height="300dp"
android:alpha="1.0"
android:scaleType="centerCrop"
tools:src="@drawable/default_post_photo" />
<View
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_below="@+id/photoImageView"
android:background="@android:color/transparent"/>
<RelativeLayout
android:id="@+id/playRelativeLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/photoImageView"
android:layout_toLeftOf="@+id/shareFloatingActionButton"
android:layout_marginTop="-28dp"
android:layout_marginRight="16dp">
<ImageView
android:id="@+id/icon_play"
android:layout_width="56dp"
android:layout_height="56dp"
app:srcCompat="@drawable/ic_play2_white_24dp" />
<ProgressBar
android:id="@+id/playProgressBar"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_alignLeft="@+id/icon_play"
android:layout_alignTop="@+id/icon_play"
android:theme="@style/CircularProgress"
android:visibility="visible" />
</RelativeLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/shareFloatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="-28dp"
android:layout_below="@+id/photoImageView"
android:layout_marginRight="16dp"
app:backgroundTint="@color/colorPrimary"
app:srcCompat="@drawable/ic_share_white_24dp" />
</RelativeLayout>
</RelativeLayout>
<?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"
android:background="#FFFFFF"
tools:context=".MainActivity">
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="4dp">
<ImageView
android:id="@+id/photoImageView"
android:layout_width="match_parent"
android:layout_height="300dp"
android:alpha="1.0"
android:scaleType="centerCrop"
tools:src="@drawable/default_post_photo" />
<View
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_below="@+id/photoImageView"
android:background="@android:color/transparent"/>
<RelativeLayout
android:id="@+id/playRelativeLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/photoImageView"
android:layout_toLeftOf="@+id/shareFloatingActionButton"
android:layout_marginTop="-28dp"
android:layout_marginRight="16dp">
<ImageView
android:id="@+id/icon_play"
android:layout_width="56dp"
android:layout_height="56dp"
app:srcCompat="@drawable/ic_play2_white_24dp" />
<ProgressBar
android:id="@+id/playProgressBar"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_alignLeft="@+id/icon_play"
android:layout_alignTop="@+id/icon_play"
android:theme="@style/CircularProgress"
android:visibility="visible" />
</RelativeLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/shareFloatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_below="@+id/photoImageView"
android:layout_marginRight="16dp"
android:layout_marginTop="-28dp"
app:backgroundTint="@color/colorPrimary"
app:srcCompat="@drawable/ic_share_white_24dp" />
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/relativeLayout"
android:layout_marginTop="-28dp"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Texto para rellenar"
android:layout_marginLeft="16dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Texto para rellenar"
android:layout_marginLeft="16dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Texto para rellenar"
android:layout_marginLeft="16dp"/>
</LinearLayout>
</RelativeLayout>
Prueba colocando esto:
<?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"
android:background="#FFFFFF"
tools:context=".MainActivity">
<RelativeLayout
android:id="@+id/relativeLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="4dp">
<ImageView
android:id="@+id/photoImageView"
android:layout_width="match_parent"
android:layout_height="300dp"
android:alpha="1.0"
android:scaleType="centerCrop"
tools:src="@drawable/default_post_photo" />
<View
android:layout_width="match_parent"
android:layout_height="28dp"
android:layout_below="@+id/photoImageView"
android:background="@android:color/transparent"/>
<RelativeLayout
android:id="@+id/playRelativeLayout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/photoImageView"
android:layout_toLeftOf="@+id/shareFloatingActionButton"
android:layout_marginTop="-28dp"
android:layout_marginRight="16dp">
<ImageView
android:id="@+id/icon_play"
android:layout_width="56dp"
android:layout_height="56dp"
app:srcCompat="@drawable/ic_play2_white_24dp" />
<ProgressBar
android:id="@+id/playProgressBar"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_alignLeft="@+id/icon_play"
android:layout_alignTop="@+id/icon_play"
android:theme="@style/CircularProgress"
android:visibility="visible" />
</RelativeLayout>
<android.support.design.widget.FloatingActionButton
android:id="@+id/shareFloatingActionButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_marginBottom="-28dp"
android:layout_below="@+id/photoImageView"
android:layout_marginRight="16dp"
app:backgroundTint="@color/colorPrimary"
app:srcCompat="@drawable/ic_share_white_24dp" />
</RelativeLayout>
</RelativeLayout>
Lo que hice fue colocar un view transparente y colocar debajo de imageview el boton y colocar la mitad del tamaño del objeto en marginTop = -28dp.
lang-xml