[android-components](../../index.md) / [mozilla.components.concept.menu](../index.md) / [Orientation](index.md) / [fromGravity](./from-gravity.md)

# fromGravity

`fun fromGravity(gravity: `[`Int`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html)`): `[`Orientation`](index.md) [(source)](https://github.com/mozilla-mobile/android-components/blob/master/components/concept/menu/src/main/java/mozilla/components/concept/menu/Orientation.kt#L28)

Returns an orientation that matches the given [Gravity](#) value.
Meant to be used with a CoordinatorLayout's gravity.

