REST API

Enable Dark Mode in the Default User Interface

When the payment device is set to dark mode, the Default UI payment screens automatically adjust to display darker, high-contrast colors compared to the default light mode settings. This feature is particularly useful in low-light environments such as restaurants and bars.
By default, the dark mode background color is dark gray (
#121212
). To customize the background to pure black (
#000000
), define a new
Theme.PayButton2
theme in the
values-night
resource folder.
For more information about the dark mode setting on Android devices, see the Android documentation.
Follow this step to change dark mode behavior:
  1. Use this Android method to enforce light or dark mode across your entire application and the Default UI, regardless of the system setting on the device. This example enforces night mode.
    AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)