I've seen in many applications that the user can add clickable and editable things like "category" to the navigation drawer or their custom menus. But when I thought about how they did it, not much came to mind. How can this be done?
Related
Im using the BottomNavigationViewEx library to display a Bottom Menu Bar in my android app, the library works well and fixes many of the shortcomings of the standard BottomNavigationView.
The problem comes when as per requirements I need to show 7 options in the menu, with 4 options being the direct access to their respective functionality and a "More" option, that should show a submenu with 3 more options (similar to a toolbar with items with property showAsAction="never")
Since the library does not admit more than 5 items and does not support submenus either I've been trying to implement a solution to no avail. Is there a way to implement this or any other bottom menu library that I could use that implements submenus (or lets me extend it to create a submenu)?
#Jeav148, you can take help from androidhive tab tutorial.
https://www.androidhive.info/2015/09/android-material-design-working-with-tabs/
From this tutorial you can check the scrollable tabs, so you'll be able to add tabs as much menu items you want.
Just you need to use the tablayout inside RelativeLayout with property AlignParentBottom = "true" to show the tabs at bottom.
Even though Adil's answer could have worked, I didn't go for it since it could create other problems. So I ended up making a Popup Menu anchored to the last menu item in the BottomNavigationView
I recently put my hands on Android development and hence have to ask here a query that I have.
In my test app I have a BottomNavigationView, which has 3 options to click. I have seen in many apps that if a selection is tapped it further slides up another sub menu. I couldn't find enough information about this feature.
Looking for a direction if anyone has came across such requirement in the past.
This feature is deprecated now. look at say goodbye to menu button
if you still want to perform some action on navigation buttons, Override onBackPressed method in your activity so that you are able to perform some action on click of back button of bottom navigation bar.
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 am switching my Android app over to a more "proper" UX with the ActionBar etc. I have been trying to determine what the best/recommended navigation style would be.
My app has 5 activities that I currently switch between by using the menu/overflow menu.
My app has 1 main home screen that the user will spend most of their time on. The user needs a way to navigate to the other activities but none of them are really related to eachother. They are more like utility screens that a user will go to when they need to do some maintenance.
I am reading this link: http://developer.android.com/design/patterns/actionbar.html
I was first thinking to use an action bar dropdown navigation but that seems like it's not designed for navigation and more so for switching between views of the same data:
Use a spinner in the main action bar if:
You don't want to give up the vertical screen real estate for a dedicated tab bar.
The user is switching between views of the same data set (for example: calendar events viewed by day, week, or month) or data sets of the same type (such as content for two different accounts).
Then I was going to use ActionBar tabs but it says that is more for swiping between items that are used often:
Use tabs if:
You expect your app's users to switch views frequently.
You want the user to be highly aware of the alternate views.
I guess the last option is to put the actions into the overflow menu but this seems like i'm going backwards.
Can anyone offer some insight?
Thanks
I have decided to go with a side drawer as per here:
http://developer.android.com/design/patterns/actionbar.html
Open a drawer from the main action bar if:
You want to provide direct navigation to a number of views within your app which don't have direct relationships between each other.
I’ve created a bottom menu and used a relative layout to place it there but I don’t know if I’m going about this the right way. It’s a PNG bar with three images on it one for maps, one for facilities and one for search which all should lead to a three different activities.
How do I make each image a button, I know how to make the whole bar a button, in a webpage you can add an image map and create hotspost with the three links.
How do I do that in an Android application?
Cheers,
Mike.
How do I make each image a button
You use three images, and use each in an ImageButton.
Even better would be to follow platform conventions, either:
Using an ordinary options menu, which will automatically be hoisted to your action bar on Android 3.0+, and where you can make some of those be toolbar buttons if you want for immediate clickablilty
Using an action bar library for all Android versions, such as ActionBarSherlock, so you have the same behavior everywhere, including the toolbar buttons where there is room