简体   繁体   中英

Android - Alternatives to Navigation Drawer

I am trying to implement something similar to a Navigation Drawer, but not so complicated:

侧栏关闭侧边栏打开

What would be the best way to do it? I have looked into using the Android Navigation Drawer, but it seems much too complicated for my needs. Also, not so customizable.

The obvious guess would be to use a hidden layout that gradually shows up while the user drags towards the right. I am, however, looking for a library / easy and reliable solution.

As a suggestion,

Using library (if you found one) just for visible/hide a portion of layout is not something good. So you have basically two options.

  1. you can create two static fragments (one for menu, one for larger screen) and hide/visible menu fragment when you need. You may need to set the layout width at run-time.

  2. Define a drawer(though you do not like that), but it would be the most easy to handle and reliable way to achieve your requirement. You just need simple listview and a drawer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM