I have the following problem:
I have one Fragment, which implements a specified interface.
@Override
public void sensorStatusChanged(double bearing, double pitch, double rotation) {
if (radarView != null) {
radarView.setBearing((float) bearing);
}
....
}
The ParentActivity handles the Location-Listener and tries to inform the fragment that sensorData has changed.
At this part, I have the following behaviour: The method gets called, but the radarView is null. I'm 100% sure, that the radarView is not null. When I set some breakpoints into this code, the only part where the radarView is null, is inside of methods, which are called from the activitiy and not from the fragment itself.
I'm a total beginner in dealing with fragments (started today), so I think I'm doing something wrong.
How can I solve this behaviour?
Cheers