Missing contentDescription

2025-04-08 16:29:11

1、an蟠校盯昂droid开发中在配置文件中使用ImageView有时会引起Missing contentDescription attribute on image.比如:在main.xml中增加ImageView控件时如果没有加android:contentDescription="@string/app_name"时会引起Missing contentDescription attribute on image. 主要是因为在main.xml中没有使用TextView之类的文本控件,ADT会提示给像ImageView增加一个说明,这里添加android:contentDescription="@string/app_name即可,其实加不加影响不大。只是在IDE中会显示一个黄色下划线,不美观。

声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢