Megosztás a következőn keresztül:


TextView.SetWidth(Int32) Method

Definition

Sets the width of the TextView to be exactly pixels wide.

[Android.Runtime.Register("setWidth", "(I)V", "GetSetWidth_IHandler")]
public virtual void SetWidth (int pixels);
[<Android.Runtime.Register("setWidth", "(I)V", "GetSetWidth_IHandler")>]
abstract member SetWidth : int -> unit
override this.SetWidth : int -> unit

Parameters

pixels
Int32

the exact width of the TextView in terms of pixels

Attributes

Remarks

Sets the width of the TextView to be exactly pixels 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/maximum width configurations such as #setMinWidth(int) or #setMaxWidth(int).

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

See also