Side Menu
Last updated
Last updated
The SideMenu component is a navigation drawer that slides on the side of the current view. By default, slide from the left, but the side can be replaced. The sideMenu is customized through containers and specifications that allow you to set the SideMenu object or through the SideMenuContainer class.
The sideMenu, as an important part of the user interface, have their own standards. Therefore it is recommended to review the Material Design for more information and to enjoy the component better. To learn how to design notifications and their interactions, read what MaterialDesing talks about Menus.
First, you create the SideMenuContainer
object and inside the initUI()
you instantiate the objects corresponding to the items, through the SideMenuContainer.Item
and there you pass the characteristics you want, such as caption, icon, presenter.
After that, you instantiate your SideMenuContainer
object and point to the SideMenuContainer.item
that you created earlier.
And then just customize the header of your Side Menu through topMenu.header.
Finally just pass the other information you want on your sideMenuContainer
object, such as font color, bar size and so on.
sideMenuContainer
sideMenuContainer.Item
Capition
Image or IconType
Presenter
TopMenu.Header
Icon _Menu.
Inside the sideMenuContainer.Item you can still have:
Caption
Image or IconType (advise using MaterialIcon)
Color
Boolean showTitle
Presenter
And you can even specify directly in the sideMenuContainer.topMenu:
.drawSeparators = boolean
- To place or not the lines separating the items
.itemHeightFactor = int
- To say the item's size.
To see the complete example, just click here