Bottom Menu bar with submenu - android

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

Related

Android Actionbar PopupMenu with Custom Item Layouts

I am working on an Android application where I have to design a menu which will populate from the action bar, like this:
I have tried my best but was not able to produce it using the Android controls.
The solutions I have tried are:
With Actionbar, add a menu item with a group with selectable="all", that produces the layout I need but when I click a checkbox for selecting it, the whole menu hides and selection is not done, moreover the menu icon in actionbar does not have the bottom right white arrow.
Tried creating a custom ActionProvider and added the menu items using class's OnPrepareSubMenu method but had the same issue.
I just need a push in the right direction and I can do the rest, suggestions are more than welcome.
Thank you :)
Use popupWindow.
In that you can make any custom layout and set it as content of your popupwindow and also you can specify an ANCHOR in your case it would be
R.id.your_menu_item
set a listener and listen the changes.

Option menu in Android like a Windows 8 phone

I am trying to implement a menu just like in Windows 8 phone. When I touch three dots menu bar button, it slides up and shows other options. I saw a sliding drawer in Android, but it is deprecated in API 17. I searched on Google but did not find solution. Any ideas on how I could implement this?
You can see a picture of the menu view.
You can do this in many ways. I.e. by using RelativeLayout as main container and separate i.e. LinearLayout as your menu container. And you then show/hide your menu container when you need. And you can apply animation to container.

Android App with tabs and menu items

I'm trying to implement an application with a specific view. It needs to have a horizontal bar at the top that contains the app icon, and other buttons and spinners. These items must be static and should appear on every page of the app.
Below that horizontal bar will be a Tabbed component, with the tabs being horizontal at the bottom of the page. I can also implement the desired behavior with the tabs on top of the Tabbed component. Each tab will obviously change the fragment being displayed within the tab's frame.
I am working on an implementation that uses the ActionBar and the menu options. However, I can't get the menu options (my buttons and spinners) to appear above the tabs. And I'm not sure if menu options is the right approach. Any ideas?
Silly me! the answer was right there. I simply had to turn the title bar back on (only with no title) and the menu options would appear right into that title bar.
keep in mind that this feature is heavily dependent on the version of android and model of device that you have.
Older phones have a menu button which will bring up the same menu, as do some modern phones (like the galaxy SIII), so, be sure to test this everywhere so you know what the end-user will actually experience.

Action bar list navigation + tab navigation - Position of spinner is not at left most

According to Jake as in Android layout with action bar and tabs, we decide to follow his 2nd suggestion.
Use tab navigation in the action bar and set a custom view with a Spinner
Together with IcsSpinner from ActionBarSherlock itself, we manage to make it work in Gingerbread and ICS both.
However, we still suffer the following problem, during landscape mode.
Note, the spinner ("Portfolio 1") is in between PORTFOLIO tab and search icon. What we want is, the spinner is at the left side of WATCHLIST tab.
Is there anything we may try out?
Thanks.
You can set custom view for your action bar, user RelativeLayout to put your spinner at left side of "WATCH LiST"
in java code: actionBar.setCustomView(R.layout.custom_actionbar_layout)
a very late answer, but this is possible. You just have to replace (programatically) the view that is pointed by android.R.id.action_bar_title with a Spinner. I wrote a blog about it. Here's the link

Whether options menu at the bottom in Android can be made permanent?

Whether options menu at the bottom (Inflated menu) can be made permanent? The menu should be permanently inflated without the need for user to press the menu button?
whether it can be done?
whether it can be done?
No.
Besides, that menu is going away. Honeycomb and Ice Cream Sandwich are moving to the action bar pattern, where the options menu is integrated into the action bar as a drop-down menu and optional toolbar buttons.
If you want to give the user some always-visible set of actions, consider adding the action bar to your own applications. You can do this on pre-Honeycomb devices using third-party action bar implementations like ActionBarSherlock.
You can wrap your layout in a relativelayout and add buttons to the bottom. You can have it look similar too.
As Bill said you can add buttons in Relative layout and not create menu...if you need some code just tell me...
In which version you want the solution ,
in tab versions and 4.0 you can solve this problem as follows.
in manifest file add this attibute to application Tag android:uiOptions="splitActionBarWhenNarrow" so that your actionbar shows in the bottom. while your mobile is in portrait , in landscape it shows as usual on the top
and them add this flag to your menu item
MenuItem.SHOW_AS_ACTION_ALWAYS
check this link for more flags http://developer.android.com/reference/android/view/MenuItem.html i hope this will solve the issue

Categories

Resources