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 |
|
| 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 |
| 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 |
| 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 |
| Int |
Returns the button outline/border width. |
| Int |
Returns the color of the button's text as a |
| Int |
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. |
| Unit |
writeToParcel(dest: Parcel, flags: Int)Flatten this object in to a Parcel. |
| Properties | |
|---|---|
| static Parcelable.Creator<LocationButtonRequest!> | |
Public methods
describeContents
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
fun getBackgroundColor(): Int
Returns the background color of the button as a ColorInt.
getConfiguration
fun getConfiguration(): Configuration
Returns the configuration of the button.
| Return | |
|---|---|
Configuration |
This value cannot be null. |
getCornerRadius
fun getCornerRadius(): Float
Returns the corner radius of the button in pixels.
getPaddingBottom
fun getPaddingBottom(): Int
Returns the bottom padding of the button.
getPaddingLeft
fun getPaddingLeft(): Int
Returns the left padding of the button.
getPaddingRight
fun getPaddingRight(): Int
Returns the right padding of the button.
getPressedCornerRadius
fun getPressedCornerRadius(): Float
Returns the corner radius of the button when pressed.
getStrokeColor
fun getStrokeColor(): Int
Returns the button outline/border color as a ColorInt.
getStrokeWidth
fun getStrokeWidth(): Int
Returns the button outline/border width.
getTextColor
fun getTextColor(): Int
Returns the color of the button's text as a ColorInt.
getTextType
fun getTextType(): Int
Returns the text type displayed on the button.
toString
fun toString(): String
Returns a string representation of the object.
| Return | |
|---|---|
String |
a string representation of the object. |
writeToParcel
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:
|