Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmytrodanylyk committed Oct 12, 2015
2 parents 8b013c1 + ceae91b commit 98a4986
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,29 @@
### Description

Android Button which can morph from one shape to another.
Android button which can morph from one shape to another.

![](screenshots/intro1.gif)
<img src="screenshots/intro1.gif" width="380" />

![](screenshots/intro2.gif)
You can easily extend `MorphingButton` to add your own behaviour. Below is example of `LinearProgressButton` which extends `MorphingButton`.

<img src="screenshots/intro2.gif" width="380" />

### Sample code

```java
// sample demonstrate how to morph button to green circle with icon
MorphingButton btnMorph = (MorphingButton) findViewById(R.id.btnMorph);
// inside on click event
MorphingButton.Params circle = MorphingButton.Params.create()
.duration(500)
.cornerRadius(dimen(R.dimen.mb_height_56)) // 56 dp
.width(dimen(R.dimen.mb_height_56)) // 56 dp
.height(dimen(R.dimen.mb_height_56)) // 56 dp
.color(color(R.color.green)) // normal state color
.colorPressed(color(R.color.green_dark)) // pressed state color
.icon(R.drawable.ic_done); // icon
btnMorph.morph(circle);
```

### Wiki

Expand All @@ -27,7 +46,7 @@ dependencies {
}
```

License
### License

```
The MIT License (MIT)
Expand All @@ -51,4 +70,4 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
```
```

0 comments on commit 98a4986

Please sign in to comment.