NavigationView and ActionBarDrawerToggle

前端 未结 3 1670
渐次进展
渐次进展 2021-01-02 08:44

With the new NavigationView is it still recommended to use ActionBarDrawerToggle or is this not \"Material Design\"? For instance previously we we

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-02 08:56

    Completing the other answers, the Navigation View should be fit into the whole screen in terms of height so it will hide the hamburger icon when opened. Because of this, having the animation from burger to arrow or even just showing the arrow is not necessary.

    But when clicking on the current screen it goes to another fragment, imagine a gallery of photos and clicking on a photo will show it bigger, there should be an animation from burger to arrow and the arrow should stay and when pressed there should be a reverse animation to the burger so the navigation view can be opened again.

    You can achieve this with ActionBarDrawerToggle still, even with navigation view because it uses the same DrawerLayout as before. So it still has uses, but of course not necessary.

提交回复
热议问题