开发者

Android: Where do I find startSubActivity()?

开发者 https://www.devze.com 2023-01-05 17:36 出处:网络
I\'m trying to use the function [context].startSubActivity([intent i]) but that won\'t compile. Apparently startSubActivity() doesn\'t exist in Android 2.01? I do see a bunch of startActivity(...开发者

I'm trying to use the function [context].startSubActivity([intent i]) but that won't compile. Apparently startSubActivity() doesn't exist in Android 2.01? I do see a bunch of startActivity(...开发者_运维百科) functions, but no startSubActivity, which so many examples provide. Would someone please tell me if it's been deprecated, or maybe I'm just not including some library Eclipse isn't helping me find? :)

What I'm trying to do is launch a subactivity inside of a TimerTask inside my app.

Thanks!

-Auri


As far as I know, startSubActivity is now startActivityForResult. Here a link to confirm this.


Use either startActivity or startActivityForResult (if you want to send something back from the child activity to the parent activity, remember to implement onActivityResult).

0

精彩评论

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