diff options
| author | Kevin Hufnagle <khufnagle@google.com> | 2019-08-14 17:50:17 -0700 |
|---|---|---|
| committer | Kevin Hufnagle <khufnagle@google.com> | 2019-08-14 18:29:55 -0700 |
| commit | b3586947394b157f806dee2d74b8b8cbca16fe3f (patch) | |
| tree | 630f1156af83af336779a35287879a6c240b5ceb /core/java/android/widget/ImageView.java | |
| parent | 81d74c6c72ec5f9e48db4a62c106077fcb38097e (diff) | |
docs: Added content desc in ImageView example.
The example ImageView at the beginning of the class description now
includes a content description attribute. Also updated the links in
the first paragraph where code fonts aren't necessary.
Test: make ds-docs -j32
Bug: 138856073
Change-Id: I33a75dc31d68289d955979d2fe8afe2ae3d4770e
Diffstat (limited to 'core/java/android/widget/ImageView.java')
| -rw-r--r-- | core/java/android/widget/ImageView.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/java/android/widget/ImageView.java b/core/java/android/widget/ImageView.java index be5d2211c670..d62b979a2ed3 100644 --- a/core/java/android/widget/ImageView.java +++ b/core/java/android/widget/ImageView.java @@ -62,8 +62,9 @@ import java.io.IOException; /** * Displays image resources, for example {@link android.graphics.Bitmap} * or {@link android.graphics.drawable.Drawable} resources. - * ImageView is also commonly used to {@link #setImageTintMode(PorterDuff.Mode) - * apply tints to an image} and handle {@link #setScaleType(ScaleType) image scaling}. + * ImageView is also commonly used to + * <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> * 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; * <ImageView * android:layout_width="wrap_content" * android:layout_height="wrap_content" - * android:src="@mipmap/ic_launcher" + * android:src="@drawable/my_image" + * android:contentDescription="@string/my_image_description" * /> * </LinearLayout> * </pre> |
