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 |
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 |
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 |
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 |
int
|
getStrokeWidth()
Returns the button outline/border width. |
int
|
getTextColor()
Returns the color of the button's text as a |
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
Public methods
describeContents
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
public int getBackgroundColor ()
Returns the background color of the button as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).
| Returns | |
|---|---|
int |
|
getConfiguration
public Configuration getConfiguration ()
Returns the configuration of the button.
| Returns | |
|---|---|
Configuration |
This value cannot be null. |
getCornerRadius
public float getCornerRadius ()
Returns the corner radius of the button in pixels.
| Returns | |
|---|---|
float |
|
getHeight
public int getHeight ()
Returns the height of the button.
| Returns | |
|---|---|
int |
|
getIconTint
public int getIconTint ()
Returns the icon tint color as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).
| Returns | |
|---|---|
int |
|
getPaddingBottom
public int getPaddingBottom ()
Returns the bottom padding of the button.
| Returns | |
|---|---|
int |
|
getPaddingLeft
public int getPaddingLeft ()
Returns the left padding of the button.
| Returns | |
|---|---|
int |
|
getPaddingRight
public int getPaddingRight ()
Returns the right padding of the button.
| Returns | |
|---|---|
int |
|
getPaddingTop
public int getPaddingTop ()
Returns the top padding of the button.
| Returns | |
|---|---|
int |
|
getPressedCornerRadius
public float getPressedCornerRadius ()
Returns the corner radius of the button when pressed.
| Returns | |
|---|---|
float |
|
getStrokeColor
public int getStrokeColor ()
Returns the button outline/border color as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).
| Returns | |
|---|---|
int |
|
getStrokeWidth
public int getStrokeWidth ()
Returns the button outline/border width.
| Returns | |
|---|---|
int |
|
getTextColor
public int getTextColor ()
Returns the color of the button's text as a ERROR(ColorInt/android.annotation.ColorInt ColorInt).
| Returns | |
|---|---|
int |
|
getTextType
public int getTextType ()
Returns the text type displayed on the button.
toString
public String toString ()
Returns a string representation of the object.
| Returns | |
|---|---|
String |
a string representation of the object. |
writeToParcel
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:
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2026-03-26 UTC.