Added in API level 37

LocationButtonRequest


class LocationButtonRequest : Parcelable
kotlin.Any
   ↳ android.app.permissionui.LocationButtonRequest

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 for LocationButtonRequest.

Inherited constants
Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Int

Returns the background color of the button as a ColorInt.

Configuration

Returns the configuration of the button.

Float

Returns the corner radius of the button in pixels.

Int

Returns the height of the button.

Int

Returns the icon tint color as a ColorInt.

Int

Returns the bottom padding of the button.

Int

Returns the left padding of the button.

Int

Returns the right padding of the button.

Int

Returns the top padding of the button.

Float

Returns the corner radius of the button when pressed.

Int

Returns the button outline/border color as a ColorInt.

Int

Returns the button outline/border width.

Int

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

Int

Returns the text type displayed on the button.

Int

Returns the width of the button.

String

Returns a string representation of the object.

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<LocationButtonRequest!>

Public methods

describeContents

Added in API level 37
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

getBackgroundColor

Added in API level 37
fun getBackgroundColor(): Int

Returns the background color of the button as a ColorInt.

getConfiguration

Added in API level 37
fun getConfiguration(): Configuration

Returns the configuration of the button.

Return
Configuration This value cannot be null.

getCornerRadius

Added in API level 37
fun getCornerRadius(): Float

Returns the corner radius of the button in pixels.

getHeight

Added in API level 37
fun getHeight(): Int

Returns the height of the button.

getIconTint

Added in API level 37
fun getIconTint(): Int

Returns the icon tint color as a ColorInt.

getPaddingBottom

Added in API level 37
fun getPaddingBottom(): Int

Returns the bottom padding of the button.

getPaddingLeft

Added in API level 37
fun getPaddingLeft(): Int

Returns the left padding of the button.

getPaddingRight

Added in API level 37
fun getPaddingRight(): Int

Returns the right padding of the button.

getPaddingTop

Added in API level 37
fun getPaddingTop(): Int

Returns the top padding of the button.

getPressedCornerRadius

Added in API level 37
fun getPressedCornerRadius(): Float

Returns the corner radius of the button when pressed.

getStrokeColor

Added in API level 37
fun getStrokeColor(): Int

Returns the button outline/border color as a ColorInt.

getStrokeWidth

Added in API level 37
fun getStrokeWidth(): Int

Returns the button outline/border width.

getTextColor

Added in API level 37
fun getTextColor(): Int

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

getWidth

Added in API level 37
fun getWidth(): Int

Returns the width of the button.

toString

Added in API level 37
fun toString(): String

Returns a string representation of the object.

Return
String a string representation of the object.

writeToParcel

Added in API level 37
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: 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:

Properties

CREATOR

Added in API level 37
static val CREATOR: Parcelable.Creator<LocationButtonRequest!>