android:maxHeight - Set Maximum Height of TextView

How to Set the Maximum Height of TextView

add in API Level 1

Makes the TextView be at most this many pixels tall.

1. Create an Android project, if you don't already have one.

2. Add a TextView in the main.xml file.

3. In the main.xml file, add the code below.

<TextView
        ...
android:maxHeight = "20sp"
/>

4. Compile and run!

Resources:
http://developer.android.com/reference/android/widget/TextView.html#attr_android:maxHeight
http://developer.android.com/reference/android/R.attr.html#maxHeight