I'm trying to add a border and a shadow to my imageview, which is placed in a ConstraintLayout. I tried to use a 9 patch image, but it not work at all!
Below, is the layout that contains the imageview.
<android.support.constraint.ConstraintLayout
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.support.constraint.Guideline
android:id="@+id/guideline_vertical_start"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.04" />
<ImageView
android:id="@+id/list_item_google_cards_media_image"
android:layout_width="0dp"
android:layout_height="200dp"
app:layout_constraintDimensionRatio="w,400:576"
app:layout_constraintStart_toStartOf="@+id/guideline_vertical_start"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.8"
android:layout_marginTop="8dp"
android:scaleType="centerCrop"
android:src="@drawable/default_image"
android:contentDescription="@string/cd_main_image" />
</android.support.constraint.ConstraintLayout>