增加ImageView控件时会显示黄色的下划线,出现Missing contentDescription attribute on image的问题
主要是因为在没有使用TextView之类的文本控件,这里添加 android:contentDescription="@string/app_name"即可。
如:
<ImageView
android:contentDescription="@string/app_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@drawable/play"
android:layout_gravity="center"/>