[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/android/hardware/input/ButtonCustomizationTrigger [Back]  [Original]

ButtonCustomizationTrigger  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.

ButtonCustomizationTrigger


public final class ButtonCustomizationTrigger
extends CustomizationTrigger

java.lang.Object
   ↳ android.hardware.input.CustomizationTrigger
     ↳ android.hardware.input.ButtonCustomizationTrigger


Represents a trigger based on a physical button press on a peripheral (e.g., a mouse).

Summary

Constants

int CUSTOMIZABLE_BUTTON_BACK

Customizable Button code: Back button.

int CUSTOMIZABLE_BUTTON_EXTRA

Customizable Button code: Extra button.

int CUSTOMIZABLE_BUTTON_FORWARD

Customizable Button code: Forward button.

int CUSTOMIZABLE_BUTTON_SIDE

Customizable Button code: Side button.

int CUSTOMIZABLE_BUTTON_TASK

Customizable Button code: Task button.

int CUSTOMIZABLE_BUTTON_TERTIARY

Customizable Button code: Tertiary/Middle button.

Public constructors

ButtonCustomizationTrigger(int buttonCode)

Creates a Trigger for a specific button code.

Public methods

int getButtonCode()

Returns the button code associated with this trigger.

String toString()

Returns a string representation of the object.

Inherited methods

Constants

CUSTOMIZABLE_BUTTON_BACK

Added in version 37.1
public static final int CUSTOMIZABLE_BUTTON_BACK

Customizable Button code: Back button.

Constant Value: 8 (0x00000008)

CUSTOMIZABLE_BUTTON_EXTRA

Added in version 37.1
public static final int CUSTOMIZABLE_BUTTON_EXTRA

Customizable Button code: Extra button.

Constant Value: 128 (0x00000080)

CUSTOMIZABLE_BUTTON_FORWARD

Added in version 37.1
public static final int CUSTOMIZABLE_BUTTON_FORWARD

Customizable Button code: Forward button.

Constant Value: 16 (0x00000010)

CUSTOMIZABLE_BUTTON_SIDE

Added in version 37.1
public static final int CUSTOMIZABLE_BUTTON_SIDE

Customizable Button code: Side button.

Constant Value: 256 (0x00000100)

CUSTOMIZABLE_BUTTON_TASK

Added in version 37.1
public static final int CUSTOMIZABLE_BUTTON_TASK

Customizable Button code: Task button.

Constant Value: 512 (0x00000200)

CUSTOMIZABLE_BUTTON_TERTIARY

Added in version 37.1
public static final int CUSTOMIZABLE_BUTTON_TERTIARY

Customizable Button code: Tertiary/Middle button.

Constant Value: 4 (0x00000004)

Public constructors

ButtonCustomizationTrigger

Added in version 37.1
public ButtonCustomizationTrigger (int buttonCode)

Creates a Trigger for a specific button code.

Parameters
buttonCode int: The button code for the trigger.
Value is one of the following:

Public methods

getButtonCode

Added in version 37.1
public int getButtonCode ()

Returns the button code associated with this trigger.

Returns
int Value is one of the following:

toString

Added in version 37.1
public String toString ()

Returns a string representation of the object.

Returns
String a string representation of the object.

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-08-03 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page