Android.Views.View.BuildDrawingCache Method

Syntax

[Android.Runtime.Register("buildDrawingCache", "(Z)V", "GetBuildDrawingCache_ZHandler")]
public virtual void BuildDrawingCache (bool autoScale)

See Also

View.DrawingCache
View.DestroyDrawingCache

Parameters

autoScale
Documentation for this section has not yet been entered.

Remarks

Forces the drawing cache to be built if the drawing cache is invalid.

If you call View.BuildDrawingCache manually without calling View.DrawingCacheEnabled, you should cleanup the cache by calling View.DestroyDrawingCache afterwards.

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.

You should avoid calling this method when hardware acceleration is enabled. If you do not need the drawing cache bitmap, calling this method will increase memory usage and cause the view to be rendered in software once, thus negatively impacting performance.

[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