menu, refactoring and fix white page bug
refactor the menu layout with states to make it more efficient, and use less variables
fix the white page bug that happened when resizing the window while Activity Settings page is opened.
Info: the root cause of the white page bug was that resizing the window
could make the selected activity go too much out of the view,
and so going out of the cacheBuffer of the GridView.
So now we make sure to always positionViewAtIndex(indexOfSelectedActivity, GridView.visible)
when resizing the window while Activity Settings page is opened from the menu.