Is there a tools attribute for ImageView content in Android?
It's just straightforward like for the TextView
. Just use tools:src
to set the image.
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:src="@drawable/placeholder" />
Use this for random real sample images:
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="centerCrop"
tools:src="@tools:sample/backgrounds/scenic" />