|
22 | 22 | [](https://jitpack.io/#skydoves/ElasticViews) |
23 | 23 |
|
24 | 24 | ####Gradle |
25 | | -Addbelowcodes to your**root**`build.gradle` file (not your module build.gradle file). |
| 25 | +Add codes below to your**root**`build.gradle` file (not your module build.gradle file). |
26 | 26 | ```gradle |
27 | 27 | allprojects { |
28 | 28 | repositories { |
@@ -56,7 +56,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" |
56 | 56 | ``` |
57 | 57 |
|
58 | 58 | ####OnClick Method |
59 | | -All of ElasticViews should be set`OnClickListener` orOnClick method. If not, nothing happens. |
| 59 | +All of ElasticViews should be set`OnClickListener` or`onClick` method. If not, nothing happens. |
60 | 60 | ```java |
61 | 61 | ElasticButton elasticButton= (ElasticButton)findViewById(R.id.elasticbutton); |
62 | 62 | elasticButton.setOnClickListener(newView.OnClickListener() { |
@@ -107,7 +107,7 @@ elasticButton.setOnClickListener(new View.OnClickListener() { |
107 | 107 | app:imageView_duration="300" /> |
108 | 108 | ``` |
109 | 109 |
|
110 | | -###ElasticFloatingButton |
| 110 | +###ElasticFloatingActionButton |
111 | 111 | ```gradle |
112 | 112 | <com.skydoves.elasticviews.ElasticFloatingActionButton |
113 | 113 | android:layout_width="64dp" |
@@ -214,9 +214,9 @@ elasticAnimation(this) { |
214 | 214 | setScaleX(scale) |
215 | 215 | setScaleY(scale) |
216 | 216 | setOnFinishListener(object:ElasticFinishListener { |
217 | | -overridefunonFinished() { |
218 | | - onClick() |
219 | | - } |
| 217 | +overridefunonFinished() { |
| 218 | +onClick() |
| 219 | +} |
220 | 220 | }) |
221 | 221 | }.doAction() |
222 | 222 | ``` |
@@ -244,12 +244,12 @@ So also we can implement animation on listView's items like below. |
244 | 244 | privateclassListViewItemClickListenerimplementsAdapterView.OnItemClickListener { |
245 | 245 | @Override |
246 | 246 | publicvoidonItemClick(AdapterView<?>adapterView,ViewclickedView,finalintpos,longid) { |
247 | | -newElasticAnimation(clickedView).setScaleX(0.9f).setScaleY(0.9f).setDuration(400) |
| 247 | +newElasticAnimation(clickedView).setScaleX(0.9f).setScaleY(0.9f).setDuration(400) |
248 | 248 | .setOnFinishListener(newElasticFinishListener() { |
249 | 249 | @Override |
250 | 250 | publicvoidonFinished() { |
251 | | -//Do something after duration time |
252 | | -Toast.makeText(getBaseContext(),"ListViewItem"+ pos,Toast.LENGTH_SHORT).show(); |
| 251 | +//Do something after duration time |
| 252 | +Toast.makeText(getBaseContext(),"ListViewItem"+ pos,Toast.LENGTH_SHORT).show(); |
253 | 253 | } |
254 | 254 | }).doAction(); |
255 | 255 | } |
|