In my android app, i am having NavigationDrawer. Now, i want that when i click on any navigation-item, then
1) left drawer should remain open
2) previous listitem should be replaced by item-click content
3) item click content should be loaded within navigation view.
I searched but found few links suggesting to use ExpandableListview. Is there any facility to expand or collapse content of navigation item?
Is it according to android design patterns? if its possible then please suggest that how can i achieve it.
Thank you.
Related
Am using mike penz material drawer for my project and its working great except this issue. After visiting a previous fragment which falls under a collapse menu, say for example, Create New job as shown in the screenshot, and i go to Profile, i want the the collapsed menu for which that item falls under in this case Jobs to be closed automatically. Any help is appreciated.
The MaterialDrawer library uses the FastAdapter as adapter behind the scenes to offer expandable functionality, and additional APIs to simplify the work with the RecyclerView showing the elements.
To collapse all expanded items within the drawer, it is possible to access the expandableExtension from the MaterialDrawerSliderView, and use its API to for example collapse all items.
binding.slider.expandableExtension.collapse()
To connect this to the Drawer, call this for example when the Profile item was clicked and you were notified via the onDrawerItemClickListener
The provided sample code is based on the MaterialDrawer v8.x.y version
Hi I want to make my ListView when swipe left to show more menu.
I googled and found this library https://github.com/daimajia/AndroidSwipeLayout .
but I want to use only with handle icon. It means only swipe on that icon to activate and show menu.
Because I use PagerView for tabs, so when swipe on the rest area it will change tab.
Can anyone guide me how to do it?
Or any Library is fine.
I think the best way is to use RecycleView with ItemTouchHelper
Here is similar question with answer RecyclerView Swipe with a view below it
I want to use Navigation drawer in Action Bar and below that I want to use Swipe Tabs in single sherlock fragment. I want to open above sherlock fragment on the Item click of ListView.And Most Important think is that I want to open different swipe tab on the click of different Item in ListView.
thank in advance.
Use this library. Because Navigation Drawer with swipe tabs is really difficult and as far as I know many developers are struggling with it. For reference you can refer my Application.
Create the Navigation Drawer with the standard procedure and just integrate the above library.
Hope it helps
as I pursue my study on android app development I came across this app from apple and I was wondering if, is there a way to imitate the navigation drawer in this screen shot?!
See it's an expandable navigation drawer. a list view with some items that are expandable. Is there an actual way to imitate this on android?
Thank you very much again for all of your help.
You can recreate that drawer.
You can use the ExpandableListView within the Navigation Drawer. And of course you'll have to create your own parent and child item layouts for the listview. As well as appropriate styling. You can use tutorials to do this, first create the navigation drawer, then create the expandablelistview and put it within the navaigation drawer layout.
I'd also like to note on that screen shot, the drawer is incorrect. It should slide out below the action bar, over-top of the activity (like in the link). It should not slide the entire application window to the right like how some apps do.
Use a Custom ListView for this, see here for that: How To Create A Custom Listview - Android Example
Also, you will have to create specialized buttons that have a different look than standard holo buttons, see here for that: How to create custom button in Android using XML Styles
Finally, I do not believe it is possible to directly clone the navigation drawer, as the app you showed doesn't have an open sourced app (as far as I know).
I have an Activity that its root element is a DrawerLayout, the DrawerLayout has a ListView child that acts as the left view of the drawer layout.
The question is:
How can I force the left drawer's list view to not close completely ?
I want its closed state to be like the photo below
I am currently using Android's guide to Create a Navigation Drawer.
I am open for any other library - like Sliding Menu - if that accomplishes my goal.
Thanks in Advance.
You can use SlidingPaneLayout, it's similar to NavigationDrawer.
Check this tutorial to find out how to reach it.
Why not just use that far leftmost menu as a fragment within your activity. Upon opening the NAv Drawer, you can still have it show the menus that are 2nd or 3rd level. This is pretty standard for our app, with a menu exposed and further menus available upon opening the drawer