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.
本文详细介绍了在使用ADT16开发Android程序时遇到的关于ImageView缺少contentDescription属性导致的警告问题,并提供了通过设置android:contentDescription=@string/desc来解决该问题的方法。contentDescription属性主要用于无障碍访问,为非文本视图提供描述性文本,确保视图内容的可读性。
1152

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



