Android NavigationView onDestroy not called
<p>I have a layout with navigation view. The view hierarchy is explained below,</p>

<blockquote>
  <p>Navigation View> A > A1<br>
  Navigation View> B</p>
</blockquote>

<p>Now while I am in Fragment A1 if I open Fragment B or Fragment A by clicking the menu in navigation view the onStop or onDestroyView is not invoked in Fragment A1.</p>

<p>I have registered green-bot event in Fragment A1, now as the onStop is not called, the event is never un-registered. So  when I come back to A1 again it's registering a new event and I am getting all events twice.</p>

<p>how can I fix this?</p>

<p>Thanks</p>