Reuse an activity (create a new instance of)
How can a 开发者_Go百科I reuse an Intent? I have a Class that I want to refuse (for drilling down a table layout).
Intent i = new Intent(AcmBrowseView.this, AcmBrowseView.class);
I've done a bit of searching, but no luck. How do I tell the compiler to create a new instance of AcmBrowseView.class?
Thanks,
Phil
Set android:launchMode="singleTask" in your manifest for this activity. All intents will then be sent to the onNewIntent() event handler.
精彩评论