Dela via


DocumentsContract.GetDocumentThumbnail Method

Definition

Return thumbnail representing the document at the given URI.

[Android.Runtime.Register("getDocumentThumbnail", "(Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/graphics/Point;Landroid/os/CancellationSignal;)Landroid/graphics/Bitmap;", "")]
public static Android.Graphics.Bitmap? GetDocumentThumbnail (Android.Content.ContentResolver content, Android.Net.Uri documentUri, Android.Graphics.Point size, Android.OS.CancellationSignal? signal);
[<Android.Runtime.Register("getDocumentThumbnail", "(Landroid/content/ContentResolver;Landroid/net/Uri;Landroid/graphics/Point;Landroid/os/CancellationSignal;)Landroid/graphics/Bitmap;", "")>]
static member GetDocumentThumbnail : Android.Content.ContentResolver * Android.Net.Uri * Android.Graphics.Point * Android.OS.CancellationSignal -> Android.Graphics.Bitmap

Parameters

content
ContentResolver
documentUri
Uri

document to return thumbnail for, which must have Document#FLAG_SUPPORTS_THUMBNAIL set.

size
Point

optimal thumbnail size desired. A provider may return a thumbnail of a different size, but never more than double the requested size.

signal
CancellationSignal

signal used to indicate if caller is no longer interested in the thumbnail.

Returns

decoded thumbnail, or null if problem was encountered.

Attributes

Remarks

Return thumbnail representing the document at the given URI. Callers are responsible for their own in-memory caching.

Java documentation for android.provider.DocumentsContract.getDocumentThumbnail(android.content.ContentResolver, android.net.Uri, android.graphics.Point, android.os.CancellationSignal).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

See also

  • <xref:Android.Provider.DocumentsProvider.OpenDocumentThumbnail(System.String%2c+Android.Graphics.Point%2c+Android.Graphics.Point)>