TextAlignment Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Defines text-alignment modes and a legacy resolved-alignment bit pattern.
public enum TextAlignment
type TextAlignment =
- Inheritance
-
TextAlignment
Fields
| Name | Value | Description |
|---|---|---|
| Inherit | 0 | Default text alignment. The text alignment of this View is inherited from its parent. |
| Gravity | 1 | Default for the root view. |
| TextStart | 2 | Align to the start of the paragraph, e.g. |
| TextEnd | 3 | Align to the end of the paragraph, e.g. |
| Center | 4 | Center the paragraph, e.g. |
| ViewStart | 5 | Align to the start of the view, which is ALIGN_LEFT if the view's resolved layoutDirection is LTR, and ALIGN_RIGHT otherwise. |
| ViewEnd | 6 | Align to the end of the view, which is ALIGN_RIGHT if the view's resolved layoutDirection is LTR, and ALIGN_LEFT otherwise. |
| ResolvedDefault | 131072 | A legacy bit pattern for text alignment resolved to gravity. Do not use this value with TextAlignment. |
Remarks
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.