Is there a method that works like start fragment for result?

后端 未结 10 1292
孤城傲影
孤城傲影 2020-12-02 09:51

I currently have a fragment in an overlay. This is for signing in to the service. In the phone app, each of the steps I want to show in the overlay are their own screens and

10条回答
  •  再見小時候
    2020-12-02 10:23

    If you wish, there are some methods for communication between Fragments,

    setTargetFragment(Fragment fragment, int requestCode)
    getTargetFragment()
    getTargetRequestCode()
    

    You can callback using these.

    Fragment invoker = getTargetFragment();
    if(invoker != null) {
        invoker.callPublicMethod();
    }
    

提交回复
热议问题