@@ -36,13 +36,17 @@ In your Android layout file add:
3636 android : id =" @+id/scrolling_background"
3737 android : layout_width =" match_parent"
3838 android : layout_height =" wrap_content"
39- scrolling_image_view : speed =" 1dp"
39+ scrolling_image_view : speed =" 60dp"
40+ scrolling_image_view : contiguous =" false"
4041 scrolling_image_view : source =" @drawable/scrolling_background" />
4142```
4243
43- There are two attributes for the ` ScrollingImageView ` namely ` speed ` and ` source ` .
44- * ` speed ` is the number of ` dp ` 's to move the bitmap per second (may be a negative number)
45- * ` source ` is the drawable to paint
44+ There are three attributes for the ` ScrollingImageView ` :
45+ * ` speed ` is the number of ` dp ` 's to move the drawable per second (may be a negative number)
46+ * ` source ` is the drawable to paint. May refer to an array of drawables
47+ * ` contiguous ` When source is an array of drawables, ` contiguous ` determines their ordering.
48+
49+ false (default) for random ordering, true for the same order as in the array
4650
4751Don't forget to add the namespace to your root XML element
4852``` xml
@@ -67,14 +71,14 @@ In order to achieve a parallax effect, you can stack multiple `ScrollingImageVie
6771 android : id =" @+id/scrolling_background"
6872 android : layout_width =" match_parent"
6973 android : layout_height =" wrap_content"
70- scrolling_image_view : speed =" 1dp "
74+ scrolling_image_view : speed =" 60dp "
7175 scrolling_image_view : source =" @drawable/scrolling_background" />
7276
7377 <com .q42.android.scrollingimageview.ScrollingImageView
7478 android : id =" @+id/scrolling_foreground"
7579 android : layout_width =" match_parent"
7680 android : layout_height =" wrap_content"
77- scrolling_image_view : speed =" 2.5dp "
81+ scrolling_image_view : speed =" 150dp "
7882 scrolling_image_view : source =" @drawable/scrolling_foreground" />
7983</FrameLayout >
8084```
0 commit comments