CoordinatorMenu
The library creates a floating menu like the app momo, vtcpay, wepay.
Gradle Dependency
Repository
Add this in your root build.gradle
file (not your module build.gradle
file):
Dependency
Add this to your module's build.gradle
file:
Basic Usage
CoordinatorMenu XML
To use this CoordinatorMenu in your layout simply copy and paste the xml below.
CoordinatorMenu Attr
There are several other attributes that can be used to configure background menu, size of item menu, size of text, ...
Attrrs | type | option | |
---|---|---|---|
menu_size | size's normal menu | dimension | |
menu_padding_left | padding left of normal menu | dimension | |
menu_padding_right | padding right of normal menu | dimension | |
menu_padding_item | distance between items | dimension | |
menu_big_size | size's big menu | dimension | |
menu_big_padding_top | padding top of big menu | dimension | |
menu_big_padding_bottom | padding bottom of big menu | dimension | |
menu_background_resource | dimension | ||
menu_background_color | color | ||
menu_background_spacing_resource | dimension | ||
menu_background_spacing_color | color | ||
menu_title_text_size | dimension | ||
menu_title_text_position | position of title's menu | enum | none or bottom |
menu_title_text_color | color | ||
menu_title_padding_top | dimension | ||
menu_title_padding_bottom | dimension | ||
menu_ratio_change_view | the rate at which the view changes | float | |
menu_ratio_max_width_title | maximum ratio of width's text compared to the size of the menu | float | |
menu_title_text_style | enum | none or bold |
Init from Java
Java
How to use in.
*Step1: Create Adapter's menu extends CoordinatorMenuAdapter. Ex basic adapter:
*Step2: