@@ -17,124 +17,129 @@ You can download a .aar` from GitHub's [releases page](https://github.com/GIGAMO
1717
1818Or use Gradle jCenter:
1919
20- dependencies {
21- repositories {
22- mavenCentral()
23- maven {
24- url 'http://dl.bintray.com/gigamole/ maven/'
25- }
20+ ``` groovy
21+ dependencies {
22+ repositories {
23+ mavenCentral()
24+ maven {
25+ url 'http://dl.bintray.com/gigamole/maven/'
2626 }
27- compile 'com.github.gigamole.arcprogressstackview:library:+'
2827 }
28+ compile 'com.github.gigamole.arcprogressstackview:library:+'
29+ }
30+ ```
2931
3032Or Gradle Maven Central:
3133
32- compile 'com.github.gigamole.arcprogressstackview:library:1.0.0'
34+ ``` groovy
35+ compile 'com.github.gigamole.arcprogressstackview:library:1.0.0'
36+ ```
3337
3438Or Maven:
35-
36- <dependency>
37- <groupId>com.github.gigamole.arcprogressstackview</groupId>
38- <artifactId>library</artifactId>
39- <version>1.0.0</version>
40- <type>aar</type>
41- </dependency>
39+ ``` xml
40+ <dependency >
41+ <groupId >com.github.gigamole.arcprogressstackview</groupId >
42+ <artifactId >library</artifactId >
43+ <version >1.0.0</version >
44+ <type >aar</type >
45+ </dependency >
46+ ```
4247
4348Android SDK Version
4449=========
45- ArcProgressStackView requires a minimum sdk version of 8, but if you want animation and shadow support it requires a minimum sdk version of 11.
50+ ArcProgressStackView requires a minimum sdk version of 8, but if you want animation and shadow support it requires a minimum sdk version of 11.
4651
4752Sample
4853========
4954
5055For APSV you can set such parameters as:
51-
56+
5257 - models:
53-
58+
5459 allows you to set APSV models, where you set title, progress and colors. Can be set up only via code.
5560
5661 - animation:
57-
62+
5863 allows you to animate progress with func call or with touch event.
59-
64+
6065 - shadow:
61-
66+
6267 allows you to add shadow to your progress models, but remember, the shadow need LAYER_TYPE_SOFTWARE, so it decrease FPS.
63-
68+
6469 - round corners:
65-
70+
6671 allows you to set round corners to models.
67-
72+
6873 - drag/seek:
69-
74+
7075 allows you to make your progress model seek like.
7176
7277 - typeface:
73-
78+
7479 allows you to set custom typeface.
75-
80+
7681 - text color:
77-
82+
7883 allows you to set text(title and progress indicator) color.
79-
84+
8085 - shadow distance:
81-
86+
8287 allows you to set shadow distance.
83-
88+
8489 - shadow angle:
85-
90+
8691 allows you to set shadow angle.
87-
92+
8893 - shadow radius:
89-
94+
9095 allows you to set shadow radius.
91-
96+
9297 - shadow color:
93-
98+
9499 allows you to set shadow color.
95100
96101 - animation duration:
97-
102+
98103 allows you to set animation duration.
99-
104+
100105 - animation listener:
101-
106+
102107 allows you to set animation listener.
103-
108+
104109 - interpolator:
105-
110+
106111 allows you to set interpolator to animation.
107-
112+
108113 - draw width:
109-
114+
110115 allows you to set draw width in fraction mode(e.g. 55%) or dimension mode.
111-
116+
112117 - model offset:
113-
118+
114119 allows you to set model offset(positive or negative).
115-
120+
116121 - model background:
117-
122+
118123 allows you to set model background track from start angle to sweep angle.
119-
124+
120125 - start angle:
121-
126+
122127 allows you to set start angle of models.
123-
128+
124129 - sweep angle:
125-
130+
126131 allows you to set sweep angle of models.
127-
132+
128133 - progress indicator orientation:
129-
134+
130135 allows you to set progress indicator orientation.
131-
136+
132137 - preview colors:
133-
138+
134139 allows you to set preview colors, which generate count of models equals to count of colors.
135-
140+
136141 - preview background:
137-
142+
138143 allows you to set models background preview color.
139144
140145All angle variables can only be positive and be in range from 0 to 360 degrees.
@@ -143,43 +148,47 @@ The size of view automatically set up in square mode.
143148
144149Check out in code init:
145150
146- final ArrayList<ArcProgressStackView.Model> models = new ArrayList<>();
147- models.add(new ArcProgressStackView.Model("Circle", 25, bgColors[0], mStartColors[0]));
148- models.add(new ArcProgressStackView.Model("Progress", 50, bgColors[1], mStartColors[1]));
149- models.add(new ArcProgressStackView.Model("Stack", 75, bgColors[2], mStartColors[2]));
150- models.add(new ArcProgressStackView.Model("View", 100, bgColors[3], mStartColors[3]));
151-
152- final ArcProgressStackView arcProgressStackView = (ArcProgressStackView) findViewById(R.id.apsv);
153- arcProgressStackView.setModels(models);
154-
151+ ``` java
152+ final ArrayList<ArcProgressStackView . Model > models = new ArrayList<> ();
153+ models. add(new ArcProgressStackView .Model (" Circle" , 25 , bgColors[0 ], mStartColors[0 ]));
154+ models. add(new ArcProgressStackView .Model (" Progress" , 50 , bgColors[1 ], mStartColors[1 ]));
155+ models. add(new ArcProgressStackView .Model (" Stack" , 75 , bgColors[2 ], mStartColors[2 ]));
156+ models. add(new ArcProgressStackView .Model (" View" , 100 , bgColors[3 ], mStartColors[3 ]));
157+
158+ final ArcProgressStackView arcProgressStackView = (ArcProgressStackView ) findViewById(R . id. apsv);
159+ arcProgressStackView. setModels(models);
160+ ```
161+
155162Other methods check out in sample.
156163
157164And XML init:
158165
159- <com.gigamole.samples.ArcProgressStackView
160- android:id="@+id/apsv"
161- android:layout_width="match_parent"
162- android:layout_height="match_parent"
163- app:apsv_rounded="true"
164- app:apsv_shadowed="true"
165- app:apsv_animated="true"
166- app:apsv_dragged="true"
167- app:apsv_typeface="fonts/agency.ttf"
168- app:apsv_text_color="#fff"
169- app:apsv_shadow_distance="5dp"
170- app:apsv_shadow_angle="90"
171- app:apsv_shadow_radius="10dp"
172- app:apsv_shadow_color="#000"
173- app:apsv_animation_duration="1000"
174- app:apsv_interpolator="@android:anim/bounce_interpolator"
175- app:apsv_draw_width="75%"
176- app:apsv_model_offset="5dp"
177- app:apsv_model_bg_enabled="true"
178- app:apsv_start_angle="270"
179- app:apsv_sweep_angle="360"
180- app:apsv_indicator_orientation="vertical"
181- app:apsv_preview_colors="@array/default_preview"
182- app:apsv_preview_bg="#ccc"/>
166+ ``` xml
167+ <com .gigamole.samples.ArcProgressStackView
168+ android : id =" @+id/apsv"
169+ android : layout_width =" match_parent"
170+ android : layout_height =" match_parent"
171+ app : apsv_rounded =" true"
172+ app : apsv_shadowed =" true"
173+ app : apsv_animated =" true"
174+ app : apsv_dragged =" true"
175+ app : apsv_typeface =" fonts/agency.ttf"
176+ app : apsv_text_color =" #fff"
177+ app : apsv_shadow_distance =" 5dp"
178+ app : apsv_shadow_angle =" 90"
179+ app : apsv_shadow_radius =" 10dp"
180+ app : apsv_shadow_color =" #000"
181+ app : apsv_animation_duration =" 1000"
182+ app : apsv_interpolator =" @android:anim/bounce_interpolator"
183+ app : apsv_draw_width =" 75%"
184+ app : apsv_model_offset =" 5dp"
185+ app : apsv_model_bg_enabled =" true"
186+ app : apsv_start_angle =" 270"
187+ app : apsv_sweep_angle =" 360"
188+ app : apsv_indicator_orientation =" vertical"
189+ app : apsv_preview_colors =" @array/default_preview"
190+ app : apsv_preview_bg =" #ccc" />
191+ ```
183192
184193Getting Help
185194======
@@ -199,4 +208,4 @@ Inspiration
199208Author
200209=======
201210
202- Basil Miller - @gigamole
211+ Basil Miller - @gigamole
0 commit comments