Skip to content

Commit

Permalink
Release version 2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
skydoves committed Jan 10, 2020
1 parent e2d1554 commit 5b63909
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 36 deletions.
3 changes: 1 addition & 2 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
github: skydoves
ko_fi: skydoves
custom: https://www.buymeacoffee.com/skydoves
custom: ["https://www.paypal.me/skydoves", "https://www.buymeacoffee.com/skydoves"]
67 changes: 42 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,23 @@
# ElasticViews
![license](https://img.shields.io/badge/license-MIT%20License-blue.svg)
[![API](https://img.shields.io/badge/API-15%2B-brightgreen.svg?style=flat)](https://android-arsenal.com/api?level=15)
[![Build Status](https://travis-ci.org/skydoves/ElasticViews.svg?branch=master)](https://travis-ci.org/skydoves/ElasticViews)
[![Android Weekly](https://img.shields.io/badge/Android%20Weekly-%23336-orange.svg)](https://androidweekly.net/issues/issue-336)
[![Javadoc](https://img.shields.io/badge/Javadoc-ElasticViews-yellow)](https://skydoves.github.io/libraries/elasticviews/javadoc/elasticviews/com.skydoves.elasticviews/index.html)
<br>

An easy way to implement the elastic touch effect for Android.
<p align="center">
<a href="https://opensource.org/licenses/MIT"><img alt="License" src="https://img.shields.io/badge/license-MIT%20License-blue.svg"/></a>
<a href="https://android-arsenal.com/api?level=15"><img alt="API" src="https://img.shields.io/badge/API-15%2B-brightgreen.svg?style=flat"/></a>
<a href="https://travis-ci.org/skydoves/ElasticViews"><img alt="Build Status" src="https://travis-ci.org/skydoves/ElasticViews.svg?branch=master"/></a>
<a href="https://androidweekly.net/issues/issue-336"><img alt="Android Weekly" src="https://img.shields.io/badge/Android%20Weekly-%23336-orange.svg"/></a>
<a href="https://skydoves.github.io/libraries/elasticviews/javadoc/elasticviews/com.skydoves.elasticviews/index.html"><img alt="Javadoc" src="https://img.shields.io/badge/Javadoc-ElasticViews-yellow"/></a>
</p>

<p align="center">
✨ An easy way to implement an elastic touch effect for Android.
</p>

<p align="center">
<img src="https://user-images.githubusercontent.com/24237865/72123075-73943500-33a3-11ea-883f-9009de998788.gif" width="32%"/>
<img src="https://user-images.githubusercontent.com/24237865/72123076-73943500-33a3-11ea-92ef-0924cd0b902e.gif" width="32%"/>
</p>


![gif0](https://user-images.githubusercontent.com/24237865/48674497-53e2f180-eb90-11e8-86fb-476f841b3e32.gif)
![gif1](https://user-images.githubusercontent.com/24237865/48674498-53e2f180-eb90-11e8-8313-aa94b34a40d2.gif)

## Including in your project
[![Download](https://api.bintray.com/packages/devmagician/maven/elasticviews/images/download.svg)](https://bintray.com/devmagician/maven/elasticviews/_latestVersion)
Expand All @@ -23,7 +31,7 @@ repositories {
}
dependencies {
implementation "com.github.skydoves:elasticviews:2.0.6"
implementation "com.github.skydoves:elasticviews:2.0.7"
}
```

Expand All @@ -38,7 +46,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto"
```

#### OnClick Method
All of ElasticViews should be set OnClickListener or OnClick Method, etc. If not, nothing happens.
All of ElasticViews should be set `OnClickListener` or OnClick method. If not, nothing happens.
```java
ElasticButton elasticButton = (ElasticButton)findViewById(R.id.elasticbutton);
elasticButton.setOnClickListener(new View.OnClickListener() {
Expand All @@ -49,14 +57,6 @@ elasticButton.setOnClickListener(new View.OnClickListener() {
});
```

or use butterknife
```java
@OnClick(R.id.elasticbutton)
public void onClick(View v) {
// do something
}
```

### ElasticButton
```gradle
<com.skydoves.elasticviews.ElasticButton
Expand All @@ -80,6 +80,7 @@ public void onClick(View v) {
android:textColor="@android:color/white"
android:textStyle="bold"
app:checkButton_cornerRadius="4dp"
app:checkButton_alpha="0.7"
app:checkButton_duration="400"
app:checkButton_scale="0.9" />
```
Expand Down Expand Up @@ -108,6 +109,22 @@ public void onClick(View v) {
app:fabutton_scale="0.85" />
```

### ElasticCardView
```gradle
<com.skydoves.elasticviews.ElasticCardView
android:layout_width="match_parent"
android:layout_height="120dp"
app:cardCornerRadius="8dp"
app:cardElevation="12dp"
app:cardBackgroundColor="@color/background"
app:cardView_duration="250"
app:cardView_scale="0.8" >
...
</com.skydoves.elasticviews.ElasticCardView>
```

### ElasticLayout
ElasticLayout gives elastic animation to all child views.

Expand Down Expand Up @@ -146,6 +163,8 @@ new ElasticAnimation(clickedView).setScaleX(0.9f).setScaleY(0.9f).setDuration(40
.setOnFinishListener(onFinishListener).doAction();
```

<img src="https://user-images.githubusercontent.com/24237865/72123077-742ccb80-33a3-11ea-9262-c4977983247e.gif" align="right" width="30%">

#### ViewPropertyAnimatorListener
we can set `ViewPropertyAnimatorListener` using `setListener` method and detect animation's status.
```java
Expand Down Expand Up @@ -227,15 +246,13 @@ private class ListViewItemClickListener implements AdapterView.OnItemClickListen
};
```

#### ElasticAnimation Preview
![gif2](https://cloud.githubusercontent.com/assets/24237865/22189011/14bc94aa-e15d-11e6-9078-2dfc9d97ef87.gif)

## Find this library useful? :heart:
Support it by joining __[stargazers](https://github.com/skydoves/ElasticViews/stargazers)__ for this repository. :star:

## Supports :coffee:
If you feel like support me a coffee for my efforts, I would greatly appreciate it. <br><br>
<a href="https://www.buymeacoffee.com/skydoves" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/purple_img.png" alt="Buy Me A Coffee" style="height: auto !important;width: auto !important;" ></a>
## Sponsor :coffee:
If you feel like to sponsor me a coffee for my efforts, I would greatly appreciate it. <br><br>

<a href="https://www.buymeacoffee.com/skydoves" target="_blank"><img src="https://skydoves.github.io/sponsor.png" alt="Buy Me A Coffee" style="height: 51px !important;width: 217px !important;" ></a>

# License
```xml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ class ExampleActivity0 : AppCompatActivity() {

fun imageViews(v: View) {
when (v.id) {
R.id.example0_ibtn_q_timeset01 -> Snackbar.make(v, "Alarm goes off between start-time and end-time", 200)
R.id.example0_ibtn_q_timeset01 -> Snackbar.make(v,
"Alarm goes off between start-time and end-time", 200)
.setActionTextColor(Color.WHITE)
.show()
R.id.example0_ibtn_q_timeset02 -> Snackbar.make(v, "This is time interval description", 200)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ class ExampleActivity1 : AppCompatActivity() {
private val data: ArrayList<ListViewItem>
) : BaseAdapter() {

private val inflater: LayoutInflater = context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
private val inflater: LayoutInflater =
context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater

override fun getCount(): Int {
return data.size
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,20 @@ class ExampleActivity2 : AppCompatActivity() {
}

fun views(v: View) {
when {
v.id == R.id.example2_view3 -> ElasticAnimation(v)
when (v.id) {
R.id.example2_view3 -> ElasticAnimation(v)
.setScaleX(0.85f)
.setScaleY(0.85f)
.setDuration(500)
.setOnFinishListener {
// Do something after duration time
}
.doAction()
v.id == R.id.example2_imv -> Snackbar.make(v, "This is ElasticImageView", 200).setActionTextColor(Color.WHITE).show()
v.id == R.id.example2_textView0 -> ElasticAnimation(v).setScaleX(0.75f).setScaleY(0.75f).setDuration(500).doAction()
v.id == R.id.example2_fab -> Snackbar.make(v, "This is ElasticFloatActionButton", 200)
R.id.example2_imv -> Snackbar.make(v, "This is ElasticImageView", 200).setActionTextColor(
Color.WHITE).show()
R.id.example2_textView0 -> ElasticAnimation(v).setScaleX(0.75f).setScaleY(0.75f).setDuration(
500).doAction()
R.id.example2_fab -> Snackbar.make(v, "This is ElasticFloatActionButton", 200)
.setActionTextColor(Color.WHITE)
.show()
}
Expand Down
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ext.versions = [
minSdk : 16,
compileSdk : 29,
versionCode : 20,
versionName : '2.0.6',
versionCode : 21,
versionName : '2.0.7',

gradleBuildTool : '3.5.3',
spotlessGradle : '3.26.0',
Expand Down

0 comments on commit 5b63909

Please sign in to comment.