开发者

does android OS creates new instance of Activity or brings up an old activity which has been pushed into the Activity stack

i m finding solution. my queston is

for each startActivity(intent), does android OS creates new instance 开发者_开发技巧of Activity or brings up an old activity which has been pushed into the Activity stack.


It depends on the Flags that you set on the Intent, see: public Intent setFlags (int flags)


If what you want is to bring up the old activity, why don't you use PendingIntent.getActivity() it will get it and create it if it doesn't exist (unless you set the flag FLAG_NO_CREATE) you can check about it here http://developer.android.com/reference/android/app/PendingIntent.html

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜