Skip to content
This repository was archived by the owner on Feb 8, 2022. It is now read-only.

Commit 5abe2e5

Browse files
author
florent champigny
committed
updated README
1 parent 250898a commit 5abe2e5

1 file changed

Lines changed: 14 additions & 58 deletions

File tree

README.md

Lines changed: 14 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -134,55 +134,22 @@ ViewAnimator
134134
.start();
135135
```
136136

137-
<<<<<<< HEAD
138137
Enhanced animations (Thanks [AndroidViewAnimators](https://github.com/daimajia/AndroidViewAnimators),[NiftyDialogEffects](https://github.com/sd6352051/NiftyDialogEffects))
139138
![screenshots](/screenshots/enhanced.gif)
140139
```java
141-
int random = new Random().nextInt(10);
142-
final ViewGroup viewGroup = (ViewGroup) v.getParent();
143-
final ImageView imageView = new ImageView(v.getContext());
144-
imageView.setImageResource(R.mipmap.ic_launcher);
145-
viewGroup.addView(imageView);
146-
AnimationBuilder builder;
147-
switch (random) {
148-
case 0:
149-
builder = ViewAnimator.animate(imageView).shake().interpolator(new LinearInterpolator());
150-
break;
151-
case 1:
152-
builder = ViewAnimator.animate(imageView).bounceIn().interpolator(new BounceInterpolator());
153-
break;
154-
case 2:
155-
builder = ViewAnimator.animate(imageView).flash().repeatCount(4);
156-
break;
157-
case 3:
158-
builder = ViewAnimator.animate(imageView).flipHorizontal();
159-
break;
160-
case 4:
161-
builder = ViewAnimator.animate(imageView).wave().duration(5000);
162-
break;
163-
case 5:
164-
builder = ViewAnimator.animate(imageView).tada();
165-
break;
166-
case 6:
167-
builder = ViewAnimator.animate(imageView).pulse();
168-
break;
169-
case 7:
170-
builder = ViewAnimator.animate(imageView).standUp();
171-
break;
172-
case 8:
173-
builder = ViewAnimator.animate(imageView).swing();
174-
break;
175-
default:
176-
builder = ViewAnimator.animate(imageView).wobble();
177-
break;
178-
}
179-
builder.onStop(new AnimationListener.Stop() {
180-
@Override
181-
public void onStop() {
182-
viewGroup.removeView(imageView);
183-
}
184-
}).start();
140+
.shake().interpolator(new LinearInterpolator());
141+
.bounceIn().interpolator(new BounceInterpolator());
142+
.flash().repeatCount(4);
143+
.flipHorizontal();
144+
.wave().duration(5000);
145+
.tada();
146+
.pulse();
147+
.standUp();
148+
.swing();
149+
.wobble();
185150
```
151+
...
152+
[![Preview](/EnhancedAnimations.gif)
186153

187154
Path animations (Read http://blog.csdn.net/tianjian4592/article/details/47067161)
188155
```java
@@ -208,20 +175,9 @@ SVG path animations (Read http://www.w3school.com.cn/svg/svg_path.asp)
208175
</svg>
209176
```
210177
```java
211-
final String SVG_PATH = "M 42.266949,70.444915 C 87.351695,30.995763 104.25847,28.177966 104.25847,28.177966 l 87.3517,36.631356 8.45339,14.088983 L 166.25,104.25847 50.720339,140.88983 c 0,0 -45.0847458,180.33898 -39.449153,194.42797 5.635594,14.08898 67.627119,183.15678 67.627119,183.15678 l 16.90678,81.7161 c 0,0 98.622885,19.72457 115.529665,22.54237 16.90678,2.8178 70.44491,-22.54237 78.8983,-33.81356 8.45339,-11.27118 76.08051,-107.07627 33.81356,-126.80085 -42.26695,-19.72457 -132.43644,-56.35593 -132.43644,-56.35593 0,0 -33.81356,-73.26271 -19.72458,-73.26271 14.08899,0 132.43644,73.26271 138.07204,33.81356 5.63559,-39.44915 19.72457,-169.0678 19.72457,-169.0678 0,0 28.17797,-25.36017 -28.17796,-19.72457 -56.35593,5.63559 -95.80509,11.27118 -95.80509,11.27118 l 42.26695,-87.35169 8.45339,-28.177968";
212-
ViewAnimator.animate(view).svgPath(SVG_PATH).repeatCount(3).start();
213-
```
214-
=======
215-
Enhanced animations (Thanks https://github.com/daimajia/AndroidViewAnimations)
216-
```java
217-
ViewAnimator.animate(view).wave().duration(3000).start();
178+
final String SVG_PATH = "M 42.266949,70.444915 C 87.351695,30.995763 104.25847,28.177966 104.25847,28.177966 l 87.3517,36.631356 8.45339,14.088983 L 166.25,104.25847 50.720339,140.88983 c 0,0 -45.0847458,180.33898 -39.449153,194.42797 5.635594,14.08898 67.627119,183.15678 67.627119,183.15678 l 16.90678,81.7161 c 0,0 98.622885,19.72457 115.529665,22.54237 16.90678,2.8178 70.44491,-22.54237 78.8983,-33.81356 8.45339,-11.27118 76.08051,-107.07627 33.81356,-126.80085 -42.26695,-19.72457 -132.43644,-56.35593 -132.43644,-56.35593 0,0 -33.81356,-73.26271 -19.72458,-73.26271 14.08899,0 132.43644,73.26271 138.07204,33.81356 5.63559,-39.44915 19.72457,-169.0678 19.72457,-169.0678 0,0 28.17797,-25.36017 -28.17796,-19.72457 -56.35593,5.63559 -95.80509,11.27118 -95.80509,11.27118 l 42.26695,-87.35169 8.45339,-28.177968";
179+
ViewAnimator.animate(view).svgPath(SVG_PATH).repeatCount(3).start();
218180
```
219-
```java
220-
ViewAnimator.animate(view).shake().duration(3000).start();
221-
```
222-
...
223-
[![Preview](/EnhancedAnimations.gif)
224-
>>>>>>> master
225181

226182
#Download
227183

0 commit comments

Comments
 (0)