Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Readme changes #68

Merged
merged 2 commits into from
Mar 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
## What is it?
Spruce is a lightweight animation library that helps choreograph the animations on the screen. With so many different animation libraries out there, developers need to make sure that each view is animating at the appropriate time. Spruce can help designers request complex multi-view animations and not have the developers cringe at the prototype.

![left](https://github.com/willowtreeapps/spruce-android/blob/master/imgs/top-left-corner.gif)![recycler](https://github.com/willowtreeapps/spruce-android/blob/master/imgs/recycler-example.gif)![right](https://github.com/willowtreeapps/spruce-android/blob/master/imgs/bottom-right-corner.gif)
<p align="center">
<img src="https://github.com/willowtreeapps/spruce-android/blob/master/imgs/recycler-example.gif"/>
</p>

### Gradle
Add the following to your project's build.gradle file
Expand All @@ -20,7 +22,7 @@ dependencies {
```

## Documentation
For javadocs checkout [the documentation](https://willowtreeapps.github.io/spruce-android/docs/index.html) for more information.
For javadocs checkout [the documentation](https://willowtreeapps.github.io/spruce-android/) for more information.

## Basic Usage
```java
Expand All @@ -31,7 +33,7 @@ Animator spruceAnimator = new Spruce
.start();
```

Checkout [the builder documentation](https://willowtreeapps.github.io/spruce-android/docs/com/willowtreeapps/spruce/Spruce.SpruceBuilder.html) for more information.
Checkout [the builder documentation](https://willowtreeapps.github.io/spruce-android/com/willowtreeapps/spruce/Spruce.SpruceBuilder.html) for more information.

### Preparing for Animation
Spruce comes packed with `Animator` options within the `DefaultAnimations` class meant to make your life easier when calling an animation. Let's say we want to have your views fade in. For example, we would create an `animators = new Animator[] {}` and add `DefaultAnimations.fadeInAnimator(parentViewGroup, /*duration=*/800)` as an array item.
Expand All @@ -49,7 +51,7 @@ Animator spruceAnimator = new Spruce
.start();
```

Checkout [the builder documentation](https://willowtreeapps.github.io/spruce-android/docs/com/willowtreeapps/spruce/animation/DefaultAnimations.html) for more information.
Checkout [default animation documentation](https://willowtreeapps.github.io/spruce-android/com/willowtreeapps/spruce/animation/DefaultAnimations.html) for more information.

## Using a SortFunction
Luckily, Spruce comes with 8 `SortFunction` implementations with a wide open possibility to make more! Use the `SortFunction` to change the order in which views animate. Consider the following example:
Expand All @@ -69,7 +71,7 @@ Animator spruceAnimator = new Spruce
Definitely play around with the stock `SortFunction` implementations until you find the one that is perfect for you! Check out the example app if you want to get previews of what each `SortFunction` will look like.

### The Animators
The animations used in Spruce are produced by leveraging the `Animtor` class. You may provide your own custom animations by creating your own `Animator` and provide it to the as part of an `Animator[]` to `SpruceBuilder.animateWith(Animator... animators)`. For more information on using the `Animator` class please check out [![Android's Animator Documentation](https://developer.android.com/reference/android/animation/Animator.html)]()
The animations used in Spruce are produced by leveraging the `Animtor` class. You may provide your own custom animations by creating your own `Animator` and provide it to the as part of an `Animator[]` to `SpruceBuilder.animateWith(Animator... animators)`. For more information on using the `Animator` class please check out https://developer.android.com/reference/android/animation/Animator.html

### Standard Animation
The `DefaultAnimation` class provides simple `Animator` methods to apply the change `Animator` to the views. Use this class if you want to have a stock linear movement of the changes.
Expand Down Expand Up @@ -100,7 +102,7 @@ To make sure that developers can use Spruce out of the box, we included about 8
- `ContinousSort`
- `ContinuousWeightedSort`

Check out the docs [here](https://willowtreeapps.github.io/spruce-android/docs/com/willowtreeapps/spruce/sort/SortFunction.html) for more information
Check out the docs [here](https://willowtreeapps.github.io/spruce-android/com/willowtreeapps/spruce/sort/SortFunction.html) for more information

## Stock Animators
To make everybody's lives easier, the stock animators perform basic `View` animations that a lot of apps use today. Mix and match these animators to get the core motion you are looking for.
Expand Down