TheProgrammer
TheProgrammer

Reputation: 61

Android Studio Image not showing

I am new to android studio and am trying to display some countries in a list with a picture of the flag. This does not seem to work...

I tried re importing the images, this did not work. I also tried to put this 'android:src' instead of 'srcCompat'.

So this is my activity_listview

<ImageView
        android:id="@+id/iconFlag"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:src="@mipmap/ic_launcher"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/titleTextView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="8dp"
        android:text="Country"
        android:textColor="@android:color/black"
        android:textSize="30sp"
        app:layout_constraintStart_toEndOf="@+id/iconFlag"
        app:layout_constraintTop_toTopOf="parent" />

Here is what I see: https://i.sstatic.net/LwIbs.jpg

I just don't know what to do since I am completely new to android studio.

Upvotes: 0

Views: 165

Answers (1)

Muhammad Usman Butt
Muhammad Usman Butt

Reputation: 545

Put you all images in Drawable folder instead on Drawable-24 enter image description here

Upvotes: 2

Related Questions