简体   繁体   中英

How to create an Android file list with working back-button?

I've used this file list for my new Android app: http://android-er.blogspot.com/2010/01/implement-simple-file-explorer-in.html

But the problem is that after I've browsed through the folders and then pressing the back-button of my phone, the app is closing instead of going to the previous folder.

(because it's still on the same activity, only some variables are changed)

Is there a possibility to fix this file browser that I can use the back-button without creating multiple activities?

Thank you!

您可以在活动中覆盖onBackPressed ,并在那里进行所需的任何操作以转到上一个目录。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM