Partager via


TextView.SetTextSize(ComplexUnitType, Single) Method

Definition

Set the default text size to a given unit and value.

[Android.Runtime.Register("setTextSize", "(IF)V", "GetSetTextSize_IFHandler")]
public virtual void SetTextSize (Android.Util.ComplexUnitType unit, float size);
[<Android.Runtime.Register("setTextSize", "(IF)V", "GetSetTextSize_IFHandler")>]
abstract member SetTextSize : Android.Util.ComplexUnitType * single -> unit
override this.SetTextSize : Android.Util.ComplexUnitType * single -> unit

Parameters

unit
ComplexUnitType

The desired dimension unit.

size
Single

The desired size in the given units.

Attributes

Remarks

Set the default text size to a given unit and value. See TypedValue for the possible dimension units.

Note: if this TextView has the auto-size feature enabled, then this function is no-op.

Java documentation for android.widget.TextView.setTextSize(int, float).

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