The Floating Button trigger displays an interactive button on the screen that can be pressed to activate a macro. The button's visibility is controlled by enabling or disabling the macro or trigger. Dragging the button over the bin icon will result in the macro or trigger being disabled (as configured).

Options

  • Identifier: A unique ID for referencing the button in actions, enabling control across multiple macros. This is displayed in brackets after the trigger name.
  • Icon Type:
    • Use Icon: Select an icon from apps, user images, MacroDroid icons, or Material Design library
    • Use Text: Display text characters on the button (up to 8 characters), with customizable text color. Supports magic text.
  • Background Color: Select a custom background color for the button, or use transparent background
  • Icon Padding: Adjust the padding around the icon within the button (shown as percentage)
  • Opacity: Set the transparency level of the button (0-100%)
  • Size: Choose between normal or mini (small) size variants
  • Show on Lock Screen: When enabled, the button will be visible on the lock screen (not available on Android 8.0 and above)
  • Prevent Removal by Dragging to Bin: When enabled, the button cannot be removed by dragging it to the trash icon
  • Disable Macro/Trigger on Remove: When the button is dragged to the trash icon, choose whether to disable the entire macro or just the trigger
  • Vibrate on Press: Enable haptic feedback when the button is pressed
  • Force Location When Enabled: Specify exact X and Y coordinates for the button position when the macro is enabled
    • Coordinates can be specified in pixels or as a percentage of screen size
    • Supports magic text and variables for dynamic positioning
  • Fixed Location: Prevents the button from being dragged to a new position

Examples

Example 1: Quick Screenshot Button

Triggers

Floating Button (screenshot_btn)
Actions

Take Screenshot

This creates a floating button that takes a screenshot when pressed. The identifier "screenshot_btn" allows other macros to control this button.

Example 2: Toggle Flashlight

Triggers

Floating Button (flashlight)
Actions

Torch Toggle

A floating button that toggles the device's flashlight/torch on and off.

Notes

  • This trigger requires the "Draw over other apps" (overlay) permission.
  • The button remembers its last position when hidden, unless "Force Location When Enabled" is configured.
  • Multiple floating buttons can exist simultaneously if they have different identifiers.
  • Use the Floating Button Configure action to dynamically modify button appearance and position.
  • Icons can be selected from app icons, user-uploaded images, MacroDroid's built-in icons, or Material Design icons.
  • Text icons support magic text, allowing dynamic text based on variables or system values.

See Also