-3

Is it possible to achieve something like that? I would like to have my menu items on the left/right in my app organized vertically (instead of horizontally like standard BottomNavigationView).

shurrok
  • 795
  • 2
  • 13
  • 43
  • 1
    like what exactly. ? any code or what you have tried so far would be a good idea to share here... :) – Umair Jun 26 '18 at 09:40
  • @Umair i tried with NavigationView https://stackoverflow.com/questions/51025879/center-items-verticaly-in-navigationview-and-add-min-max-height and with this https://stackoverflow.com/questions/50985312/bottom-navigation-view-vertical-in-landscape-mode-design – shurrok Jun 26 '18 at 09:42
  • You could use a separate `layout` resource folder. `res/layout-land` and create an `activity_main` file in that particular directory to be used when the app enters landscape mode. In this new `activity_main`, you could use a `TabLayout` on the right of the parent. I do not know if it can be done with `BottomNavigationView`. Do give it a try. Could be a fun little experiment. – ravi Jun 26 '18 at 09:44
  • I think you are looking for something like `Gmail` in tablets? Give this a try http://www.devexchanges.info/2016/05/android-create-sliding-panel-like-gmail.html – meditat Jun 26 '18 at 09:50
  • 1
    @meditat yeah, exactly, but not expandable, just icons with text under them (like in BottomNavigationView - the only difference is I do not want this in bottom actually but on the left/right and organised vertically). Thanks, I'll check that – shurrok Jun 26 '18 at 09:54
  • Gotcha, I'll update you with an Answer. :). But make sure you try it too. – meditat Jun 26 '18 at 09:56
  • @meditatI checked that and this is like a standard drawer but with the expandable feature. I want the same behaviour as bottom navigation view – shurrok Jun 26 '18 at 09:56
  • let's take youtube app menu and imagine we can put in on the right in our app - this is what I want to achieve – shurrok Jun 26 '18 at 09:57

2 Answers2

1

The Library MaterialDrawer have a MiniDrawer with the lots of features.

Mini Drawer

See More at Github((https://github.com/mikepenz/MaterialDrawer))

meditat
  • 1,197
  • 14
  • 33
0

I am afraid that the BottomNavigationView is not intended to work as a "SideNavigationView". If you take a look at the implementation of 'onLayout()' of the BottomNavigationMenuView (nested inside the BottomNavigationView), you will see that it has a hardcoded logic to layout views horizontally.

I think that your best bet will be to write your own implementation of a "SideNavigationView" (e.g. extend the RadioGroup ? -- that's the first thing that comes to my mind).

marcinP
  • 106
  • 1
  • 4