> Documentation index: https://developer.android.com/reference/llms.txt

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

# LocationButtonRequest

*** ** * ** ***

```
class LocationButtonRequest : Parcelable
```

|---|---|
| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) ||
| ↳ | [android.app.permissionui.LocationButtonRequest](https://developer.android.com/reference/kotlin/android/app/permissionui/LocationButtonRequest.md.txt#) |

Defines the requested visual properties for a location button.

An instance of this class is passed to `LocationButtonProvider.openSession` to configure the button's appearance, such as its text, colors, and corner radius etc. The appearance can be changed after the session has been opened.

## Summary

| Nested classes ||
|---|---|
|   | `Builder` Builder for `LocationButtonRequest`. |

Inherited constants From class `Parcelable` `Int` `CONTENTS_FILE_DESCRIPTOR`


Descriptor bit used with `describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.

<br />

`Int` `PARCELABLE_WRITE_RETURN_VALUE`


Flag for use with `writeToParcel`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`". Some implementations may want to release resources at this point.

<br />

| Public methods ||
|---|---|
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getBackgroundColor()` Returns the background color of the button as a androidx. |
| [Configuration](https://developer.android.com/reference/kotlin/android/content/res/Configuration.md.txt#) | `getConfiguration()` Returns the configuration of the button. |
| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | `getCornerRadius()` Returns the corner radius of the button in pixels. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getHeight()` Returns the height of the button. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getIconTint()` Returns the icon tint color as a androidx. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getPaddingBottom()` Returns the bottom padding of the button. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getPaddingLeft()` Returns the left padding of the button. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getPaddingRight()` Returns the right padding of the button. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getPaddingTop()` Returns the top padding of the button. |
| [Float](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html) | `getPressedCornerRadius()` Returns the corner radius of the button when pressed. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getStrokeColor()` Returns the button outline/border color as a androidx. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getStrokeWidth()` Returns the button outline/border width. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getTextColor()` Returns the color of the button's text as a androidx. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getTextType()` Returns the text type displayed on the button. |
| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | `getWidth()` Returns the width of the button. |
| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | `toString()` Returns a string representation of the object. |
| [Unit](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) | `writeToParcel(dest: Parcel, flags: Int)` Flatten this object in to a Parcel. |

| Properties ||
|---|---|
| static [Parcelable.Creator](https://developer.android.com/reference/kotlin/android/os/Parcelable.Creator.md.txt#)\<[LocationButtonRequest](https://developer.android.com/reference/kotlin/android/app/permissionui/LocationButtonRequest.md.txt#)!\> | `CREATOR` <br /> |

## Public methods

### describeContents

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

```
fun describeContents(): Int
```

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of `writeToParcel(Parcel,int)`, the return value of this method must include the `CONTENTS_FILE_DESCRIPTOR` bit.

| Return ||
|---|---|
| `Int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or - `CONTENTS_FILE_DESCRIPTOR` |

### getBackgroundColor

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

```
fun getBackgroundColor(): Int
```

Returns the background color of the button as a androidx.annotation.ColorInt.

### getConfiguration

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

```
fun getConfiguration(): Configuration
```

Returns the configuration of the button.

| Return ||
|---|---|
| `Configuration` | This value cannot be `null`. |

### getCornerRadius

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

```
fun getCornerRadius(): Float
```

Returns the corner radius of the button in pixels.

### getHeight

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

```
fun getHeight(): Int
```

Returns the height of the button.

### getIconTint

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

```
fun getIconTint(): Int
```

Returns the icon tint color as a androidx.annotation.ColorInt.

### getPaddingBottom

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

```
fun getPaddingBottom(): Int
```

Returns the bottom padding of the button.

### getPaddingLeft

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

```
fun getPaddingLeft(): Int
```

Returns the left padding of the button.

### getPaddingRight

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

```
fun getPaddingRight(): Int
```

Returns the right padding of the button.

### getPaddingTop

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

```
fun getPaddingTop(): Int
```

Returns the top padding of the button.

### getPressedCornerRadius

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

```
fun getPressedCornerRadius(): Float
```

Returns the corner radius of the button when pressed.

### getStrokeColor

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

```
fun getStrokeColor(): Int
```

Returns the button outline/border color as a androidx.annotation.ColorInt.

### getStrokeWidth

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

```
fun getStrokeWidth(): Int
```

Returns the button outline/border width.

### getTextColor

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

```
fun getTextColor(): Int
```

Returns the color of the button's text as a androidx.annotation.ColorInt.

### getTextType

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

```
fun getTextType(): Int
```

Returns the text type displayed on the button.

| Return ||
|---|---|
| `Int` | Value is one of the following: - `android.app.permissionui.LocationButtonSession#TEXT_TYPE_NONE` - `android.app.permissionui.LocationButtonSession#TEXT_TYPE_PRECISE_LOCATION` - `android.app.permissionui.LocationButtonSession#TEXT_TYPE_USE_PRECISE_LOCATION` - `android.app.permissionui.LocationButtonSession#TEXT_TYPE_SHARE_PRECISE_LOCATION` - `android.app.permissionui.LocationButtonSession#TEXT_TYPE_NEAR_MY_PRECISE_LOCATION` - `android.app.permissionui.LocationButtonSession#TEXT_TYPE_NEAR_YOUR_PRECISE_LOCATION` |

### getWidth

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

```
fun getWidth(): Int
```

Returns the width of the button.

### toString

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

```
fun toString(): String
```

Returns a string representation of the object.

| Return ||
|---|---|
| `String` | a string representation of the object. |

### writeToParcel

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

```
fun writeToParcel(
    dest: Parcel, 
    flags: Int
): Unit
```

Flatten this object in to a Parcel.

| Parameters ||
|---|---|
| `dest` | [Parcel](https://developer.android.com/reference/kotlin/android/os/Parcel.md.txt#): This value cannot be `null`. |
| `flags` | [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html): Additional flags about how the object should be written. May be 0 or `PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of the following: - `PARCELABLE_WRITE_RETURN_VALUE` |

## Properties

### CREATOR

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

```
static val CREATOR: Parcelable.Creator<LocationButtonRequest!>
```