johannesjo/super-productivity-android

Back button behaviour inconsistent with Android UX

Closed this issue ยท 3 comments

๐Ÿ‘ป Brief Description

When navigating through the app, especially between top-level navigation points such as those found under the hamburger menu (Today, Scheduled, Project Foo etc...), I would expect interaction with the back button to navigate to the previous screen.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Open App
  2. See Today screen
  3. Tap icon for navigation menu
  4. Navigate to another screen, Scheduled for example
  5. Tap device's back button
  6. App closes

๐Ÿš“ Expected behavior

  1. Open App
  2. See Today screen
  3. Tap icon for navigation menu
  4. Navigate to another screen, Scheduled for example
  5. Tap device's back button
  6. Navigate back to Today screen

Suggestions

You can capture the back button event before it is delegated to the system by overriding onBackPressed() in an Activity.
In the case of this app, I think you could override in FullscreenActivity following the tips here: https://developer.android.com/guide/navigation/navigation-custom-back#implement_custom_back_navigation

โž• Additional context

Some context around the back behaviour: https://developer.android.com/guide/components/activities/tasks-and-back-stack

I've also experienced this. I find it particularly frustrating since the app takes about a minute to load, so accidentally hitting the back button by force of habit causes quite an interruption.

zoli commented

I would like to take on this.

@zoli there is an open but abandoned PR for this:
#7