LocationButtonRequest


public final class LocationButtonRequest
extends Object implements Parcelable

java.lang.Object
   ↳ 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

class LocationButtonRequest.Builder

Builder for LocationButtonRequest

Inherited constants

Fields

public static final Creator<LocationButtonRequest> CREATOR

Public methods

int describeContents()

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

int getBackgroundColor()

Returns the background color of the button as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).

Configuration getConfiguration()

Returns the configuration of the button.

float getCornerRadius()

Returns the corner radius of the button in pixels.

int getHeight()

Returns the height of the button.

int getIconTint()

Returns the icon tint color as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).

int getPaddingBottom()

Returns the bottom padding of the button.

int getPaddingLeft()

Returns the left padding of the button.

int getPaddingRight()

Returns the right padding of the button.

int getPaddingTop()

Returns the top padding of the button.

float getPressedCornerRadius()

Returns the corner radius of the button when pressed.

int getStrokeColor()

Returns the button outline/border color as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).

int getStrokeWidth()

Returns the button outline/border width.

int getTextColor()

Returns the color of the button's text as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).

int getTextType()

Returns the text type displayed on the button.

int getWidth()

Returns the width of the button.

String toString()

Returns a string representation of the object.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Fields

CREATOR

Added in API level 37
public static final Creator<LocationButtonRequest> CREATOR

Public methods

describeContents

Added in API level 37
public int describeContents ()

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.

Returns
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
public int getBackgroundColor ()

Returns the background color of the button as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).

Returns
int

getConfiguration

Added in API level 37
public Configuration getConfiguration ()

Returns the configuration of the button.

Returns
Configuration This value cannot be null.

getCornerRadius

Added in API level 37
public float getCornerRadius ()

Returns the corner radius of the button in pixels.

Returns
float

getHeight

Added in API level 37
public int getHeight ()

Returns the height of the button.

Returns
int

getIconTint

Added in API level 37
public int getIconTint ()

Returns the icon tint color as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).

Returns
int

getPaddingBottom

Added in API level 37
public int getPaddingBottom ()

Returns the bottom padding of the button.

Returns
int

getPaddingLeft

Added in API level 37
public int getPaddingLeft ()

Returns the left padding of the button.

Returns
int

getPaddingRight

Added in API level 37
public int getPaddingRight ()

Returns the right padding of the button.

Returns
int

getPaddingTop

Added in API level 37
public int getPaddingTop ()

Returns the top padding of the button.

Returns
int

getPressedCornerRadius

Added in API level 37
public float getPressedCornerRadius ()

Returns the corner radius of the button when pressed.

Returns
float

getStrokeColor

Added in API level 37
public int getStrokeColor ()

Returns the button outline/border color as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).

Returns
int

getStrokeWidth

Added in API level 37
public int getStrokeWidth ()

Returns the button outline/border width.

Returns
int

getTextColor

Added in API level 37
public int getTextColor ()

Returns the color of the button's text as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).

Returns
int

getWidth

Added in API level 37
public int getWidth ()

Returns the width of the button.

Returns
int

toString

Added in API level 37
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

writeToParcel

Added in API level 37
public void writeToParcel (Parcel dest, 
                int flags)

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.PARCELABLE_WRITE_RETURN_VALUE.
Value is either 0 or a combination of the following: