我们可以从接口调用startActivityForResult? [英] can we call startActivityForResult from adapter?
本文介绍了我们可以从接口调用startActivityForResult?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是有可能有方法onActivityResume内适配器及放大器;打电话startActiivtyForResult?
is it possible to have method onActivityResume within adapter & call startActiivtyForResult?
推荐答案
是的。就在活动的情况下传递给在适配器的构造适配器(这里存储为mContext)。 在getView,只需拨打
Yes. Just pass the context of the activity to the adapter in the adapter's constructor (here stored as mContext). In getView, just call
((Activity) mContext).startActivityForResult(intent,REQUEST_FOR_ACTIVITY_CODE);
这篇关于我们可以从接口调用startActivityForResult?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文