1
1
2
- [ ![ Android Arsenal] ( https://img.shields.io/badge/Android%20Arsenal-ShadowLayout-blue.svg?style=flat-square )] ( http://android-arsenal.com/details/1/3524 )
3
-
4
- ShadowLayout
2
+ PulseView
5
3
===================
6
4
7
- This library allows you to create a shadow effect for your layout based on your child .
5
+ Widget that generates pulsation relative to your icons .
8
6
9
- ![ ] ( https://lh4.googleusercontent.com/-2JB-2cEv8lk/Vx4FmHQhjOI/AAAAAAAACTA/nrRGFjcQXBsGiISYSZ5k8gUsVcRw5GSRQCL0B/w349-h552 -no/sl.png )
7
+ ![ ] ( https://lh4.googleusercontent.com/-mqVBaXK0XM0/VyhroJmmU7I/AAAAAAAACUs/OmfzeRZsYNQhNAdgFmKvFIU5XDiJ3-z3wCL0B/w401-h689 -no/pv.gif )
10
8
11
- U can check the sample app [ here] ( https://github.com/DevLight-Mobile-Agency/ShadowLayout /tree/master/app ) .
9
+ U can check the sample app [ here] ( https://github.com/DevLight-Mobile-Agency/PulseView /tree/master/app ) .
12
10
13
11
Download
14
12
------------
15
13
16
- You can download a .aar` from GitHub's [ releases page] ( https://github.com/DevLight-Mobile-Agency/ShadowLayout /releases ) .
14
+ You can download a .aar` from GitHub's [ releases page] ( https://github.com/DevLight-Mobile-Agency/PulseView /releases ) .
17
15
18
16
Or use Gradle jCenter:
19
17
@@ -25,21 +23,21 @@ dependencies {
25
23
url 'http://dl.bintray.com/gigamole/maven/'
26
24
}
27
25
}
28
- compile 'com.github.devlight.shadowlayout :library:+'
26
+ compile 'com.github.devlight.pulseview :library:+'
29
27
}
30
28
```
31
29
32
30
Or Gradle Maven Central:
33
31
34
32
``` groovy
35
- compile 'com.github.devlight.shadowlayout :library:1.0.0'
33
+ compile 'com.github.devlight.pulseview :library:1.0.0'
36
34
```
37
35
38
36
Or Maven:
39
37
40
38
``` groovy
41
39
<dependency>
42
- <groupId>com.github.devlight.shadowlayout </groupId>
40
+ <groupId>com.github.devlight.pulseview </groupId>
43
41
<artifactId>library</artifactId>
44
42
<version>1.0.0</version>
45
43
<type>aar</type>
@@ -49,77 +47,102 @@ Or Maven:
49
47
Android SDK Version
50
48
=========
51
49
52
- ShadowLayout requires a minimum sdk version of 11.
50
+ PulseView requires a minimum sdk version of 11.
53
51
54
52
Sample
55
53
========
56
-
57
- For ShadowLayout you can set such parameters as:
54
+
55
+ For PulseView you can set such parameters as:
58
56
59
- - shadowed :
57
+ - icon :
60
58
61
- allows you to handle shadow visibility .
59
+ at first you need to set icon for PulseView .
62
60
63
- - shadow distance :
61
+ - icon width and height :
64
62
65
- allows you to set distance of shadow.
66
-
67
- - shadow angle:
63
+ allows you to set size of the icon.
64
+
65
+ - pulse side measure:
66
+
67
+ allows you to set pulse side measure. Width or height of PulseView.
68
+
69
+ - pulse count:
68
70
69
- allows you to set shadow angle .
71
+ allows you to set pulse count .
70
72
71
- - shadow radius :
73
+ - pulse spawn period :
72
74
73
- allows you to set shadow radius .
75
+ allows you to set pulse spawn period .
74
76
75
- - shadow color :
77
+ - pulse alpha :
76
78
77
- allows you to set shadow color.
79
+ allows you to set alpha to pulse.
80
+
81
+ - pulse color:
82
+
83
+ allows you to set pulse color.
78
84
79
- Angle can only be positive and be in range from 0 to 360 degrees.
85
+ - interpolator:
86
+
87
+ allows you to set pulse interpolator. Choose yours.
80
88
81
- ShadowLayout automatically set padding for shadow space draw.
89
+ - listener:
90
+
91
+ allows you to set pulse listener. OnStart and OnFinish listeners.
92
+
93
+ In preview mode PulseView presents incorrectly cause of canvas can`t make scale in this mode.
82
94
83
95
Check out in code init:
84
96
85
97
``` java
86
- final ShadowLayout shadowLayout = (ShadowLayout ) findViewById(R . id. sl);
87
- shadowLayout. setIsShadowed(true );
88
- shadowLayout. setShadowAngle(45 );
89
- shadowLayout. setShadowRadius(20 );
90
- shadowLayout. setShadowDistance(30 );
91
- shadowLayout. setShadowColor(Color . DKGRAY );
98
+ final PulseView pulseView = (PulseView ) findViewById(R . id. pv);
99
+ pulseView. setPulseColor(Color . BLACK );
100
+ pulseView. setPulseCount(5 );
101
+ pulseView. setPulseMeasure(PulseView . PulseMeasure . WIDTH );
102
+ pulseView. setIconHeight(200 );
103
+ pulseView. setIconWidth(200 );
104
+ pulseView. setIconRes(R . drawable. icon);
105
+ pulseView. setPulseAlpha(70 );
106
+ pulseView. setInterpolator(new LinearInterpolator ());
107
+ pulseView. setPulseListener(new PulseView .PulseListener (... ));
108
+ ```
109
+
110
+ To start or finish pulse you need to call methods:
111
+
112
+ ``` java
113
+ pulseView. startPulse();
114
+ pulseView. finishPulse();
92
115
```
93
116
94
117
Other methods check out in sample.
95
118
96
119
And XML init:
97
120
98
121
``` xml
99
- <com .gigamole.samples.ShadowLayout
122
+ <com .gigamole.library.PulseView
123
+ android : id =" @+id/pv"
100
124
android : layout_width =" match_parent"
101
- android : layout_height =" wrap_content "
102
- app : sl_shadowed = " true "
103
- app : sl_shadow_angle = " 45 "
104
- app : sl_shadow_radius = " 20dp "
105
- app : sl_shadow_distance = " 30dp "
106
- app : sl_shadow_color = " #000 " >
107
-
108
- <!-- Set your child`s -->
109
-
110
- </ com .gigamole.samples.ShadowLayout >
125
+ android : layout_height =" match_parent "
126
+ app : pv_icon = " @drawable/icon "
127
+ app : pv_alpha = " 70 "
128
+ app : pv_color = " #eae761 "
129
+ app : pv_count = " 8 "
130
+ app : pv_measure = " height "
131
+ app : pv_icon_width = " 168dp "
132
+ app : pv_icon_height = " 194dp "
133
+ app : pv_spawn_period = " 700 "
134
+ app : pv_interpolator = " @android:anim/linear_interpolator " / >
111
135
```
112
136
113
137
Getting Help
114
138
======
115
139
116
- To report a specific problem or feature request, [ open a new issue on Github] ( https://github.com/DevLight-Mobile-Agency/ShadowLayout /issues/new ) .
140
+ To report a specific problem or feature request, [ open a new issue on Github] ( https://github.com/DevLight-Mobile-Agency/PulseView /issues/new ) .
117
141
118
142
License
119
143
======
120
144
121
- Apache 2.0 and MIT. See [ LICENSE] ( https://github.com/DevLight-Mobile-Agency/ShadowLayout/blob/master/LICENSE.txt ) file for details.
122
-
145
+ Apache 2.0 and MIT. See [ LICENSE] ( https://github.com/DevLight-Mobile-Agency/PulseView/blob/master/LICENSE.txt ) file for details.
123
146
124
147
Author
125
148
=======
0 commit comments