• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Imageview not showing image in AndroidStudio designer

As a beginner, I'm following a tutorial, but cannot figure out why the image is not showing in ImageView

The files are as per attached screenshot and activity_main looks like this
-------------------
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.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:visibility="invisible"
tools:context=".MainActivity"
>

<ImageView
android:id="@+id/imageView3"
android:layout_width="0dp"
android:layout_height="150dp"
android:scaleType="centerCrop"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/devslopesbanner"
android:contentDescription="@String/todo"
/>

</androidx.constraintlayout.widget.ConstraintLayout>

-------------------
Appreciate if somebody can point out what I'm missing
 

Attachments

  • Files.png
    Files.png
    214.7 KB · Views: 371
Back
Top Bottom