Stay organized with collections
Save and categorize content based on your preferences.
LayoutDirection
class LayoutDirection
A class for defining layout directions. A layout direction can be left-to-right (LTR) or right-to-left (RTL). It can also be inherited (from a parent) or deduced from the default language script of a locale.
Summary
Constants |
static Int |
Horizontal layout direction is inherited.
|
static Int |
Horizontal layout direction is deduced from the default language script for the locale.
|
static Int |
Horizontal layout direction is from Left to Right.
|
static Int |
Horizontal layout direction is from Right to Left.
|
Constants
INHERIT
static val INHERIT: Int
Horizontal layout direction is inherited.
Value: 2
LOCALE
static val LOCALE: Int
Horizontal layout direction is deduced from the default language script for the locale.
Value: 3
LTR
static val LTR: Int
Horizontal layout direction is from Left to Right.
Value: 0
RTL
static val RTL: Int
Horizontal layout direction is from Right to Left.
Value: 1
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,["# LayoutDirection\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nLayoutDirection\n===============\n\n*** ** * ** ***\n\nKotlin \\|[Java](/reference/android/util/LayoutDirection \"View this page in Java\") \n\n```\nclass LayoutDirection\n```\n\n|---|-----------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||\n| ↳ | [android.util.LayoutDirection](#) |\n\nA class for defining layout directions. A layout direction can be left-to-right (LTR) or right-to-left (RTL). It can also be inherited (from a parent) or deduced from the default language script of a locale.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [INHERIT](#INHERIT:kotlin.Int) Horizontal layout direction is inherited. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [LOCALE](#LOCALE:kotlin.Int) Horizontal layout direction is deduced from the default language script for the locale. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [LTR](#LTR:kotlin.Int) Horizontal layout direction is from Left to Right. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [RTL](#RTL:kotlin.Int) Horizontal layout direction is from Right to Left. |\n\nConstants\n---------\n\n### INHERIT\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val INHERIT: Int\n```\n\nHorizontal layout direction is inherited. \n\n Value: 2\n\n### LOCALE\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val LOCALE: Int\n```\n\nHorizontal layout direction is deduced from the default language script for the locale. \n\n Value: 3\n\n### LTR\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val LTR: Int\n```\n\nHorizontal layout direction is from Left to Right. \n\n Value: 0\n\n### RTL\n\nAdded in [API level 19](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val RTL: Int\n```\n\nHorizontal layout direction is from Right to Left. \n\n Value: 1"]]