How do I implement a custom bottomnavigation like this - android

I need to implement a custom bottomnavigation like in the image. My peculiar issue is that when a menu item from the bottomNav is clicked the bottomnav has to reposition the text above and add an image of a dot below it like as shown in the image.
This means that small solutions to selected state like using a custom selector cannot solve this.
Is there a way to inflate a selected layout to show how the bottomNav should look when selected? What methods or other ways do you suggest I tackle this issue?

Try This Git library It's not 100% same as want, but good
https://github.com/iammert/ReadableBottomBar

Ah! Totally forgot to answer this after I solved it.
I was initially showing an Icon and label combination in the bottomnavigation. I was looking for a way to hide the icon on click and show a dot on the bottom which was the wrong way to go and would be complex.
I ended up adding the icon and label as a group drawable vector instead of individually. So for each bottomnavigation option, I had a drawable selector xml with state for selected and unselected.

Related

BottomNavigationBar with custom highlight graphics

Our designer gave me this sketch of a bottom navigation bar.
The circle below the first item indicates that it is selected. How should one implement this highlighting mechanism? Is it possible to use selectors for this purpose?
I would suggest having a drawable for the selected state and the non selected state where the selected state contains the dot. Then just change the source image when selected.

How to change bottom navigation icon color if I change Fragment programmatically

I am using bottom navigation to change fragments. For whatever reason, I need to change Fragment if the user taps a particular button. This method working fine, except a little aesthetic problem. If I change fragment programmatically, the bottom navigation icon color won't change.
For handling color change, I am using selector XML right now, but I am ready to use other solutions, to handle this little problem.
please follow this code, it may help you bottomNavigationView.setSelectedItemId(R.id.navigation_home);

Android draw a rectangle to navigation drawer menu item

I have to create a navigation drawer with a custom menu item.
I know I can create a ListView with custom item layout or use third-party libs etc., but I feel that would be an overkill for this little modification, because the 'default' working method is almost perfect for me.
I have to draw a little rectangle with different color to every menu item.
Can I achieve this with default components somehow?
Finally I've successfully solved the problem by using Mike Penz's MaterialDrawer library with custom drawer item and custom item layout.

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.

Path like menu item - Android

I'm making use of Siyamed's menu item in my app.. I would like to place the menu item in the bottom center of the screen.. and when I click on it, the child items should surround the center icon. Any ideas on how to start?
I recommend you tried another implementation: ArcMenu by daCapricorn.
As the author said on Google+:
If you want to put it align the screen bottom, you can set alignparentbottom="true" in xml and compute the marginBottom (it should be negative) programmatically.
PS: I personnality ended up using ArcMenu library rather than SatelliteMenu for the same issue.

Categories

Resources