Udostępnij za pośrednictwem


TextView.SetMinWidth(Int32) Method

Definition

Sets the width of the TextView to be at least minPixels wide.

[Android.Runtime.Register("setMinWidth", "(I)V", "GetSetMinWidth_IHandler")]
public virtual void SetMinWidth (int minPixels);
[<Android.Runtime.Register("setMinWidth", "(I)V", "GetSetMinWidth_IHandler")>]
abstract member SetMinWidth : int -> unit
override this.SetMinWidth : int -> unit

Parameters

minPixels
Int32

the minimum width of TextView in terms of pixels

Attributes

Remarks

Sets the width of the TextView to be at least minPixels wide.

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

The value given here is different than #setMinimumWidth(int). Between minWidth and the value set in #setMinimumWidth(int), the greater one is used to decide the final width.

Java documentation for android.widget.TextView.setMinWidth(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