Skip to content

Notification: content collapsed by default — user must tap chevron to see full view #12

Description

@pgarr

Problem

The training notification uses DecoratedCustomViewStyle with a customContentView that contains the body text and action buttons. On Android the notification shade renders this in a collapsed state by default, which clips the lower part of the layout (the button row). The user has to tap the expand chevron (▾) once to see the buttons.

After expanding, pressing a button does NOT re-collapse the notification (the NotificationManager.notify() update preserves the expanded state), so this is a one-time annoyance — but it should be zero taps.

Expected behaviour

The notification should show the score/arrow buttons immediately, with no expansion required.

Possible approaches

  1. Use setCustomBigContentView as the primary view and force-expand via importance — set channel importance to IMPORTANCE_HIGH for a single initial display then downgrade, which triggers a heads-up notification that stays expanded. Fragile and intrusive.
  2. Fit everything into a single-line customContentView — redesign the layout to put body text and buttons side-by-side in one row (≤ 48 dp), so nothing is clipped in the collapsed state.
  3. Use a separate, minimal customContentView (body only) and put buttons in customBigContentView — accept that buttons are in expanded view but ensure expanding is triggered automatically on first display (no known API for this).
  4. Option 2 is likely the cleanest fix — a horizontal layout: [status text ............] [Btn1] [Btn2] [Btn3] that fits within the collapsed content area height limit.

Context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions