开发者

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.

(becau开发者_如何学JAVAse 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!


You can override onBackPressed in your activity and do whatever you need there to go to a previous directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜