Stay organized with collections
Save and categorize content based on your preferences.
Align
class Align
Align specifies how drawText aligns its text relative to the [x,y] coordinates. The default is LEFT.
Summary
Enum values |
The text is drawn centered horizontally on the x,y origin
|
The text is drawn to the right of the x,y origin
|
The text is drawn to the left of the x,y origin
|
Enum values
CENTER
enum val CENTER : Paint.Align
The text is drawn centered horizontally on the x,y origin
LEFT
enum val LEFT : Paint.Align
The text is drawn to the right of the x,y origin
RIGHT
enum val RIGHT : Paint.Align
The text is drawn to the left of the x,y origin
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Paint.Align\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nAlign\n=====\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/graphics/Paint.Align \"View this page in Java\") \n\n```\nclass Align\n```\n\n|---|---|-----------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||\n| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\\\u003c[android.graphics.Paint.Align](#)\\\u003e ||\n| | ↳ | [android.graphics.Paint.Align](#) |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [Paint.Align.CENTER](#ENUM_VALUE:CENTER), [Paint.Align.LEFT](#ENUM_VALUE:LEFT), [Paint.Align.RIGHT](#ENUM_VALUE:RIGHT) |------------------------------------------|-----------------------------------------------------------| | [Paint.Align.CENTER](#ENUM_VALUE:CENTER) | The text is drawn centered horizontally on the x,y origin | | [Paint.Align.LEFT](#ENUM_VALUE:LEFT) | The text is drawn to the right of the x,y origin | | [Paint.Align.RIGHT](#ENUM_VALUE:RIGHT) | The text is drawn to the left of the x,y origin | |\n\nAlign specifies how drawText aligns its text relative to the \\[x,y\\] coordinates. The default is LEFT.\n\nSummary\n-------\n\n| Enum values ||\n|----------------------------------------------------------------------------------------|---|\n| [CENTER](#ENUM_VALUE:CENTER) The text is drawn centered horizontally on the x,y origin |\n| [LEFT](#ENUM_VALUE:LEFT) The text is drawn to the right of the x,y origin |\n| [RIGHT](#ENUM_VALUE:RIGHT) The text is drawn to the left of the x,y origin |\n\nEnum values\n-----------\n\n### CENTER\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val CENTER : Paint.Align\n```\n\nThe text is drawn centered horizontally on the x,y origin \n\n### LEFT\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val LEFT : Paint.Align\n```\n\nThe text is drawn to the right of the x,y origin \n\n### RIGHT\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nenum val RIGHT : Paint.Align\n```\n\nThe text is drawn to the left of the x,y origin"]]