You can use the layout editor's tools
or set the android:contentDescription
to null
.
Here's an example:
// You don't need a FrameLayout,
// tell the layout editor what to "ignore" in your layout's parent
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="ContentDescription" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="34dp"
android:layout_height="61dp"
android:layout_marginLeft="11dp"
android:layout_marginRight="0dp"
android:layout_marginTop="11dp"
android:background="#ff3333"
android:src="@drawable/arrows" />
</FrameLayout>
<ImageView
android:id="@+id/imageView1"
android:layout_width="34dp"
android:layout_height="61dp"
android:layout_marginLeft="11dp"
android:layout_marginRight="0dp"
android:layout_marginTop="11dp"
android:background="#ff3333"
android:contentDescription="@null"
android:src="@drawable/arrows" />
But even better you should consider adding a short String
to accurately describe what the ImageView
is for.
From the docs:
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.
Must be a string value, using '\;' to escape characters such as '\n'
or '\uxxxx' for a unicode character.