Today, when you add the ImageView component in the authoring Android layout file, the warning pops up, prompting:
[Accessibility] Missing contentdescription attribute on image
It was strange at the time, when to add the picture related components need to set this property?
And then you find the next solution, one is lazy method, one is more official method
One, lazy method------This type of warning is set to ignore by default
First step: windows-->preferences
650) this.width=650; "src=" http://s16.sinaimg.cn/mw690/71f9299cgd6d78ba8434f&690 "width=" 273 "height=" 392 "name = "image_operate_79611362121605896" alt= "ImageView appears warning [accessibility]missing <wbr>contentdescription <wbr >attribute <wbr>on <wbr>imag "title=" ImageView appears warning [accessibility]missing <wbr> ContentDescription <wbr>attribute <wbr>on <wbr>imag "style=" margin:0px;padding:0px;border:0px; List-style:none; "/>
Step Two:
650) this.width=650; "src=" http://s4.sinaimg.cn/mw690/71f9299cgd6d79ac0b3f3&690 "width=" 690 "height=" 672 "name= "image_operate_6191362121976303" alt= "ImageView appears warning [accessibility]missing <wbr>contentdescription <wbr >attribute <wbr>on <wbr>imag "title=" ImageView appears warning [accessibility]missing <wbr> ContentDescription <wbr>attribute <wbr>on <wbr>imag "style=" margin:0px;padding:0px;border:0px; List-style:none; "/>
Although method one can get rid of that abrupt warning, but for me, appear warning and take this kind of neglect method to solve, after all, the heart still will remain a lump, that there are other better solutions? Refer to Method Two.
Ii. More Official methods
In addition to this warning from the ImageView component, this warning is also likely to occur with ImageButton. At this point we can add a property under the component-----android:contentdescription= "@string/desc" and then add the text description of the picture to the string. The XML document.
The function is to ensure that the picture component can provide a textual description.
This article is from the "No Water Fish" blog, please be sure to keep this source http://javaqun.blog.51cto.com/10687700/1705522
ImageView appears warning [accessibility]missing contentdescription attribute on image