[TIMOB-15910] Android: Add Navigation Drawer Support
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2017-08-23T23:24:51.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 6.2.0 |
Components | Android |
Labels | exalture |
Reporter | Vance Lucas |
Assignee | Gary Mathews |
Created | 2013-12-06T17:58:22.000+0000 |
Updated | 2017-10-17T08:11:53.000+0000 |
Description
Add support for the Android Navigation Drawer into Titanium. This is one of the primary methods for navigation provided by Android, and needs to be implemented in Titanium for better Android support. It is extremely useful because:
1. It is built-in Android and is a common UI pattern; and
2. It is explicitly designed to be accessible from any screen in the app - a feature that cannot be achieved in user-land Titanium code in the same way
http://developer.android.com/design/patterns/navigation-drawer.html
I would love to see this as it is a must have for many apps. Someone hacked it together here: http://www.youtube.com/watch?v=EZvve3HTl_w&lc but has not released the code. It is very useful: http://www.youtube.com/watch?v=F5COhlbpIbY
These guys (https://github.com/Tripvi/Ti.DrawerLayout/) got it to work as a module. The only thing I see missing is the ActionBarDrawerToggle graphic. The claim they can't add it until Titanium supports android.support.v7.app.ActionBarActivity (http://goo.gl/ZGN8rs).
I would also love to see this. I managed to get the module that Ricardo linked to work, but the missing toggle graphic is a big issue (and using a custom fake ActionBar kinda kills the point, I want to get it as native as possible).
Since we've implemented TIMOB-15982, there should be no issue in completing the module. Are people generally happy with it otherwise?
Tripvi's module (mentioned above) was updated yesterday to work with Titanium SDK 3.3.0 and properly supports the animated drawer icon. Here's a GIF: http://drops.ricardoalcocer.com/drops/drawermenu_actionbar-3aj191uIGG.gif
any updates on a possible official support?
Official support for drawer would be great. Any updates?
The module describe above was abandoned, the drawer is default in material design I believe, support the drawer is very important, any ideas when probably are gonna be implemented? Thanks
+1 for this. There are no completely satisfactory 3rd party solutions for Android drawers and as it's slowly becoming the defacto navigation device in many apps, it does seem a particularly glaring omission from Titanium's otherwise extensive list of supported native components
I just installed the fork at https://github.com/manumaticx/Ti.DrawerLayout and it works great, but built in support would of course be greatly appreciated since it seems to become more of a standard component in apps today.
Sadly that module has some fundamental issues with Android view fragments which mean Ti.Map views don't work with it and there are also significant problems with Ti WebViews.
+2 as now the workaround used by many as detailed in a number of issues * TC-5490 * TIMOB-18872 * TIMOB-18886 doesn't work with SDK 4.0.0 which I think is a big problem. Also the number of watchers on this issue and also other reports should demonstrate the need. Thank you
@ingo What's the latest on this? It's been a month with 43 watchers and no real progress. Moving to SDK 4.0.0 is our target, but now with this issue and our upcoming redesign, we cannot.
[~Yrkh8trnoy] The three issues linked by [~ndastur] are either duplicates or expected changes as directed by Google's UI guidelines. Does anyone have a link to the issues with view fragments? That is what I would like to solve.
@Ingo Muschenetz I think the problem is that the issues I have linked _are_ expected Google UI changes, but those guideline assume that there is a working navigation draw available. I suspect the fact is, that lot of people use the anti-pattern as a workaround for the lack of proper Google UI support in appcelerator. So until draw support is fixed I think it was a bad move to get picky about Google's UI guidelines.
[~ndastur] So I understand, if you were to use the existing module https://github.com/manumaticx/Ti.DrawerLayout, what issues do you run into? What is the difference (other than namespace issues) from us including this module or similar code directly?
@ingo I am in the process of refactoring our code to use that module. But I see no issue with you including that code directly. I think people are generally more comfortable with fundamental stuff being within Appc and maintained there.
Still no news on that?
+1
In case someone else is looking for something like that, I've found this great widget https://github.com/yomybaby/kr.yostudio.drawer ,star it, this guy is great.
master: https://github.com/appcelerator/titanium_mobile/pull/9091
FR Passed for backport PR : https://github.com/appcelerator/titanium_mobile/pull/9348. PR's merged.
Yes! Finally! Keep up the good momentum folks! :)
Thank you! (y)
Verified fix in SDK Version: 6.2.0.v20170824074531 and SDK Version: 7.0.0.v20170823165814 Test and other information can be found at: Master: https://github.com/appcelerator/titanium_mobile/pull/9245 6_2_X: https://github.com/appcelerator/titanium_mobile/pull/9347
Hi guys, I've got a problem with drawer's custom width. When I specify width parameter and open the drawer, it will look like on the screen(width is set to 250, left has to be set to 0). When I unspecify width, it looks normal, but it's too wide. Can you guys please check it out? Thanks screenshot: [screen-drawer](https://1drv.ms/i/s!AqYLRbx94HRJmFaAtS6OFw798q5i)