Skip to content

Commit

Permalink
Feature/community requests (#44)
Browse files Browse the repository at this point in the history
* Add the ability to open/close the component, set color through resolved color

Exposed two new methods open/close and renamed the internal implementation toexpande/collapse respectivily, when the consumer opens or closes the component there is an exposed listener which'll trigger the respective callback to when the animation ends.

Fix: #35
See also: #41 (thanks @qijaz221 for your contribution)

* Update README with changelog

Remove blog comming soon  post since no artcile is going to be written 🔖

* Bump versions, set latest targetSdkVersion to 27

* update to implementation
  • Loading branch information
JoaquimLey authored Mar 3, 2018
1 parent d20d87f commit 0039129
Show file tree
Hide file tree
Showing 8 changed files with 597 additions and 521 deletions.
43 changes: 31 additions & 12 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,18 +1,13 @@
![AppIcon](../master/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png)
![AppIcon](../develop/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png)

# FabOptions
[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-FabOptions-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/4734)
[![MaterialUp](https://img.shields.io/badge/MaterialUp-FabOptions-blue.svg?style=flat)](https://material.uplabs.com/posts/faboptions)
[![Bintray](https://img.shields.io/badge/Bintray-v1.1.2-brightgreen.svg?style=flat)](https://bintray.com/leyopensource/FabOptions/com.github.joaquimley%3Afaboptions/1.1.2)
[![Bintray](https://img.shields.io/badge/Bintray-v1.2.0-brightgreen.svg?style=flat)](https://bintray.com/leyopensource/FabOptions/com.github.joaquimley%3Afaboptions/1.1.2)
![minSdkVersion](https://img.shields.io/badge/minSdkVersion-14-green.svg?style=true)
![compileSdkVersion](https://img.shields.io/badge/compileSdkVersion-25-green.svg?style=true)

### A multi-functional FAB component with customizable options.
### Read more on the blog post: < WIP-Soon >
![compileSdkVersion](https://img.shields.io/badge/compileSdkVersion-27-green.svg?style=true)

**Special thanks to [André Mion](https://github.com/andremion)** for the help provided on building this component.


Original concept by **Praveen Bisht** posted on [MaterialUp](https://www.uplabs.com/posts/options-floating-interaction), turned into code into open source library.


Expand All @@ -27,7 +22,7 @@ Android implementation
- Import gradle dependency:

dependencies {
compile 'com.github.joaquimley:faboptions:1.1.2'
compile 'com.github.joaquimley:faboptions:1.2.0'
}

- Add the component to your layout:
Expand All @@ -40,7 +35,6 @@ Android implementation
android:layout_gravity="bottom" />
```


- Define a `menu.xml` file with your buttons information **e.g.**

```xml
Expand Down Expand Up @@ -111,7 +105,7 @@ fabOptions.setFabColor(R.color.fabOptionsFabColor);
fabOptions.setBackgroundColor(R.color.fabOptionsBackgroundColor);
```

*Note: One is not depedent on the other, you can costomize individualy.*
*Note: One is not dependent on the other, you can set individually.*

**Changing button color**
```java
Expand All @@ -128,6 +122,32 @@ This will return a boolean value if it's able to change the color.
**Issues:**
Fell free to open a new issue. Follow the [ISSUE_TEMPLATE.MD](../development/ISSUE_TEMPLATE.MD)

## [Changelog](https://github.com/JoaquimLey/faboptions/releases)

**1.2.0**
- Ability to open and close the component with new exposed `open()`/`close()` methods. - #35
- Change the background color `setBackgroundColor()` through `@ColorInt` - #41

**1.1.2**
- Fix a bug where buttons were clickable even when hidden - #25

**1.1.1**
- Fix a resurfaced issue with related to Snackbar behaviour - #8

**1.1.0**
- Backport to API 14 - #21
- Change button color at runtime with the new #setButtonColor(int) - #22
- Bug fix on Menu not displayed correctly - #17
- Customize both background + fab colors. - #16

**1.0.2**
- Fix layout measure
- The component now reacts when a snackbar dismissed by user - #8


**1.0.1**
- Fix slight vertical offset on the button's icon - #2

## Contributing

Contributions are always welcome!
Expand All @@ -143,7 +163,6 @@ Follow the "fork-and-pull" Git workflow.

**Prevent** code-style related changes (at least run Ctrl+⌥+O, ⌥+⌘+L) before commiting.


### License

Copyright © 2016 Joaquim Ley
Expand Down
8 changes: 4 additions & 4 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 27
versionCode 11
versionName "1.1.2"
versionCode 12
versionName "1.2.0"
vectorDrawables.useSupportLibrary = true
}

Expand All @@ -39,8 +39,8 @@ android {
}

dependencies {
final DESIGN_LIBRARY_VERSION = '27.0.2'
final DESIGN_LIBRARY_VERSION = '27.1.0'

compile "com.android.support:design:$DESIGN_LIBRARY_VERSION"
}
//apply from: 'https://raw.githubusercontent.com/JoaquimLey/jcenter-config/master/deploy.gradle'
apply from: 'https://raw.githubusercontent.com/JoaquimLey/jcenter-config/master/deploy.gradle'
Loading

0 comments on commit 0039129

Please sign in to comment.