开发者

Reuse an activity (create a new instance of)

开发者 https://www.devze.com 2023-04-03 06:58 出处:网络
How can a 开发者_Go百科I reuse an Intent? I have a Class that I want to refuse (for drilling down a table layout).

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.

0

精彩评论

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