Skip to content

Commit

Permalink
Use PorterDuffColorFilter in example in README (#243)
Browse files Browse the repository at this point in the history
The example now illustrates how the color can be changed without having to implement a ColorFilter (which is non trivial as native code is involved)
  • Loading branch information
alexbirkett authored and gpeal committed Apr 8, 2017
1 parent fb40cab commit a9f92cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ animationView.cancelAnimation();
You can add a color filter to the whole animation, a specific layer, or specific content within a layer:
```java
// Any class that conforms to the ColorFilter interface
final SimpleColorFilter colorFilter = new SimpleColorFilter(Color.RED);
final PorterDuffColorFilter colorFilter = new PorterDuffColorFilter(Color.RED, PorterDuff.Mode.LIGHTEN);

// Adding a color filter to the whole view
animationView.addColorFilter(colorFilter);
Expand Down

0 comments on commit a9f92cb

Please sign in to comment.