hawkular / hawkular-android-client

Apache License 2.0
10 stars 26 forks source link

Fixed multiple instances of a single Fragment. #211

Closed m-murad closed 7 years ago

m-murad commented 7 years ago

Fixes issue #210 Please review.

KeenWarrior commented 7 years ago

@free4murad Can you clearly address what was the issue before

m-murad commented 7 years ago

@garg-anuj If in the navbar the option selected is Aletrs and the user selects Aletrs again a new instance of AlertFragment and TriggersFragment is initialised. This behavior can be seen using the memory monitor in Android studio.

What should happen is, if a fragment is in memory it should not be reinstentiated.

m-murad commented 7 years ago

@garg-anuj You can see this behavior in many apps eg Gmail.

If you are in the Primary Inbox and select Primary Inbox from navbar the page is not reloaded. If you select some other option you will observe a small load time. But when selecting same option there is no load time.