3

Why do i get this warning in ImageView in android?

    <ImageView
        android:id="@+id/user_image"
        android:layout_width="30dip"
        android:layout_height="30dip" />
Muhammad Aamir Ali
  • 20,419
  • 10
  • 66
  • 57

1 Answers1

4

You have to set the attribute "android:contentDescription" in your ImageView.

Example :

<ImageView
    android:id="@+id/user_image"
    android:layout_width="30dip"
    android:layout_height="30dip" 
    android:contentDescription="@string/imageViewDescription" />

This warning is thrown to be sure that your ImageView describes his content by a brief text.

aurelien_lepage
  • 261
  • 2
  • 8