Sdílet prostřednictvím


TextView.SetMaxWidth(Int32) Method

Definition

Sets the width of the TextView to be at most maxPixels wide.

[Android.Runtime.Register("setMaxWidth", "(I)V", "GetSetMaxWidth_IHandler")]
public virtual void SetMaxWidth (int maxPixels);
[<Android.Runtime.Register("setMaxWidth", "(I)V", "GetSetMaxWidth_IHandler")>]
abstract member SetMaxWidth : int -> unit
override this.SetMaxWidth : int -> unit

Parameters

maxPixels
Int32

the maximum width of TextView in terms of pixels

Attributes

Remarks

Sets the width of the TextView to be at most maxPixels wide.

This value is used for width calculation if LayoutParams does not force TextView to have an exact width. Setting this value overrides previous maximum width configurations such as #setMaxEms(int) or #setEms(int).

Java documentation for android.widget.TextView.setMaxWidth(int).

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