Create New Window in Android
You can jump to a new window by changing the content view.
Code
setContentView(R.layout.second); |
But the type of Activity between two views must be same. In my case, I need to switch to a List view(Activity) from a normal window. I can't do by switching content views. The only way to do that is start a sub-activity, just like the following:
Code
Intent intent = new Intent((Context)this, NewWindow.class); | |
startActivityForResult(intent, 0); |
Yes, then it will jump to a new window, after the action completes, my code will call "finish();" from the sub-activity. Then it will jump back to the main window.
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
1 comment
This post has 2990 feedbacks awaiting moderation...
Form is loading...
Comment from: Andrew [Visitor]
Thank’s for that. That’s what I’m looking for developing on Android.