Skip to content

[Feature Request] Exit the app by triggering the Back onceΒ #462

@drakeet

Description

@drakeet

As a user, I used to exit the app through the Back gesture, but when I entered a deep folder directory, I need to repeatedly trigger a Back(onBackPressed()) event to return to the root folder, then I can exit the app. This is very inefficient and troublesome for me.

So I would love to have at least one preference item that allows the user to choose "one-click to exit the application via Back". I think this will not hurt the original experience, because we already have an explicit trail path view at the top (the bar shows A > B > C).

If possible, I would also like the FileListActivity to accept an intent parameter/extra (boolean) to temporarily configure this, because one of our apps will use MaterialFiles to open a deep folder, and once the user goes to this FileListActivity, he will need to click back multiple times to get back to our original Activity.

This is how we use MaterialFiles to open a deep folder:

val openInFilesIntent = Intent(Intent.ACTION_VIEW)
openInFilesIntent.type = "vnd.android.document/directory"
openInFilesIntent.component = ComponentName("me.zhanghai.android.files", "me.zhanghai.android.files.filelist.FileListActivity")
openInFilesIntent.putExtra("org.openintents.extra.ABSOLUTE_PATH", <path>)
// need a boolean extra to set one-click to exit
// ...
startActivity(openInFilesIntent)

Thanks!

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions