An open API service indexing awesome lists of open source software.

https://github.com/dekoservidoni/omfm

Another floating action button menu with expand/collapse behavior, in kotlin
https://github.com/dekoservidoni/omfm

android custom floatingactionbutton kotlin menu

Last synced: 29 days ago
JSON representation

Another floating action button menu with expand/collapse behavior, in kotlin

Awesome Lists containing this project

README

          

# [DEPRECATED] OneMoreFabMenu

Another floating action button menu with expand/collapse behavior.

[ ![Download](https://api.bintray.com/packages/dekoservidoni/AndroidLibs/OMFM/images/download.svg) ](https://bintray.com/dekoservidoni/AndroidLibs/OMFM/_latestVersion)

[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-OneMoreFabMenu-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/6280)

![Example gif](/images/example_v1.0.3.gif)

## What's new:

### Version 1.1.1 (02/03/2018)
* [Fix] Bug fixes
* Main button label shows with not text when text is “” (empty)

### Version 1.1.0 (01/25/2018)
* [Feature] Add parameter in the layout to background text label
* [Feature] Add parameter in the layout to color text label
* [Feature] Add parameter in the layout to add label to the main button
* [Feature] Add parameter in the layout to add action to the main button
* [Feature] Add parameter in the layout to add drawable to the main button when opened
* [Enhancement] Increase padding left/right of the label
* [Enhancement] Update sample to have different example images

## How to use

This library have 1 main layout param and 12 optionals

* `` **[Required]**
* Resource "menu" file with the options that the menu will show

* `` **[optional]**
* Color of the main button

* `` **[optional]**
* Color of the other options buttons

* `` **[optional]**
* Color of the background when the component expands

* `` **[optional, *default=true*]**
* Flag to enable/disable the rotation of main button

* `` **[optional]**
* Size of the main button. Can use the already defined size: ***@integer/omfm_fab_size_normal***

* `` **[optional]**
* Size of the secondary buttons. Can use the already defined size: ***@integer/omfm_fab_size_mini***

* `` **[optional, *default=false*]**
* Flag to enable/disable the close menu when some option is clicked

* `` **[optional, *default=white*]**
* Background color of the label

* `` **[optional]**
* If you want a drawable instead of color in the label's background

* `` **[optional, *default=black*]**
* Color of the label's text

* `` **[optional, *default=false*]**
* Flag to enable/disable the main button as an action when the menu is expanded

* `` **[optional, *default=icon defined in the content menu file*]**
* Drawable of the main button when it is set as an action.

###### Example of usage

```xml

```

#### Menu resource example

The menu is structure from top to bottom, for example, the first one is the main button
and the others will be the first option, second option and etc.

The first item don't need to have a text because only the options have labels.

```xml




```

## Integrating with Gradle

To integrate with your project, just add the following line to your app `` file

```java
compile 'com.github.dekoservidoni:omfm:1.1.1'
```

## Important!

Please make sure your project have Kotlin support:

Top-level build.gradle:
```java
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.51"
```

Module build.gradle:
```java
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.51"
```

## Licence

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.