layout中xml文件提示[Accessibility] Missing contentDescription attribute on image
来源:互联网 发布:medusa软件 编辑:程序博客网 时间:2024/06/08 08:58
使用ADT 16.0或者以上版本时,用户定义一个ImageView,会提示[Accessibility] Missing contentDescription attribute on image,虽说这个警告可以忽略不计,但总让人感觉不舒服。
其实,这是ADT 16.0的新特性,在一些没有文本显示的控件里,如imageView和imageButton等,ADT会提示你添加一个android:contentDescription属性,用来描述这个控件的作用。(而且值引用strings.xml文件中的,否则又会有提示。)
英文原文如下
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.
- layout中xml文件提示[Accessibility] Missing contentDescription attribute on image
- layout中的xml文件提示Missing contentDescription attribute on image
- ImageView提示:[Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image 解决
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image .
- [Accessibility] Missing contentDescription attribute on image
- [Accessibility] Missing contentDescription attribute on image
- WM_NCHITTEST 消息的相关知识
- WERTYU(p2538)
- 为什么在chart图例总多出一个series1?
- VS2010 自动关闭的问题解决方法
- Longest Increasing Subsequence
- layout中xml文件提示[Accessibility] Missing contentDescription attribute on image
- vi操作
- php strtotime()
- C++中delete和delete[]
- architects look at thousands of buildings to grow
- 有关51特长长假前之一——网页部分[2012.5.17]
- C++ delete错误
- 电影 -- 小黄狗的窝
- Windows7下Java环境搭建(JDK环境变量配置)