# GradientDrawable.Orientation

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)

# Orientation

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/android/graphics/drawable/GradientDrawable.Orientation "View this page in Java")  

```
class Orientation
```

|---|---|------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)                                                                                      |||
| ↳ | [kotlin.Enum](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-enum/index.html)\<[android.graphics.drawable.GradientDrawable.Orientation](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#)\> ||
|   | ↳ | [android.graphics.drawable.GradientDrawable.Orientation](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#) |

|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Known Direct Subclasses [GradientDrawable.Orientation.BL_TR](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:BL_TR),[GradientDrawable.Orientation.BOTTOM_TOP](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:BOTTOM_TOP),[GradientDrawable.Orientation.BR_TL](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:BR_TL),[GradientDrawable.Orientation.LEFT_RIGHT](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:LEFT_RIGHT),[GradientDrawable.Orientation.RIGHT_LEFT](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:RIGHT_LEFT),[GradientDrawable.Orientation.TL_BR](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:TL_BR),[GradientDrawable.Orientation.TOP_BOTTOM](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:TOP_BOTTOM),[GradientDrawable.Orientation.TR_BL](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:TR_BL) |------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------| | [GradientDrawable.Orientation.BL_TR](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:BL_TR)           | draw the gradient from the bottom-left to the top-right | | [GradientDrawable.Orientation.BOTTOM_TOP](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:BOTTOM_TOP) | draw the gradient from the bottom to the top            | | [GradientDrawable.Orientation.BR_TL](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:BR_TL)           | draw the gradient from the bottom-right to the top-left | | [GradientDrawable.Orientation.LEFT_RIGHT](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:LEFT_RIGHT) | draw the gradient from the left to the right            | | [GradientDrawable.Orientation.RIGHT_LEFT](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:RIGHT_LEFT) | draw the gradient from the right to the left            | | [GradientDrawable.Orientation.TL_BR](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:TL_BR)           | draw the gradient from the top-left to the bottom-right | | [GradientDrawable.Orientation.TOP_BOTTOM](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:TOP_BOTTOM) | draw the gradient from the top to the bottom            | | [GradientDrawable.Orientation.TR_BL](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:TR_BL)           | draw the gradient from the top-right to the bottom-left | |

Controls how the gradient is oriented relative to the drawable's bounds

## Summary

|                                                                                        Enum values                                                                                         ||
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [BL_TR](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:BL_TR) draw the gradient from the bottom-left to the top-right |
| [BOTTOM_TOP](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:BOTTOM_TOP) draw the gradient from the bottom to the top  |
| [BR_TL](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:BR_TL) draw the gradient from the bottom-right to the top-left |
| [LEFT_RIGHT](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:LEFT_RIGHT) draw the gradient from the left to the right  |
| [RIGHT_LEFT](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:RIGHT_LEFT) draw the gradient from the right to the left  |
| [TL_BR](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:TL_BR) draw the gradient from the top-left to the bottom-right |
| [TOP_BOTTOM](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:TOP_BOTTOM) draw the gradient from the top to the bottom  |
| [TR_BL](https://developer.android.com/reference/kotlin/android/graphics/drawable/GradientDrawable.Orientation#ENUM_VALUE:TR_BL) draw the gradient from the top-right to the bottom-left |

## Enum values

### BL_TR

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val BL_TR : GradientDrawable.Orientation
```

draw the gradient from the bottom-left to the top-right  

### BOTTOM_TOP

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val BOTTOM_TOP : GradientDrawable.Orientation
```

draw the gradient from the bottom to the top  

### BR_TL

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val BR_TL : GradientDrawable.Orientation
```

draw the gradient from the bottom-right to the top-left  

### LEFT_RIGHT

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val LEFT_RIGHT : GradientDrawable.Orientation
```

draw the gradient from the left to the right  

### RIGHT_LEFT

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val RIGHT_LEFT : GradientDrawable.Orientation
```

draw the gradient from the right to the left  

### TL_BR

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val TL_BR : GradientDrawable.Orientation
```

draw the gradient from the top-left to the bottom-right  

### TOP_BOTTOM

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val TOP_BOTTOM : GradientDrawable.Orientation
```

draw the gradient from the top to the bottom  

### TR_BL

Added in[API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)  

```
enum val TR_BL : GradientDrawable.Orientation
```

draw the gradient from the top-right to the bottom-left