Merge "docs: Added content desc in ImageView example." into qt-dev

This commit is contained in:
Kevin Hufnagle
2019-08-26 21:05:37 +00:00
committed by Android (Google) Code Review

View File

@@ -62,8 +62,9 @@ import java.io.IOException;
/** /**
* Displays image resources, for example {@link android.graphics.Bitmap} * Displays image resources, for example {@link android.graphics.Bitmap}
* or {@link android.graphics.drawable.Drawable} resources. * or {@link android.graphics.drawable.Drawable} resources.
* ImageView is also commonly used to {@link #setImageTintMode(PorterDuff.Mode) * ImageView is also commonly used to
* apply tints to an image} and handle {@link #setScaleType(ScaleType) image scaling}. * <a href="#setImageTintMode(android.graphics.PorterDuff.Mode)">apply tints to an image</a> and
* handle <a href="#setScaleType(android.widget.ImageView.ScaleType)">image scaling</a>.
* *
* <p> * <p>
* The following XML snippet is a common example of using an ImageView to display an image resource: * The following XML snippet is a common example of using an ImageView to display an image resource:
@@ -76,7 +77,8 @@ import java.io.IOException;
* &lt;ImageView * &lt;ImageView
* android:layout_width="wrap_content" * android:layout_width="wrap_content"
* android:layout_height="wrap_content" * android:layout_height="wrap_content"
* android:src="@mipmap/ic_launcher" * android:src="@drawable/my_image"
* android:contentDescription="@string/my_image_description"
* /&gt; * /&gt;
* &lt;/LinearLayout&gt; * &lt;/LinearLayout&gt;
* </pre> * </pre>