added in API Level 17
Defines the alignment of the text. A heuristic is used to determine the resolved text alignment.
Ensure to change the minSDKVersion to 17, or greater.
android:textAlignment = "textStart"
inherit - Default
gravity - Default for root view. The gravity determines the alignment, ALIGN_NORMAL, ALIGN_CENTER, or ALIGN_OPPOSITE, which are relative to each paragraph's text direction.
textStart - Align to the start of the paragraph, e.g. ALIGN_NORMAL.
textEnd - Align to the end of the paragraph, e.g. ALIGN_OPPOSITE.
center - Center the paragraph, e.g. ALIGN_CENTER.
viewStart - Align to the start of the view, which is ALIGN_LEFT if the view's resolved layoutDirection is LTR, and ALIGN_RIGHT otherwise.
viewEnd - Align to the end of the view, which is ALIGN_RIGHT if the view's resolved layoutDirection is LTR, and ALIGN_LEFT otherwise.
Related Articles:
Resources:
Popular Posts
- android:ellipsize - Add an ellipsis(...) in a TextView
- Save LogCat to a Text File
- Solution: error: Error parsing XML: unbound prefix
- Perform an Action after Enter keypress on EditText
- android:nextFocusRight - Set the Next Focus Right to a TextView/EditText
- Cursor getColumnIndex - Get the Index for a Column Name
- Intent setType(String type) - How to Set an Explicit MIME data type
- android:textColorHint - Set the Color of Hint Text in TextView/EditText
- android:nextFocusDown - Set Next Focus to a TextView/EditText
- Determine the Hex value for a color