I have an ImageView that I want to display matching the full width of the device, I realized that like this:
Use drawable-nodpi
folder in res
if image is too big.
you can use:
android:background="@drawable/home_bar"
instead of:
android:src="@drawable/home_bar"
I had the same issue, it is only showing in Design tab for Android Studio 2.2.
What I did to make it work is to change the automatic key assigned (populated via Drag/Drop ImageView) from app:srcCompat="@drawable/logo"
to android:src="@drawable/logo"
in Text tab to make it appear on both the emulator and the device e.g
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="75dp"
android:id="@+id/logoImageView"
android:scaleType="fitXY"
android:scaleX="1.5"
android:scaleY="1.5" />