can we call startActivityForResult from adapter?

后端 未结 4 689
无人共我
无人共我 2021-02-03 19:10

is it possible to have method onActivityResume within adapter & call startActivityForResult?

4条回答
  •  说谎
    说谎 (楼主)
    2021-02-03 19:59

    Offcource...

    ((Activity) context).startActivityForResult(intent, 911);
    

    Caution !!

    Only pass MyActivity.this from activity to adapter as context.

    Only pass getActivity(); from fragment to adapter as context.

提交回复
热议问题