can we call startActivityForResult from adapter?How to get the response?

后端 未结 5 1690
说谎
说谎 2020-12-14 06:18

is it possible to have method startActivtyForResult within an adapter?Then how to get the response? Where to execute the call back function?

5条回答
  •  误落风尘
    2020-12-14 07:20

    write a functon in activity class like this

    public void startCommentActivity(Intent i){
        startActivityForResult(i, 100);
    }
    

    call it in adapter class

    mActivity.startCommentActivity(intent);
    

提交回复
热议问题