TextView.SetWidth(Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.