Udostępnij za pośrednictwem


View.HasOverlappingRendering Property

Definition

Returns whether this View has content which overlaps.

public virtual bool HasOverlappingRendering { [Android.Runtime.Register("hasOverlappingRendering", "()Z", "GetHasOverlappingRenderingHandler")] get; }
[<get: Android.Runtime.Register("hasOverlappingRendering", "()Z", "GetHasOverlappingRenderingHandler")>]
member this.HasOverlappingRendering : bool

Property Value

true if the content in this view might overlap, false otherwise.

Attributes

Remarks

Returns whether this View has content which overlaps.

This function, intended to be overridden by specific View types, is an optimization when alpha is set on a view. If rendering overlaps in a view with alpha < 1, that view is drawn to an offscreen buffer and then composited into place, which can be expensive. If the view has no overlapping rendering, the view can draw each primitive with the appropriate alpha value directly. An example of overlapping rendering is a TextView with a background image, such as a Button. An example of non-overlapping rendering is a TextView with no background, or an ImageView with only the foreground image. The default implementation returns true; subclasses should override if they have cases which can be optimized.

<strong>Note:</strong> The return value of this method is ignored if #forceHasOverlappingRendering(boolean) has been called on this view.

Java documentation for android.view.View.hasOverlappingRendering().

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