在Android开发中,添加ImageView的时候出现了警告“[Accessibility] Missing contentDescription attribute on image”。
查阅资料发现,在"Non-textual widgets"中,需要对控件添加一个描述语句。
格式为 android:contentDescription="@string/desc"亦可android:contentDescription="XXX"(会出现新的警告)
在Android开发中,添加ImageView的时候出现了警告“[Accessibility] Missing contentDescription attribute on image”。
查阅资料发现,在"Non-textual widgets"中,需要对控件添加一个描述语句。
格式为 android:contentDescription="@string/desc"亦可android:contentDescription="XXX"(会出现新的警告)