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
- 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.
- 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.
- 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).
- 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
Problem
The training notification uses
DecoratedCustomViewStylewith acustomContentViewthat 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
setCustomBigContentViewas the primary view and force-expand via importance — set channel importance toIMPORTANCE_HIGHfor a single initial display then downgrade, which triggers a heads-up notification that stays expanded. Fragile and intrusive.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.customContentView(body only) and put buttons incustomBigContentView— accept that buttons are in expanded view but ensure expanding is triggered automatically on first display (no known API for this).[status text ............] [Btn1] [Btn2] [Btn3]that fits within the collapsed content area height limit.Context
android/app/src/main/res/layout/notification_training.xmlTrainingForegroundService.kt→buildNotification()