setEms

setEms was added in API Level 1
Related XML Attributes: android:ems

Makes the TextView exactly this many ems wide

1. Find a TextView using ID

2.Add the code below to the onCreate method.

    myTextView.setems(100);

3. Compile and run!

Related Articles: