What is the way to navigate in Android app
I'm developing a Twitter client for Android and I would like to know which is the better way to build my app.
I want to have a listview that, when clicked, calls another listview to see details and so开发者_如何学JAVA on but I would also like to be able to go back in my previous list.What is the best way to do this in Android? At every click, I create a new intent associated with an activity and I do startActivity(intent)
so that I can be able to go back with the Back button of Android.
Is it a good way or is there a better approach? I would like to navigate onward and backward of n-levels
The way to navigate back in Android is by launching the Activity intent waiting for a result Doc link and then when you need to go back from the new Activity simply finish it Doc link
Calling finish() in an Activity closes it and returns to the previous one. You can call in on a button click or similar.
精彩评论