TextView - (Android Essentials: XML & Java)

  1. android:text: Sets the text to be displayed in the TextView.

  2. android:textSize: Sets the size of the text.

  3. android:textColor: Sets the color of the text.

  4. android:background: Sets the background color or drawable for the TextView.

  5. android:gravity: Sets the alignment of the text within the TextView.

  6. android:padding: Sets the padding around the text inside the TextView.

  7. android:fontFamily: Sets the font family for the text.

  8. android:textStyle: Sets the style of the text (e.g., bold, italic, normal).

  9. android:lines: Sets the maximum number of lines to be displayed.

  10. android:maxLines: Sets the maximum number of lines to be displayed.

  11. android:ellipsize: Sets how the text should be ellipsized if it exceeds the specified number of lines.

  12. android:maxLength: Sets the maximum length of the text.

  13. android:autoLink: Sets whether the TextView should automatically link web URLs, email addresses, etc.

  14. android:inputType: Sets the type of data that can be entered into the TextView.

  15. android:clickable: Sets whether the TextView is clickable.

  16. android:enabled: Sets whether the TextView is enabled.

<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="Hello, World!"
    android:textSize="18sp"
    android:textColor="#000000"
    android:background="#FFFFFF"
    android:gravity="center"
    android:padding="16dp"
    android:fontFamily="sans-serif"
    android:textStyle="bold"
    android:lines="2"
    android:maxLines="2"
    android:ellipsize="end"
    android:maxLength="20"
    android:autoLink="web"
    android:inputType="text"
    android:clickable="true"
    android:enabled="true" />