Resolved this warning by setting attribute android:contentDescription for my ImageView
android:contentDescription="@string/desc"
Android Lint support in ADT 16 throws this warning to ensure that image widgets provide a contentDescription
This defines text that briefly describes content of the view. This property is used primarily for accessibility. Since some views do not have textual representation this attribute can be used for providing such.
Non-textual widgets like ImageViews and ImageButtons should use the contentDescription attribute to specify a textual description of the widget such that screen readers and other accessibility tools can adequately describe the user interface.
本文介绍了解决Android开发中ImageView缺少contentDescription属性导致警告的方法。通过设置该属性,不仅解决了警告,还增强了应用的无障碍访问性。
1152

被折叠的 条评论
为什么被折叠?



