【开源】discrollview子元素会呈现不同动画效果的scrollView

discrollview子元素会呈现不同动画效果的scrollView

 

使用说明:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<com.flavienlaurent.discrollview.lib.DiscrollView
    xmlns:discrollve="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    <com.flavienlaurent.discrollview.lib.DiscrollViewContent
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <TextView
            android:layout_width="match_parent"
            android:layout_height="600dp"
            android:background="@android:color/white"
            android:textColor="@android:color/black"
            android:padding="25dp"
            android:textSize="72sp"
            android:gravity="center"
            android:fontFamily="serif"
            android:text="Do you love cheese?" />
        <View
            android:layout_width="match_parent"
            android:layout_height="200dp"
            android:background="#007788"
            discrollve:discrollve_alpha="true"
            discrollve:discrollve_threshold="0.3" />
        <ImageView
            android:layout_width="200dp"
            android:layout_height="120dp"
            discrollve:discrollve_alpha="true"
            discrollve:discrollve_translation="fromLeft|fromBottom"
            android:src="@drawable/cheese1" />
        <View
            android:layout_width="match_parent"
            android:layout_height="200dp"
            discrollve:discrollve_fromColor="#88EE66"
            discrollve:discrollve_toColor="#000000" />
        <ImageView
            android:layout_width="220dp"
            android:layout_height="110dp"
            android:layout_gravity="right"
            android:src="@drawable/cheese2"
            discrollve:discrollve_translation="fromRight" />
        <TextView
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="20dp"
            android:fontFamily="serif"
            android:gravity="center"
            android:text="When the cheese comes out everybody's happy pecorino red leicester"
            android:textSize="18sp"
            discrollve:discrollve_alpha="true"
            discrollve:discrollve_translation="fromBottom" />
        <ImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="20dp"
            android:layout_gravity="center"
            android:src="@drawable/ilovecheese_heart"
            discrollve:discrollve_scaleX="true"
            discrollve:discrollve_scaleY="true"  />
    </com.flavienlaurent.discrollview.lib.DiscrollViewContent>
</com.flavienlaurent.discrollview.lib.DiscrollView>

posted on 2015-03-25 17:37  wasdchenhao  阅读(407)  评论(0)    收藏  举报

导航