[Accessibility] Missing contentDescription attribute on image 解决

来源:互联网 发布:80端口号被占用 编辑:程序博客网 时间:2024/04/30 04:06

今天使用了下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"警告就没了

原创粉丝点击