Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
tsuijten committed Aug 7, 2015
1 parent 01381b2 commit 2171dd9
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,15 @@ repositories {
*Step 2.* Add the dependency in the form
```gradle
dependencies {
compile 'com.github.Q42:AndroidScrollingImageView:1.0'
compile 'com.github.Q42:AndroidScrollingImageView:1.1'
}
```

## Sample app
Please see the sample app for some examples

![Sample App](https://raw.githubusercontent.com/Q42/AndroidScrollingImageView/master/sample_app.png)

## Usage
In your Android layout file add:
```xml
Expand All @@ -31,6 +36,10 @@ In your Android layout file add:
scrolling_image_view:src="@drawable/scrolling_background" />
```

There are two attributes for the `ScrollingImageView` namely `speed` and `src`.
* `speed` is the number of `dp`'s to move the bitmap on each animation frame (may be a negative number)
* `src` is the drawable to paint (**must be a bitmap!**)

Don't forget to add the namespace to your root XLM element
```xml
xmlns:scrolling_image_view="http://schemas.android.com/apk/res-auto"
Expand Down

0 comments on commit 2171dd9

Please sign in to comment.