I am using bradley's navigation drawer for displaying options in a listAdapter. Now I want to change the layout and add sliding tabs in the appCompatActionBar. The attached image is what I want to achieve.
Can someone provide a tutorial link or tell me how should I modify the actionbar to draw such layout?
Related
How to make icon in my Navigation Drawer rectangle like original size?
Yes, by default if you are using menu resource with items to populate Navigation drawer it will have equal width and height.
Alternatively, you can create your own listview with custom list_item for Navigation Drawer and use it to populate your own data with your Custom UI.
Please refer this link to do so : Android Nav Drawer
i m using navigation drawer in old project but i got new project in this project they used navigation view so what is the difference beet been these two. which is the best for good for customize .
NavigationDrawer is a panel that displays the App’s Navigation option from the left edge of the screen.
and NavigationView is the builtin class/tag through which you tell the drawer what it looks like.
NavigationView consists of two main elements (these are optional):
You have to tell the NavigationView if there is any header layout:
Menu in the NavigationView
If you don't want to use both then you don't need to use it. You can simply put your custom code (XML) inside DrawerLayout.
An easy example will help you to understand all the game.
Navigation View is a widget provided by the android which you can use inside a Drawer. Navigation View makes it very easy to create a navigation menu inside your app.
Refer this for more:
https://developer.android.com/reference/android/support/design/widget/NavigationView.html
Navigation Drawer is nothing but a container where your navigation menu resides. Either you can use NavigationView for creating a highly customizable menu or you can simply use a listview to provide the menu items.
I want to use navigation drawer and tabs together.I have googled it but i didn't get correct answer,even I am confused whether to use or not when i use navigation drawer I use the FrameLayout and for tab also I use FrameLayout how do i differentiate them how can I use.Can anyone explain me.Previously action bar were there but, now they are deprecated. I am using toolbar.
Thanks in advance.
I want to use navigation drawer and tabs together.
Why? Navigation Drawer gives user clickable options and when an item is selected, developer has to change the fragment in the Activity's FrameLayout.
Tab view is also an alternative, i.e. you can have all drawer options in form of 'swipe-able' tabbed fragments, using viewPager.
Now you should decide, to go with drawer or viewPager
Alternatively, if you do want to use both in your app you can go for a viewpager inside slidingDrawer. Now ViewPager will have tabbed swipe view and slidingDrawer options can open new Activities.
Let me know of your decision and then I can update here with appropriate code snippet/links.
How can I slide the layout with action bar ?
Right now my navigation drawer list just appear below the action bar, but I want it to overlap the action bar onclick of navigation drawer icon; can I do this?
For this you can use sliding pane layout
Here is a link
https://github.com/cricklet/Android-PanesLibrary/tree/master/example
you can slide the layout with action bar
you have to make a sliding pane and then navigation drawer in the 2nd view
which you will get after implement this example
and here is the link for navigation drawer
http://www.codeofaninja.com/2014/02/android-navigation-drawer-example.html
combine these examples
it can help you a lot!!
Navigation drawer usually stays below action bar so you can slide it out or open it via the navigation button. Based on the image you posted, I think you should use this well-known lib: https://github.com/jfeinstein10/SlidingMenu.
It takes some steps to set up but when you're done you can customize it the way you want easily. The author also provided demo on Google Play Store and Youtube for you to review.
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