OnPlaceSelectedListener of SupportPlaceAutocompleteFragment not fired

后端 未结 1 514
野的像风
野的像风 2021-01-25 14:23

I\'m having a problem with the OnPlaceSelectedListener method of a SupportPlaceAutocompleteFragment.

My onViewCreated()

相关标签:
1条回答
  • 2021-01-25 15:06

    Finally solved this problem: hope it will help someone.

    I added this infamous line in the onActivityResult() method in my MainActivity

    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
    
        ...
    }
    

    and then did put the same method in my MapFragment

        @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);
    }
    

    Now the nested fragment is sending back its data.

    0 讨论(0)
提交回复
热议问题