I'm adding a Navigation Drawer to this app that I am developing and I have scoured the internet; forums, stackoverflow, android developer documentation, and still have not found a great answer for this.
I know that it is possible to do this without using either of these things. What I am wondering is how. The NsMenuAdapter model uses a title, and then there are these functions
getActionBar().setDisplayHomeAsUpEnabled(true);
getActionBar().setHomeButtonEnabled(true);
Which are clearly looking for an action bar. I tried a couple of models that didn't work, the big one I just got done trying is located here How to Add icons adjacent to titles for Android Navigation Drawer (which is related to the link I have below, the project is from gitHub here https://github.com/gabrielemariotti/androiddev/tree/master/NavigationDrawer). Now the key thing is, I am using a custom layout (i.e. Relative Layouts mixed in with Linear Layouts) and I'm really lost on what my next step should be in order to get this to work.
Sidenote: When I only have the ListView in my main_activity.xml (the implementation for the Navigation Drawer) it does properly slide out like it is suppose to. But I cannot for the life of me figure out how to populate it with data. I basically need 3 headers with that will have clickable navigation elements in them, with icons next to the elements.
I turned to this model for most of my insight on how to do this via Relative Layouts http://gmariotti.blogspot.com/2013/05/creating-navigation-drawer.html But they use action/title bars which is what is really throwing me for a loop.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…