Język

MeasuredText.Builder.SetComputeLayout(Boolean) Method

Definition

By passing true to this method, the build method will compute all full layout information.

[Android.Runtime.Register("setComputeLayout", "(Z)Landroid/graphics/text/MeasuredText$Builder;", "", ApiSince=29)]
public Android.Graphics.Text.MeasuredText.Builder SetComputeLayout(bool computeLayout);
[<Android.Runtime.Register("setComputeLayout", "(Z)Landroid/graphics/text/MeasuredText$Builder;", "", ApiSince=29)>]
member this.SetComputeLayout : bool -> Android.Graphics.Text.MeasuredText.Builder

Parameters

computeLayout
Boolean

true if you want to retrieve full layout info, e.g. bbox.

Returns

This builder instance.

Attributes

Remarks

By passing true to this method, the build method will compute all full layout information. If you don't use MeasuredText.getBounds(int,int,android.graphics.Rect), you can pass false to this method and save the memory spaces. The default value is true. Even if you pass false to this method, you can still call getBounds but it becomes slower.

A measured-text instance built with layout computation disabled cannot be used to construct another MeasuredText.Builder. See the constructor check in the Android 16 implementation.

Android reference for android.graphics.text.MeasuredText.Builder.setComputeLayout.

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