Is there a method like setResult() in fragment?

前端 未结 4 1109
粉色の甜心
粉色の甜心 2021-02-18 13:02

I am using a fragment. I am getting an error in the onResult() method. I need a substitute method for setResult(RESULT_OK, data) that I can use in my f

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-18 13:48

    Use this it may be help to you..

    getActivity().setResult(Activity.RESULT_OK, data);
    

提交回复
热议问题