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
- Solution: error: Error parsing XML: unbound prefix
- android:background - Change the Background Color of an EditText
- android:requiresFadingEdge
- Cursor getColumnIndexOrThrow - Get the Index for a Column Name
- Solution: Running Android Lint has encountered a problem Failed
- android:maxWidth - Set the Maximum Width of TextView
- How to Install an SDK package
- How to Register an Activity that Responds to NFC tags for URI's that point to a URL
- Change the line spacing between lines of text in an TextView/EditText, using lineSpacingExtra
- How to Add a Toast