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:textColorHighlight - Set the Color of Highlighted Text in an EditText
- android:ellipsize - Add an ellipsis(...) in a TextView
- Perform an Action after Enter keypress on EditText
- How to Register an Activity that Responds to NFC tags for URI's that point to a URL
- android:alpha - Set the Opacity/Transparency of Text in TextView/EditText
- Save LogCat to a Text File
- How to Import a Library
- String.valueOf - How to Convert a Double to a String
- android:drawablePadding - Add Padding to a Drawable in a TextView, in XML
- How to Set Permission for I/O Operations over NFC