Android Lint contentDescription warning

后端 未结 11 1727
情书的邮戳
情书的邮戳 2020-12-07 17:03

I am getting warning as \"[Accessibility] Missing contentDescription attribute on image\" for imageview. while using android lint

What does that mean?

11条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-07 17:48

    For graphical elements that are purely decorative, set their respective android:contentDescription XML attributes to "@null".

    If your app only supports devices running Android 4.1 (API level 16) or higher, you can instead set these elements' android:importantForAccessibility XML attributes to "no"

提交回复
热议问题