title: Android - Center an ImageView on edge of layout
body: <p>I am using ConstraintLayout and I want to center an ImageView on the edge of the layout like this image:
  <a href="https://i.stack.imgur.com/dFYHo.png" rel="nofollow noreferrer">imageview centered</a></p>
  
  <p>How can I achieve this by using ConstraintLayout without using elevation (I don't know how to deal with elevation in pre-Lollipop devices).</p>
  
  <p>Here is my code so far:</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.constraint.ConstraintLayout
      xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:app="http://schemas.android.com/apk/res-auto"
      android:orientation="vertical"
      android:layout_width="match_parent"
      android:layout_height="300dp"
      app:behavior_hideable="false"
      app:behavior_peekHeight="190dp"
      android:clickable="true"
      android:focusable="true"
      android:background="#eee"
      app:layout_behavior="android.support.design.widget.BottomSheetBehavior"
      android:id="@+id/main_ride_finished_container"
      &gt;
  
  
      &lt;de.hdodenhof.circleimageview.CircleImageView
          android:id="@+id/main_driver_enroute_BS_driverImage"
          android:layout_width="70dp"
          android:layout_height="70dp"
          android:src="@color/colorPrimary"
          app:layout_constraintLeft_toLeftOf="parent"
          app:layout_constraintRight_toRightOf="parent"
          android:elevation="3dp"
          /&gt;
      &lt;android.support.constraint.ConstraintLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:layout_marginTop="35dp"
          android:background="#FFFFFF"
          &gt;
  
  
      &lt;/android.support.constraint.ConstraintLayout&gt;
  
  
  &lt;/android.support.constraint.ConstraintLayout&gt;
  </code></pre>