Appolica / InteractiveInfoWindowAndroid

Library project, developed and maintained by Appolica, offering an interactive info window for Google maps on Android.
249 stars 56 forks source link

How to make communication between ParentFragment and Appolica InfoWindowFragment #37

Closed Yuri07 closed 3 years ago

Yuri07 commented 6 years ago

I tried to use callback to communicate between my fragments but it seems that infowindowfragment does not recognize my mapFragment as its parentfragment, is there something I can do to work or have another way to do this?

Mapfragment(parentFragment):

image

image

image

image

image

InfoWindowFragment: image

Logcat: image

dpetrov-appolica commented 3 years ago

Screenshot from 2021-06-23 14-31-15

The reason your check isn't working is because getParentFragment() returns you the MapInfoWindowFragment. getParentFragment().getParentFragment() will return your MapFragment and the your check will be true.