Android.Views.View.GetDrawingCache Method

Syntax

[Android.Runtime.Register("getDrawingCache", "(Z)Landroid/graphics/Bitmap;", "GetGetDrawingCache_ZHandler")]
public virtual Android.Graphics.Bitmap GetDrawingCache (bool autoScale)

See Also

View.DrawingCacheEnabled
View.DrawingCacheEnabled
View.BuildDrawingCache(bool)
View.DestroyDrawingCache

Parameters

autoScale
Indicates whether the generated bitmap should be scaled based on the current density of the screen when the application is in compatibility mode.

Returns

Documentation for this section has not yet been entered.

Remarks

Returns the bitmap in which this view drawing is cached. The returned bitmap is null when caching is disabled. If caching is enabled and the cache is not ready, this method will create it. Calling View.Draw(Android.Graphics.Canvas) will not draw from the cache when the cache is enabled. To benefit from the cache, you must request the drawing cache by calling this method and draw it on screen if the returned bitmap is not null.

Note about auto scaling in compatibility mode: When auto scaling is not enabled, this method will create a bitmap of the same size as this view. Because this bitmap will be drawn scaled by the parent ViewGroup, the result on screen might show scaling artifacts. To avoid such artifacts, you should call this method by setting the auto scaling to true. Doing so, however, will generate a bitmap of a different size than the view. This implies that your application must be able to handle this size.

[Android Documentation]

Requirements

Namespace: Android.Views
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 4