Skip to content
This repository has been archived by the owner on Nov 8, 2018. It is now read-only.

Remodelling the Navigation Bar #427

Open
codingblazer opened this issue Mar 10, 2017 · 3 comments
Open

Remodelling the Navigation Bar #427

codingblazer opened this issue Mar 10, 2017 · 3 comments

Comments

@codingblazer
Copy link
Member

codingblazer commented Mar 10, 2017

While solving issue #414 approved by @rohands, I realised the Navigation Bar logic is very inefficient and will require great modification. Soon I found there are many other bugs in it. These bugs including #414 are coming from #378 PR which had wrong solution. Some are listed below -

  1. Multiple Instances still possible-
    Just an example - Choose Safety Tools button on Main screen layout -> Choose Radar Button -> Go to Navigation bar and choose SafetyPlan -> Radar from there.....Multiple instances are created.

  2. Orientation Change Problem -
    Open Radar from Navigation Bar -> Change Orientation of your device -> Reopen Radar from Navigation Bar -> Reopen Radar from Navigation Bar-> Reopen Radar....multiple instances keeps on creating.

  3. Multiple Exapanded groups in Navigation bar on orientation change -
    For Ex - Navigation Bar -> Open Safety Tools -> Change Orientation -> Open Support Services

Safety Tools group should have collapsed but didn't.

  1. If some group is expanded in Navigation Bar and navigation bar is closed -> On reopening navigation bar, group last opened remain expanded.

To solve #414 , I need to come back to old navigation bar logic. (PR #426 sent)
@rohands @sandarumk Should I send PR with the correct solution for above issues. (On top of my PR #426)

@codingblazer
Copy link
Member Author

codingblazer commented Mar 10, 2017

@rohands @sandarumk The solution I propose (on top of old Navigation Bar) is below -

  1. Just need to check that "fragment to be opened" is not same as "fragment already opened". (Can be done by tracking current fragment through backstack)
  2. Need to make sure that tracking done in above step don't get lost on orientation changes. (savedInstanceState)
  3. Storing which group is expanded at time using SavedInstanceState. (-1 if no group expanded)
  4. Close all expanded groups before closing navigation bar.
    These will need some remodelling of Navigation Bar.

@codingblazer codingblazer changed the title Multiple Instances of Fragment Remodelling the Navigation Bar Mar 13, 2017
@codingblazer
Copy link
Member Author

@sandarumk Please have a look at it. Thanks :-)

@codingblazer
Copy link
Member Author

@sandarumk Can I work on this. I have no assigned issue yet. #414 is already fixed via PR :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

1 participant