好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

MissingcontentDescriptionattributeonimag

今天使用了下ADT 16.0 在定义一个ImageVIew的时候 总是提示这个 [Accessibility] Missing contentDescription attribute on image警告,虽说可以不理 但总是感觉怪怪的,在网上一搜 发现原来这是ADT 16.0的新特性,在一些没有文本显示的控件里,如imageView

今天使用了下ADT 16.0 在定义一个ImageVIew的时候 总是提示这个 [Accessibility] Missing contentDescription attribute on image警告,虽说可以不理 但总是感觉怪怪的,在网上一搜 发现原来这是ADT 16.0的新特性,在一些没有文本显示的控件里,如imageView和imageButton等,ADT会提示你定义一个android:contentDescription属性,用来描述这个控件的作用。

Resolved this warning by setting attribute android:contentDescription for my ImageView

加上 android:contentDescription="@string/app_name"警告就没了

查看更多关于MissingcontentDescriptionattributeonimag的详细内容...

  阅读:36次