Reputation: 77
I have dragged an ImageView
to layout and I selected the picture. But when I execute the application, It doesn't appear. What can I do to solve this ?
ImageView XML code;
<ImageView
android:layout_width="250dp"
android:layout_height="250dp"
app:srcCompat="@mipmap/idlepoor_moneys"
android:id="@+id/imageView4"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />
Upvotes: 3
Views: 1660
Reputation: 37
As allready said change
app:srcCompat="@mipmap/idlepoor_moneys"
to
android:src="@mipmap/idlepoor_moneys"
Also I recommend to put your images in the @drawable folder. The mipmap is where app icons are stored when making an app.
app:src="@drawable/idlepoor_moneys"
You can easily find the drawable from your project map. If you can't find it you can always right click the folder to get the path to it.
Upvotes: 1
Reputation: 2458
Add this property in Your image View
android:src="@mipmap/idlepoor_moneys"
Remove the following line from your code
app:srcCompat="@mipmap/idlepoor_moneys"
Upvotes: 6