├── .gitignore
├── LICENCE
├── README.md
├── app
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── neo
│ │ └── arcchartviewdemo
│ │ └── ExampleInstrumentedTest.kt
│ ├── main
│ ├── AndroidManifest.xml
│ ├── ic_launcher-web.png
│ ├── java
│ │ └── com
│ │ │ └── neo
│ │ │ └── arcchartviewdemo
│ │ │ └── MainActivity.kt
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ ├── ic1.png
│ │ ├── ic2.png
│ │ ├── ic3.png
│ │ ├── ic4.png
│ │ ├── ic5.png
│ │ ├── ic6.png
│ │ ├── ic7.png
│ │ ├── ic8.png
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── arcchartviewdemo
│ └── ExampleUnitTest.kt
├── arcchartview
├── .gitignore
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── neo
│ │ └── arcchartview
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── neo
│ │ │ └── arcchartview
│ │ │ ├── ArcChartView.kt
│ │ │ └── DpHandler.kt
│ └── res
│ │ ├── drawable
│ │ └── ic_star.png
│ │ └── values
│ │ ├── attrs.xml
│ │ ├── colors.xml
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── neo
│ └── arcchartview
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── repo_files
├── AcvDemo-1-0-2.apk
└── images
│ ├── demoo.gif
│ ├── sample1.gif
│ ├── sample2.png
│ ├── sample3.png
│ ├── sample4.png
│ ├── sample5.gif
│ ├── sample6.gif
│ ├── sample_change_color.png
│ └── sample_icons.png
└── settings.gradle
/.gitignore:
--------------------------------------------------------------------------------
1 | *.iml
2 | .gradle
3 | /local.properties
4 | /.idea/workspace.xml
5 | /.idea/libraries
6 | .DS_Store
7 | /build
8 | /captures
9 | .externalNativeBuild
10 | .idea
11 | ### Android template
12 | # Built application files
13 | *.ap_
14 |
15 | # Files for the ART/Dalvik VM
16 | *.dex
17 |
18 | # Java class files
19 | *.class
20 |
21 | # Generated files
22 | bin/
23 | gen/
24 | out/
25 |
26 | # Gradle files
27 | .gradle/
28 | build/
29 |
30 | # Local configuration file (sdk path, etc)
31 | local.properties
32 |
33 | # Proguard folder generated by Eclipse
34 | proguard/
35 |
36 | # Log Files
37 | *.log
38 |
39 | # Android Studio Navigation editor temp files
40 | .navigation/
41 |
42 | # Android Studio captures folder
43 | captures/
44 |
45 | # IntelliJ
46 | *.iml
47 | .idea/workspace.xml
48 | .idea/tasks.xml
49 | .idea/gradle.xml
50 | .idea/dictionaries
51 | .idea/libraries
52 |
53 | # Keystore files
54 | # Uncomment the following line if you do not want to check your keystore files in.
55 | #*.jks
56 |
57 | # External native build folder generated in Android Studio 2.2 and later
58 | .externalNativeBuild
59 |
60 | # Google Services (e.g. APIs or Firebase)
61 | google-services.json
62 |
63 | # Freeline
64 | freeline.py
65 | freeline/
66 | freeline_project_description.json
67 |
68 |
--------------------------------------------------------------------------------
/LICENCE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright 2018 Iman Khoshabi
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://opensource.org/licenses/Apache-2.0)
2 | [](https://github.com/imaNNeoFighT/ArcChartView/raw/master/repo_files/AcvDemo-1-0-2.apk)
3 | [](https://jitpack.io/#imaNNeoFighT/ArcChartView)
4 | []( https://android-arsenal.com/details/1/6599 )
5 |
6 | # ArcChartViewDemo
7 |
8 |
9 |
10 | You can use this library to draw Arc charts
11 |
12 | and show your statistics or anything you want
13 |
14 | or maybe get some ratings from user.
15 |
16 | you can download the [Demo apk file](https://github.com/imaNNeoFighT/ArcChartView/raw/master/repo_files/AcvDemo-1-0-2.apk) (you can first adjust your Chart in the app and then implement it in code)
17 |
18 |
19 |
20 |
21 |
22 | ## 1 - Getting Started
23 |
24 | By this instructions you can add this library and i will explain how use it.
25 |
26 |
27 |
28 | ### Add Maven to your root build.gradle
29 |
30 | First of all Add it in your root build.gradle at the end of repositories:
31 |
32 | ```
33 | allprojects {
34 | repositories {
35 | ...
36 | maven { url 'https://jitpack.io' }
37 | }
38 | }
39 | ```
40 |
41 | ### Add Dependency
42 |
43 | Add the dependency to your app build.gradle file
44 |
45 | ```
46 | dependencies
47 | {
48 | implementation 'com.github.imaNNeoFighT:ArcChartView:1.0.3.1'
49 | // Or in older versions :
50 | // compile 'com.github.imaNNeoFighT:ArcChartView:1.0.3.1'
51 | }
52 | ```
53 |
54 | And then sync your gradle and take a tea .
55 |
56 |
57 | ## 2 - About The View
58 | You can simply use this View like other Views in android,
59 | just add ``ArcChartView`` in your java code or xml.
60 |
61 | ## View Properties
62 |
63 | you can customize StepBarView, all of this attributes can change via xml or code (runtime)
64 |
65 | |Attribute|Type|Kotlin|Description|
66 | |:---:|:---:|:---:|:---:|
67 | |acv_lines_count|Integer|`linesCount`|lines count of chart (i mean arc lines), default value is `10`|
68 | |acv_lines_space|Dimensions|`linesSpace`|lines space (lines margin), default value is `4dp`|
69 | |acv_lines_width|Dimensions|`linesWidth`|lines width , default value is `6dp`|
70 | |acv_sections_count|Integer|`sectionsCount`|sections count , default value is `8`|
71 | |acv_sections_space|Dimensions|`sectionsSpace`|sections space (sections margin) , default value is `4dp`|
72 | |acv_mid_start_extra_offset|Dimensions|`midStartExtraOffset`|center extra offest size, default value is `16dp`|
73 | |acv_icon_size|Dimensions|`iconSize`|the icons size, default value is `32dp`|
74 | |acv_start_degree_offset|Float|`startDegreeOffset`|offset of start degree to design the view, default value is `0f`|
75 | |acv_allow_setting_value_by_touch|Boolean|`allowSettingValueByTouch`|disable or enable allow setting value by touch feature, default value is `true`|
76 | |acv_allow_animations_on_set_values|Boolean|`allowAnimationsOnSetValue`|disable or enable allow play animation on setting values, default value is `true`|
77 |
78 |
79 |
80 | ## Set and get Sections value
81 | keep in mind that sections position starts with 0
82 |
83 | to get a section value use this function
84 | ```kotlin
85 | value = myArcChartView.getSectionValue(sectionPos)
86 | ```
87 |
88 |
89 |
90 | and to set a section value use this function
91 | ```kotlin
92 | myArcChartView.getSectionValue(sectionPos,sectionValue)
93 | ```
94 |
95 |
96 |
97 |
98 |
99 | ## Change filled and unFilled colors
100 | to set the unFilled color (the section color that drawn behind) use this function
101 | ```kotlin
102 | myArcChartView.setFilldeColor(sectionPos, Color.BLACK)
103 | ```
104 |
105 | and to set the filled color (the section color that drawn in top) use this function
106 | ```kotlin
107 | myArcChartView.setUnFilldeColor(sectionPos,Color.LTGRAY)
108 | ```
109 |
110 |
111 |
112 |
113 |
114 | ## Change section icons
115 | to set the icons use this function
116 | ```kotlin
117 | myArcChartView.setSectionIcons(sectionIcons : MutableList)
118 | ```
119 |
120 |
121 |
122 |
123 |
124 |
125 | ## View listener (ArcListener)
126 | you can handle some actions (only sectionsIconClick for now)
127 | just set a listener and make your logic
128 | ```kotlin
129 | myArcChartView.listener = object : ArcChartView.AcvListener {
130 | override fun onSectionsIconClicked(sectionPos: Int) {
131 | //Handle Your Logic Here
132 | Toast.makeText(applicationContext, sectionPos.toString(),Toast.LENGTH_SHORT).show()
133 | }
134 | }
135 | ```
136 |
137 |
138 | ## setValueByTouch (and callback)
139 | You can set values by touch and you can disable this feature by 'acv_allow_setting_value_by_touch' attribute.
140 | Also you can set a callBack listener to find out when values changed.
141 | ```kotlin
142 | myArcChartView.listener = object : ArcChartView.AcvListener {
143 | override fun onStartSettingSectionValue(sectionPos: Int, sectionValue: Int) {
144 | tvSectionsValue.setText("onStartSettingSectionValue $sectionPos $sectionValue")
145 | }
146 |
147 | override fun onContinueSettingSectionValue(sectionPos: Int, sectionValue: Int) {
148 | tvSectionsValue.setText("onContinueSettingSectionValue $sectionPos $sectionValue")
149 | }
150 |
151 | override fun onFinishedSettingSectionValue(sectionPos: Int, sectionValue: Int) {
152 | tvSectionsValue.setText("onFinishedSettingSectionValue $sectionPos $sectionValue")
153 | }
154 | }
155 | ```
156 |
157 |
158 |
159 | ## Implementing Rotate Animation (using startDegreeOffset attribute)
160 | ```kotlin
161 | val anim = ValueAnimator.ofFloat(0f,360f).apply {
162 | repeatCount = ValueAnimator.INFINITE
163 | repeatMode = ValueAnimator.RESTART
164 | interpolator = OvershootInterpolator()
165 | duration = 3000
166 | }
167 | anim.addUpdateListener {
168 | if(isAnimating)
169 | myArcChartView.startDegreeOffset =
170 | it.animatedValue as Float
171 | }
172 | anim.start()
173 | ```
174 |
175 |
176 |
177 |
178 |
179 |
180 | ## 3 - Some Samples
181 |
182 | ### Sample 1
183 |
184 | ```xml
185 |
201 | ```
202 |
203 |
204 |
205 |
206 |
207 | ### Sample 2
208 |
209 | ```xml
210 |
226 | ```
227 |
228 |
229 |
230 |
231 |
232 | ### Sample 3
233 |
234 | ```xml
235 |
251 | ```
252 |
253 |
254 |
255 |
256 | ### Sample 4
257 |
258 | ```kotlin
259 | myArcChartView.allowAnimationsOnSetValue = true
260 | ```
261 |
262 |
263 |
264 |
265 |
266 |
267 |
268 |
269 |
270 |
271 |
272 |
273 |
274 | # License
275 | ```
276 | Copyright 2018 Iman Khoshabi
277 |
278 | Licensed under the Apache License, Version 2.0 (the "License");
279 | you may not use this file except in compliance with the License.
280 | You may obtain a copy of the License at
281 |
282 | http://www.apache.org/licenses/LICENSE-2.0
283 |
284 | Unless required by applicable law or agreed to in writing, software
285 | distributed under the License is distributed on an "AS IS" BASIS,
286 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
287 | See the License for the specific language governing permissions and
288 | limitations under the License.
289 | ```
290 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | apply plugin: 'kotlin-android'
4 |
5 | apply plugin: 'kotlin-android-extensions'
6 |
7 | android {
8 | compileSdkVersion 26
9 | defaultConfig {
10 | applicationId "com.neo.arcchartviewdemo"
11 | minSdkVersion 14
12 | targetSdkVersion 26
13 | versionCode 1
14 | versionName "1.0"
15 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
16 | }
17 | buildTypes {
18 | release {
19 | minifyEnabled false
20 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
21 | }
22 | }
23 | }
24 |
25 | dependencies {
26 | implementation fileTree(include: ['*.jar'], dir: 'libs')
27 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
28 | implementation 'com.android.support:appcompat-v7:26.1.0'
29 | implementation 'com.android.support.constraint:constraint-layout:1.0.2'
30 | testImplementation 'junit:junit:4.12'
31 | androidTestImplementation 'com.android.support.test:runner:1.0.1'
32 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
33 | implementation project(':arcchartview')
34 | }
35 |
--------------------------------------------------------------------------------
/app/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/app/src/androidTest/java/com/neo/arcchartviewdemo/ExampleInstrumentedTest.kt:
--------------------------------------------------------------------------------
1 | package com.neo.arcchartviewdemo
2 |
3 | import android.support.test.InstrumentationRegistry
4 | import android.support.test.runner.AndroidJUnit4
5 |
6 | import org.junit.Test
7 | import org.junit.runner.RunWith
8 |
9 | import org.junit.Assert.*
10 |
11 | /**
12 | * Instrumented test, which will execute on an Android device.
13 | *
14 | * See [testing documentation](http://d.android.com/tools/testing).
15 | */
16 | @RunWith(AndroidJUnit4::class)
17 | class ExampleInstrumentedTest {
18 | @Test
19 | fun useAppContext() {
20 | // Context of the app under test.
21 | val appContext = InstrumentationRegistry.getTargetContext()
22 | assertEquals("com.neo.arcchartviewdemo", appContext.packageName)
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/app/src/main/ic_launcher-web.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/ic_launcher-web.png
--------------------------------------------------------------------------------
/app/src/main/java/com/neo/arcchartviewdemo/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.neo.arcchartviewdemo
2 |
3 | import android.animation.ValueAnimator
4 | import android.graphics.BitmapFactory
5 | import android.os.Bundle
6 | import android.support.v7.app.AppCompatActivity
7 | import android.view.View
8 | import android.view.animation.OvershootInterpolator
9 | import android.widget.*
10 | import com.neo.arcchartview.ArcChartView
11 | import com.neo.arcchartview.DpHandler
12 |
13 |
14 | class MainActivity : AppCompatActivity() ,SeekBar.OnSeekBarChangeListener{
15 | lateinit var myArcChartView : ArcChartView
16 | lateinit var sbAttrsValue: SeekBar
17 | lateinit var spActions : Spinner
18 | lateinit var tvValue : TextView
19 | lateinit var tvSectionsValue : TextView
20 |
21 | lateinit var spSection : Spinner
22 | lateinit var sbSectionsValue: SeekBar
23 |
24 | lateinit var swAnimate : Switch
25 |
26 |
27 | var actionsList : MutableList = mutableListOf()
28 | var sectionsList : MutableList = mutableListOf()
29 |
30 | var isAnimating = false
31 |
32 | override fun onCreate(savedInstanceState: Bundle?) {
33 | super.onCreate(savedInstanceState)
34 | setContentView(R.layout.activity_main)
35 |
36 | myArcChartView = findViewById(R.id.arc_chart_view)
37 | sbAttrsValue = findViewById(R.id.sb_attrsValue)
38 | spActions = findViewById(R.id.sp_actions)
39 | tvValue = findViewById(R.id.tv_value)
40 | tvSectionsValue = findViewById(R.id.tv_sectionsValue)
41 |
42 | spSection = findViewById(R.id.sp_sections)
43 | sbSectionsValue = findViewById(R.id.sb_sectionsValue)
44 |
45 | swAnimate = findViewById(R.id.sw_anim)
46 | swAnimate.setOnCheckedChangeListener { buttonView, isChecked ->
47 | isAnimating = isChecked
48 | }
49 |
50 |
51 | initSpinner()
52 | refreshSpinnerSections()
53 |
54 |
55 | //Change filled/unFilled colors
56 | // myArcChartView.setFilldeColor(0, Color.BLACK)
57 | // myArcChartView.setUnFilldeColor(0,Color.LTGRAY)
58 | // myArcChartView.setFilldeColor(1, Color.BLACK)
59 | // myArcChartView.setUnFilldeColor(1,Color.LTGRAY)
60 |
61 |
62 | //Change Icons
63 | myArcChartView.setSectionIcons(mutableListOf(
64 | BitmapFactory.decodeResource(this@MainActivity.resources,R.drawable.ic1),
65 | BitmapFactory.decodeResource(this@MainActivity.resources,R.drawable.ic2),
66 | BitmapFactory.decodeResource(this@MainActivity.resources,R.drawable.ic3),
67 | BitmapFactory.decodeResource(this@MainActivity.resources,R.drawable.ic4),
68 | BitmapFactory.decodeResource(this@MainActivity.resources,R.drawable.ic5),
69 | BitmapFactory.decodeResource(this@MainActivity.resources,R.drawable.ic6),
70 | BitmapFactory.decodeResource(this@MainActivity.resources,R.drawable.ic7),
71 | BitmapFactory.decodeResource(this@MainActivity.resources,R.drawable.ic8)
72 | ))
73 |
74 | //IconsClickListener
75 | myArcChartView.listener = object : ArcChartView.AcvListener {
76 | override fun onSectionsIconClicked(sectionPos: Int) {
77 | Toast.makeText(applicationContext, sectionPos.toString(),Toast.LENGTH_SHORT).show()
78 | }
79 |
80 | override fun onStartSettingSectionValue(sectionPos: Int, sectionValue: Int) {
81 | tvSectionsValue.setText("onStartSettingSectionValue $sectionPos $sectionValue")
82 | }
83 |
84 | override fun onContinueSettingSectionValue(sectionPos: Int, sectionValue: Int) {
85 | tvSectionsValue.setText("onContinueSettingSectionValue $sectionPos $sectionValue")
86 | }
87 |
88 | override fun onFinishedSettingSectionValue(sectionPos: Int, sectionValue: Int) {
89 | tvSectionsValue.setText("onFinishedSettingSectionValue $sectionPos $sectionValue")
90 | }
91 | }
92 |
93 |
94 | //Rotate Animation using startDegreeOffset
95 | val anim = ValueAnimator.ofFloat(0f,360f).apply {
96 | repeatCount = ValueAnimator.INFINITE
97 | repeatMode = ValueAnimator.RESTART
98 | interpolator = OvershootInterpolator()
99 | duration = 3000
100 | }
101 | anim.addUpdateListener {
102 | if(isAnimating)
103 | myArcChartView.startDegreeOffset =
104 | it.animatedValue as Float
105 | }
106 | anim.start()
107 |
108 |
109 | }
110 |
111 | private fun initSpinner() {
112 | actionsList.add("acv_lines_count")
113 | actionsList.add("acv_lines_space")
114 | actionsList.add("acv_lines_width")
115 | actionsList.add("acv_sections_count")
116 | actionsList.add("acv_sections_space")
117 | actionsList.add("acv_mid_start_extra_offset")
118 | actionsList.add("acv_icon_size")
119 | actionsList.add("acv_icon_margin")
120 |
121 | val spinnerArrayAdapter = ArrayAdapter(this, android.R.layout.simple_spinner_item,
122 | actionsList)
123 | spinnerArrayAdapter.setDropDownViewResource(android.R.layout
124 | .simple_spinner_dropdown_item)
125 | spActions.adapter = spinnerArrayAdapter
126 |
127 |
128 | spActions.onItemSelectedListener = object : AdapterView.OnItemSelectedListener{
129 | override fun onNothingSelected(parent: AdapterView<*>?) {}
130 |
131 | override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
132 | refreshSelected(position)
133 | }
134 |
135 | }
136 |
137 | spActions.setSelection(0)
138 | refreshValueText(myArcChartView.linesCount)
139 | }
140 |
141 | private fun refreshSelected(position : Int) {
142 | sbAttrsValue.setOnSeekBarChangeListener(null)
143 | when(actionsList[position]){
144 | "acv_lines_count" -> {
145 | sbAttrsValue.max = 20
146 | sbAttrsValue.progress = myArcChartView.linesCount
147 | refreshValueText(sbAttrsValue.progress)
148 | }
149 | "acv_lines_space" -> {
150 | sbAttrsValue.max = 20
151 | sbAttrsValue.progress = DpHandler.pxToDp(this@MainActivity, myArcChartView.linesSpace.toInt())
152 | refreshValueText(sbAttrsValue.progress)
153 | }
154 | "acv_lines_width" -> {
155 | sbAttrsValue.max = 80
156 | sbAttrsValue.progress = DpHandler.pxToDp(this@MainActivity, myArcChartView.linesWidth.toInt())
157 | refreshValueText(sbAttrsValue.progress)
158 | }
159 | "acv_sections_count" -> {
160 | sbAttrsValue.max = 25
161 | sbAttrsValue.progress = myArcChartView.sectionsCount
162 | refreshValueText(sbAttrsValue.progress)
163 | }
164 | "acv_sections_space" -> {
165 | sbAttrsValue.max = 40
166 | sbAttrsValue.progress = DpHandler.pxToDp(this@MainActivity, myArcChartView.sectionsSpace.toInt())
167 | refreshValueText(sbAttrsValue.progress)
168 | }
169 | "acv_mid_start_extra_offset" -> {
170 | sbAttrsValue.max = 100
171 | sbAttrsValue.progress = DpHandler.pxToDp(this@MainActivity, myArcChartView.midStartExtraOffset.toInt())
172 | refreshValueText(sbAttrsValue.progress)
173 | }
174 | "acv_icon_size" -> {
175 | sbAttrsValue.max = 64
176 | sbAttrsValue.progress = DpHandler.pxToDp(this@MainActivity, myArcChartView.iconSize.toInt())
177 | refreshValueText(sbAttrsValue.progress)
178 | }
179 | "acv_icon_margin" -> {
180 | sbAttrsValue.max = 64
181 | sbAttrsValue.progress = DpHandler.pxToDp(this@MainActivity, myArcChartView.iconMargin.toInt())
182 | refreshValueText(sbAttrsValue.progress)
183 | }
184 | }
185 | sbAttrsValue.setOnSeekBarChangeListener(this)
186 | }
187 |
188 | private fun refreshSpinnerSections() {
189 | sectionsList.clear()
190 | for(i in 1..myArcChartView.sectionsCount)
191 | sectionsList.add("Section $i")
192 |
193 | val spinnerArrayAdapter = ArrayAdapter(this, android.R.layout.simple_spinner_item,
194 | sectionsList)
195 | spinnerArrayAdapter.setDropDownViewResource(android.R.layout
196 | .simple_spinner_dropdown_item)
197 | spSection.adapter = spinnerArrayAdapter
198 |
199 |
200 | spSection.onItemSelectedListener = object : AdapterView.OnItemSelectedListener{
201 | override fun onNothingSelected(parent: AdapterView<*>?) {}
202 |
203 | override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
204 | refreshSeekbarValueSections()
205 | }
206 |
207 | }
208 |
209 | spSection.setSelection(0)
210 | }
211 |
212 | private fun refreshSeekbarValueSections() {
213 | sbSectionsValue.max = myArcChartView.linesCount
214 | sbSectionsValue.progress = myArcChartView.getSectionValue(spSection.selectedItemPosition)
215 | sbSectionsValue.setOnSeekBarChangeListener(object : SeekBar.OnSeekBarChangeListener{
216 | override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
217 | myArcChartView.setSectionValue(spSection.selectedItemPosition,progress)
218 | }
219 |
220 | override fun onStartTrackingTouch(seekBar: SeekBar?) {}
221 | override fun onStopTrackingTouch(seekBar: SeekBar?) {}
222 | })
223 | }
224 |
225 | override fun onProgressChanged(seekBar: SeekBar?, progress: Int, fromUser: Boolean) {
226 | refreshValueText(progress)
227 | refreshProgress(progress)
228 | }
229 |
230 | override fun onStartTrackingTouch(seekBar: SeekBar?) {
231 | }
232 |
233 | override fun onStopTrackingTouch(seekBar: SeekBar?) {
234 | }
235 |
236 | private fun refreshValueText(progress: Int) {
237 | when(actionsList[spActions.selectedItemPosition]){
238 | "acv_lines_count" -> {
239 | tvValue.text = "$progress"
240 | }
241 | "acv_lines_space" -> {
242 | tvValue.text = "$progress dp"
243 | }
244 | "acv_lines_width" -> {
245 | tvValue.text = "$progress dp"
246 | }
247 | "acv_sections_count" -> {
248 | tvValue.text = "$progress"
249 | }
250 | "acv_sections_space" -> {
251 | tvValue.text = "$progress dp"
252 | }
253 | "acv_mid_start_extra_offset" -> {
254 | tvValue.text = "$progress dp"
255 | }
256 | "acv_icon_size" -> {
257 | tvValue.text = "$progress dp"
258 | }
259 | "acv_icon_margin" -> {
260 | tvValue.text = "$progress dp"
261 | }
262 | }
263 | }
264 |
265 | private fun refreshProgress(progress: Int) {
266 | when(actionsList[spActions.selectedItemPosition]){
267 | "acv_lines_count" -> {
268 | myArcChartView.linesCount = progress
269 | refreshSeekbarValueSections()
270 | }
271 | "acv_lines_space" -> {
272 | myArcChartView.linesSpace = DpHandler.dpToPx(this@MainActivity,progress).toFloat()
273 | }
274 | "acv_lines_width" -> {
275 | myArcChartView.linesWidth = DpHandler.dpToPx(this@MainActivity,progress).toFloat()
276 | }
277 | "acv_sections_count" -> {
278 | myArcChartView.sectionsCount = progress
279 | refreshSpinnerSections()
280 | }
281 | "acv_sections_space" -> {
282 | myArcChartView.sectionsSpace = DpHandler.dpToPx(this@MainActivity,progress).toFloat()
283 | }
284 | "acv_mid_start_extra_offset" -> {
285 | myArcChartView.midStartExtraOffset = DpHandler.dpToPx(this@MainActivity,progress).toFloat()
286 | }
287 | "acv_icon_size" -> {
288 | myArcChartView.iconSize = DpHandler.dpToPx(this@MainActivity,progress).toFloat()
289 | }
290 | "acv_icon_margin" -> {
291 | myArcChartView.iconMargin = DpHandler.dpToPx(this@MainActivity,progress).toFloat()
292 | }
293 | }
294 | }
295 | }
296 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable-v24/ic_launcher_foreground.xml:
--------------------------------------------------------------------------------
1 |
7 |
12 |
13 |
19 |
22 |
25 |
26 |
27 |
28 |
34 |
35 |
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/drawable/ic1.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/drawable/ic2.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/drawable/ic3.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/drawable/ic4.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/drawable/ic5.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/drawable/ic6.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/drawable/ic7.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/drawable/ic8.png
--------------------------------------------------------------------------------
/app/src/main/res/drawable/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
10 |
12 |
14 |
16 |
18 |
20 |
22 |
24 |
26 |
28 |
30 |
32 |
34 |
36 |
38 |
40 |
42 |
44 |
46 |
48 |
50 |
52 |
54 |
56 |
58 |
60 |
62 |
64 |
66 |
68 |
70 |
72 |
74 |
75 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
30 |
31 |
32 |
41 |
42 |
43 |
51 |
52 |
68 |
69 |
78 |
79 |
80 |
89 |
90 |
91 |
92 |
102 |
103 |
111 |
112 |
113 |
123 |
124 |
125 |
135 |
136 |
137 |
144 |
145 |
155 |
156 |
166 |
167 |
168 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #3F51B5
4 | #303F9F
5 | #FF4081
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ArcChartViewDemo
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/test/java/com/neo/arcchartviewdemo/ExampleUnitTest.kt:
--------------------------------------------------------------------------------
1 | package com.neo.arcchartviewdemo
2 |
3 | import org.junit.Test
4 |
5 | import org.junit.Assert.*
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * See [testing documentation](http://d.android.com/tools/testing).
11 | */
12 | class ExampleUnitTest {
13 | @Test
14 | fun addition_isCorrect() {
15 | assertEquals(4, 2 + 2)
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/arcchartview/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/arcchartview/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin: 'kotlin-android'
3 |
4 |
5 | android {
6 | compileSdkVersion 26
7 |
8 | defaultConfig {
9 | minSdkVersion 14
10 | targetSdkVersion 26
11 | versionCode 4
12 | versionName "1.0.3.1"
13 |
14 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
15 |
16 | }
17 |
18 | buildTypes {
19 | release {
20 | minifyEnabled false
21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
22 | }
23 | }
24 |
25 | }
26 |
27 | dependencies {
28 | implementation fileTree(dir: 'libs', include: ['*.jar'])
29 |
30 | implementation 'com.android.support:appcompat-v7:26.1.0'
31 | testImplementation 'junit:junit:4.12'
32 | androidTestImplementation 'com.android.support.test:runner:1.0.1'
33 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
34 | compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
35 | }
36 | repositories {
37 | mavenCentral()
38 | }
39 |
40 |
41 | // or use the remote copy to keep update with latest changes
42 | //apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
--------------------------------------------------------------------------------
/arcchartview/proguard-rules.pro:
--------------------------------------------------------------------------------
1 | # Add project specific ProGuard rules here.
2 | # You can control the set of applied configuration files using the
3 | # proguardFiles setting in build.gradle.
4 | #
5 | # For more details, see
6 | # http://developer.android.com/guide/developing/tools/proguard.html
7 |
8 | # If your project uses WebView with JS, uncomment the following
9 | # and specify the fully qualified class name to the JavaScript interface
10 | # class:
11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12 | # public *;
13 | #}
14 |
15 | # Uncomment this to preserve the line number information for
16 | # debugging stack traces.
17 | #-keepattributes SourceFile,LineNumberTable
18 |
19 | # If you keep the line number information, uncomment this to
20 | # hide the original source file name.
21 | #-renamesourcefileattribute SourceFile
22 |
--------------------------------------------------------------------------------
/arcchartview/src/androidTest/java/com/neo/arcchartview/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.neo.arcchartview;
2 |
3 | import android.content.Context;
4 | import android.support.test.InstrumentationRegistry;
5 | import android.support.test.runner.AndroidJUnit4;
6 |
7 | import org.junit.Test;
8 | import org.junit.runner.RunWith;
9 |
10 | import static org.junit.Assert.*;
11 |
12 | /**
13 | * Instrumented test, which will execute on an Android device.
14 | *
15 | * @see Testing documentation
16 | */
17 | @RunWith(AndroidJUnit4.class)
18 | public class ExampleInstrumentedTest {
19 | @Test
20 | public void useAppContext() throws Exception {
21 | // Context of the app under test.
22 | Context appContext = InstrumentationRegistry.getTargetContext();
23 |
24 | assertEquals("com.neo.arcchartview.test", appContext.getPackageName());
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/arcchartview/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/arcchartview/src/main/java/com/neo/arcchartview/ArcChartView.kt:
--------------------------------------------------------------------------------
1 | package com.neo.arcchartview
2 | import android.animation.ValueAnimator
3 | import android.content.Context
4 | import android.graphics.*
5 | import android.os.Parcel
6 | import android.os.Parcelable
7 | import android.support.v4.content.ContextCompat
8 | import android.util.AttributeSet
9 | import android.util.Log
10 | import android.view.MotionEvent
11 | import android.view.View
12 | import android.view.animation.AccelerateInterpolator
13 |
14 | /**
15 | * Created by iman.
16 | * iman.neofight@gmail.com
17 | */
18 | class ArcChartView @JvmOverloads constructor(mContext : Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0) :
19 | View(mContext,attrs, defStyleAttr) {
20 |
21 | companion object {
22 | private val IS_DEBUG = false
23 | }
24 |
25 | private var tmpBitmap : Bitmap? = null
26 | private var isResized = false
27 | private var drawingCanvas : Canvas? = null
28 |
29 | private var drawLinePaint: Paint
30 | private var clearPaint : Paint
31 |
32 |
33 |
34 | var linesCount : Int = 0
35 | set(value) {
36 | field = value
37 | initRefreshCountRelateds()
38 | requestLayout()
39 | }
40 |
41 | var linesWidth: Float = 0f
42 | set(value) {
43 | field = value
44 | refreshLinesWidthRelateds()
45 | requestLayout()
46 | }
47 |
48 | var linesSpace : Float = 0f
49 | set(value) {
50 | field = value
51 | requestLayout()
52 | }
53 |
54 |
55 |
56 | var sectionsCount : Int = 0
57 | set(value) {
58 | field = value
59 | initRefreshCountRelateds()
60 | invalidate()
61 | }
62 |
63 | var sectionsSpace: Float = 0f
64 | set(value) {
65 | field = value
66 | refreshSectionsSpaceRelateds()
67 | invalidate()
68 | }
69 |
70 | var midStartExtraOffset: Float = 0f
71 | set(value) {
72 | field = value
73 | requestLayout()
74 | }
75 |
76 | var iconSize: Float = 0f
77 | set(value) {
78 | field = value
79 | requestLayout()
80 | }
81 |
82 | var iconMargin: Float = 0f
83 | set(value) {
84 | field = value
85 | requestLayout()
86 | }
87 |
88 | var startDegreeOffset: Float = 20f
89 | set(value) {
90 | field = value
91 | invalidate()
92 | }
93 |
94 | var allowSettingValueByTouch = true
95 |
96 | var allowAnimationsOnSetValue = true
97 |
98 | var listener: AcvListener? = null
99 |
100 |
101 |
102 |
103 |
104 |
105 | private var sectionDegree : Float = 0.0f
106 |
107 | private var sectionIcons : MutableList = mutableListOf()
108 | private var sectionsValue : Array = emptyArray()
109 | set(value) {
110 | field = value
111 | invalidate()
112 | }
113 |
114 | private var filledColors: MutableList = mutableListOf()
115 | private var unfilledColors: MutableList = mutableListOf()
116 |
117 |
118 | private var tempRectf : RectF = RectF(0f,0f,0f,0f)
119 | private var tmpSrcRect : Rect = Rect(0,0,0,0)
120 | private var tmpDstRect : Rect = Rect(0,0,0,0)
121 |
122 |
123 | private var middleAnimatingDegreeValue = 0f
124 | private var animatingDegreeValue = 0f
125 | private var animateOnSection: Int = -1
126 | private var animateOnValue: Int = -1
127 | private var isIncresingAnim = true
128 |
129 |
130 | init {
131 | linesCount = 10
132 | linesSpace = DpHandler.dpToPx(mContext,4).toFloat()
133 | linesWidth = DpHandler.dpToPx(mContext,6).toFloat()
134 |
135 | sectionsCount = 8
136 | sectionsSpace = DpHandler.dpToPx(mContext,4).toFloat()
137 |
138 | midStartExtraOffset = DpHandler.dpToPx(mContext,28).toFloat()
139 |
140 | iconSize = DpHandler.dpToPx(mContext,32).toFloat()
141 | iconMargin = DpHandler.dpToPx(mContext,6).toFloat()
142 |
143 | startDegreeOffset = 0f
144 |
145 | allowSettingValueByTouch = true
146 |
147 | if(attrs!=null){
148 | val a = mContext.obtainStyledAttributes(attrs,R.styleable.ArcChartView)
149 |
150 | linesCount = a.getInt(R.styleable.ArcChartView_acv_lines_count,linesCount)
151 | linesSpace = a.getDimension(R.styleable.ArcChartView_acv_lines_space,linesSpace)
152 | linesWidth = a.getDimension(R.styleable.ArcChartView_acv_lines_width, linesWidth)
153 |
154 | sectionsCount = a.getInt(R.styleable.ArcChartView_acv_sections_count,sectionsCount)
155 | sectionsSpace = a.getDimension(R.styleable.ArcChartView_acv_sections_space,sectionsSpace)
156 |
157 | midStartExtraOffset = a.getDimension(R.styleable.ArcChartView_acv_mid_start_extra_offset, midStartExtraOffset)
158 |
159 | iconSize = a.getDimension(R.styleable.ArcChartView_acv_icon_size,iconSize)
160 | iconMargin = a.getDimension(R.styleable.ArcChartView_acv_icon_margin,iconMargin)
161 |
162 | startDegreeOffset = a.getFloat(R.styleable.ArcChartView_acv_start_degree_offset,startDegreeOffset)
163 |
164 | allowSettingValueByTouch = a.getBoolean(R.styleable.ArcChartView_acv_allow_setting_value_by_touch,allowSettingValueByTouch)
165 |
166 | allowAnimationsOnSetValue = a.getBoolean(R.styleable.ArcChartView_acv_allow_animations_on_set_values,allowAnimationsOnSetValue)
167 |
168 | a.recycle()
169 | }
170 |
171 | initRefreshCountRelateds()
172 |
173 | drawLinePaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
174 | style = Paint.Style.STROKE
175 | }
176 | refreshLinesWidthRelateds()
177 |
178 |
179 | clearPaint = Paint(Paint.ANTI_ALIAS_FLAG).apply {
180 | style = Paint.Style.FILL_AND_STROKE
181 | color = Color.TRANSPARENT
182 | xfermode = PorterDuffXfermode(PorterDuff.Mode.SRC_OUT)
183 | }
184 | refreshSectionsSpaceRelateds()
185 |
186 |
187 |
188 |
189 | sectionIcons.clear()
190 | sectionIcons.add(0,BitmapFactory.decodeResource(context.resources,R.drawable.ic_star))
191 | }
192 |
193 | private fun initRefreshCountRelateds() {
194 | if(sectionsCount<1)sectionsCount=1
195 | sectionDegree = (360/sectionsCount).toFloat()
196 |
197 | sectionsValue = Array(sectionsCount,{ (it%linesCount)+1 })
198 |
199 | filledColors.clear()
200 | for(i in 0 until sectionsCount) {
201 | val color = when(i%8){
202 | 0 -> color(R.color.filled_section_1)
203 | 1 -> color(R.color.filled_section_2)
204 | 2 -> color(R.color.filled_section_3)
205 | 3 -> color(R.color.filled_section_4)
206 | 4 -> color(R.color.filled_section_5)
207 | 5 -> color(R.color.filled_section_6)
208 | 6 -> color(R.color.filled_section_7)
209 | 7 -> color(R.color.filled_section_8)
210 | else -> Color.BLACK
211 | }
212 | filledColors.add(i,color)
213 | }
214 |
215 |
216 | unfilledColors.clear()
217 | for(i in 0 until sectionsCount) {
218 | val color = when(i%8){
219 | 0 -> color(R.color.unfilled_section_1)
220 | 1 -> color(R.color.unfilled_section_2)
221 | 2 -> color(R.color.unfilled_section_3)
222 | 3 -> color(R.color.unfilled_section_4)
223 | 4 -> color(R.color.unfilled_section_5)
224 | 5 -> color(R.color.unfilled_section_6)
225 | 6 -> color(R.color.unfilled_section_7)
226 | 7 -> color(R.color.unfilled_section_8)
227 | else -> Color.BLACK
228 | }
229 | unfilledColors.add(i,color)
230 | }
231 |
232 | }
233 | private fun refreshLinesWidthRelateds() {
234 | drawLinePaint?.let {
235 | drawLinePaint.strokeWidth = linesWidth
236 | }
237 | }
238 | private fun refreshSectionsSpaceRelateds() {
239 | clearPaint?.let {
240 | clearPaint.strokeWidth = sectionsSpace
241 | }
242 | }
243 |
244 |
245 | fun color(resId : Int) = ContextCompat.getColor(context,resId)
246 |
247 | override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
248 | super.onMeasure(widthMeasureSpec, heightMeasureSpec)
249 |
250 | val widthMeasureMode = MeasureSpec.getMode(widthMeasureSpec)
251 | val widthMeasureSize = MeasureSpec.getSize(widthMeasureSpec)
252 |
253 | val heightMeasureMode = MeasureSpec.getMode(heightMeasureSpec)
254 | val heightMeasureSize = MeasureSpec.getSize(heightMeasureSpec)
255 |
256 |
257 |
258 | val mWidth = when(widthMeasureMode){
259 | MeasureSpec.EXACTLY->widthMeasureSize
260 | MeasureSpec.AT_MOST->Math.min(widthMeasureSize,calculateDesireWidth())
261 | MeasureSpec.UNSPECIFIED->calculateDesireWidth()
262 | else -> calculateDesireWidth()
263 | }
264 |
265 |
266 | val mHeight = when(heightMeasureMode){
267 | MeasureSpec.EXACTLY->heightMeasureSize
268 | MeasureSpec.AT_MOST->Math.min(heightMeasureSize,calculateDesireHeight())
269 | MeasureSpec.UNSPECIFIED->calculateDesireHeight()
270 | else -> calculateDesireHeight()
271 | }
272 |
273 |
274 |
275 | setMeasuredDimension(mWidth,mHeight)
276 | }
277 |
278 | override fun requestLayout() {
279 | isResized = true
280 | super.requestLayout()
281 | }
282 |
283 | private fun calculateDesireWidth() : Int {
284 | //Whole Chart Space (linesWidth + linesSpace + midExtraSize)
285 | val chartSpace = ((((linesWidth + linesSpace) * linesCount) * 2) + (linesWidth * 2)) + midStartExtraOffset
286 |
287 | //Icons Space (width + margin)
288 | val iconsSpace = ((iconMargin * 2) + iconSize * 2)
289 |
290 | //Padding Space (left + right)
291 | val padding = paddingLeft + paddingRight
292 |
293 | return (chartSpace + iconsSpace + padding).toInt()
294 | }
295 |
296 | private fun calculateDesireHeight() : Int {
297 | //Whole Chart Space (linesWidth + linesSpace + midExtraSize)
298 | val chartSpace = ((((linesWidth + linesSpace) * linesCount) * 2) + (linesWidth * 2)) + midStartExtraOffset
299 |
300 | //Icons Space (width + margin)
301 | val iconsSpace = ((iconMargin * 2) + iconSize * 2)
302 |
303 | //Padding Space (top + bottom)
304 | val padding = paddingTop + paddingBottom
305 |
306 | return (chartSpace + iconsSpace + padding).toInt()
307 | }
308 |
309 |
310 | override fun onDraw(c: Canvas?) {
311 | super.onDraw(c)
312 |
313 | if(tmpBitmap==null || isResized) {
314 | tmpBitmap = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
315 | tmpBitmap?.eraseColor(Color.TRANSPARENT)
316 | isResized=false
317 | drawingCanvas = Canvas(tmpBitmap)
318 | }
319 |
320 |
321 | drawingCanvas?.drawColor(Color.TRANSPARENT,PorterDuff.Mode.CLEAR)
322 |
323 | val centerX = (width/2).toFloat()
324 | val centerY = (height/2).toFloat()
325 |
326 | //Draw unfilled arc lines
327 | for(i in 1..linesCount){
328 | val left = centerX - ((((linesWidth + linesSpace) * (i-1))+(linesWidth/2))+ (midStartExtraOffset/2))
329 | val top = centerY - ((((linesWidth + linesSpace) * (i-1))+(linesWidth/2))+ (midStartExtraOffset/2))
330 | val right = centerX + ((((linesWidth + linesSpace) * (i-1))+(linesWidth/2))+ (midStartExtraOffset/2))
331 | val bot = centerY + ((((linesWidth + linesSpace) * (i-1))+(linesWidth/2))+ (midStartExtraOffset/2))
332 |
333 | for(j in 0..(sectionsCount-1)){
334 | drawLinePaint.color = unfilledColors[j]
335 | val startDegree = startDegreeOffset + (j*sectionDegree)
336 | val sweepAngle = sectionDegree
337 |
338 | tempRectf.set(left,top, right,bot)
339 | drawingCanvas?.drawArc(tempRectf, startDegree,sweepAngle,false, drawLinePaint)
340 | }
341 |
342 | }
343 |
344 |
345 | //Draw filled arc lines
346 | for(i in 1..linesCount){
347 | val left = centerX - ((((linesWidth + linesSpace) * (i-1))+(linesWidth/2))+ (midStartExtraOffset/2))
348 | val top = centerY - ((((linesWidth + linesSpace) * (i-1))+(linesWidth/2))+ (midStartExtraOffset/2))
349 | val right = centerX + ((((linesWidth + linesSpace) * (i-1))+(linesWidth/2))+ (midStartExtraOffset/2))
350 | val bot = centerY + ((((linesWidth + linesSpace) * (i-1))+(linesWidth/2))+ (midStartExtraOffset/2))
351 |
352 | for(j in 0..(sectionsCount-1)){
353 | if (allowAnimationsOnSetValue && !isIncresingAnim && i==animateOnValue && j==animateOnSection){
354 | if (sectionsValue[j]+1 < i) continue
355 | }else{
356 | if (sectionsValue[j] < i) continue
357 | }
358 | drawLinePaint.color = filledColors!![j]
359 | val startDegree = startDegreeOffset + (j*sectionDegree)
360 | var sweepAngle = sectionDegree
361 |
362 | tempRectf.set(left,top, right,bot)
363 |
364 | if(allowAnimationsOnSetValue && i==animateOnValue && j==animateOnSection) {
365 | //LastLine and animating section
366 | sweepAngle = (middleAnimatingDegreeValue - animatingDegreeValue)*2
367 |
368 | if (IS_DEBUG) {
369 | Log.d("SS", "animatingDegreeValue = $animatingDegreeValue, sweepAngl = $sweepAngle")
370 | }
371 |
372 | drawingCanvas?.drawArc(tempRectf, startDegreeOffset + animatingDegreeValue, sweepAngle, false, drawLinePaint)
373 | }else{
374 | drawingCanvas?.drawArc(tempRectf, startDegree, sweepAngle, false, drawLinePaint)
375 | }
376 | }
377 | }
378 |
379 |
380 |
381 | //Draw Sections space (Clear)
382 | var radius = Math.sqrt(Math.pow(width.toDouble(), 2.0) + Math.pow(height.toDouble(), 2.0)).toFloat()
383 | for(j in 0..(sectionsCount-1)){
384 | var degree = (startDegreeOffset + (j*sectionDegree)).toDouble()
385 |
386 | var endX = Math.cos(Math.toRadians(degree)).toFloat()
387 | var endY = Math.sin(Math.toRadians(degree)).toFloat()
388 |
389 | drawingCanvas?.drawLine(centerX,centerY,centerX + (endX*radius),centerY + (endY*radius),clearPaint)
390 | }
391 |
392 |
393 |
394 | //Draw icons
395 | val iconsRect = getDrawingIconsRect()
396 | for(j in 0..(iconsRect.size-1)){
397 | val bmp = (if(sectionIcons.size>0)
398 | sectionIcons[j%sectionIcons.size]
399 | else continue) ?: continue
400 |
401 | tmpSrcRect.set(0,0, bmp!!.width, bmp!!.height)
402 | tmpDstRect.set(iconsRect[j])
403 | drawingCanvas?.drawBitmap(bmp,tmpSrcRect,tmpDstRect,null)
404 | }
405 |
406 |
407 |
408 | c?.drawBitmap(tmpBitmap,0f,0f,null)
409 |
410 | }
411 |
412 | private fun getDrawingIconsRect() : Array{
413 | val rects = arrayOfNulls(sectionsCount)
414 |
415 | val centerX = width/2
416 | val centerY = height/2
417 |
418 | val radius = (((linesSpace + linesWidth)*(linesCount) + (linesWidth))) + (midStartExtraOffset/2) + iconMargin + (iconSize / 2)
419 | for(j in 0..(sectionsCount-1)){
420 | var degree = (startDegreeOffset + j*(sectionDegree)).toDouble()
421 | degree += (sectionDegree/2)
422 |
423 | var endX = Math.cos(Math.toRadians(degree)).toFloat()
424 | endX *= radius
425 | endX += centerX
426 |
427 | var endY = Math.sin(Math.toRadians(degree)).toFloat()
428 | endY *= radius
429 | endY += centerY
430 |
431 |
432 |
433 | val iconSizeHalf = (iconSize/2).toInt()
434 | rects[j] = Rect((endX-iconSizeHalf).toInt(), (endY-iconSizeHalf).toInt(),
435 | (endX+iconSizeHalf).toInt(), (endY+iconSizeHalf).toInt())
436 | }
437 |
438 | return rects
439 | }
440 |
441 | fun getSectionValue(section: Int) : Int = sectionsValue[section]
442 | fun setSectionValue(section: Int,value: Int){
443 | if(section<0 || section>(sectionsCount-1))return
444 | if(value<0 || value>linesCount)return
445 |
446 |
447 | if(allowAnimationsOnSetValue)
448 | if(sectionsValue[section] > value) {
449 | startAnimOn(section, sectionsValue[section],false)
450 | }else if(sectionsValue[section] < value){
451 | startAnimOn(section, value,true)
452 | }
453 | sectionsValue[section] = value
454 |
455 |
456 | invalidate()
457 | }
458 |
459 |
460 | private fun startAnimOn(section: Int, value: Int, isIncreasing : Boolean = true) {
461 | isIncresingAnim = isIncreasing
462 |
463 | animateOnSection = section
464 | animateOnValue = value
465 | val startDegree = (section * sectionDegree)
466 | val endDegree = ((section+1) * sectionDegree)
467 |
468 | middleAnimatingDegreeValue = (startDegree + endDegree) / 2
469 | animatingDegreeValue = if(isIncreasing) {
470 | middleAnimatingDegreeValue
471 | }else{
472 | startDegree
473 | }
474 |
475 | var anim = if(isIncreasing) {
476 | ValueAnimator.ofFloat(animatingDegreeValue, startDegree)
477 | }else {
478 | ValueAnimator.ofFloat(startDegree, (startDegree + endDegree) / 2)
479 | }
480 |
481 | anim.interpolator = AccelerateInterpolator()
482 | anim.duration = 200
483 | anim.addUpdateListener {
484 | animatingDegreeValue = anim.animatedValue as Float
485 | invalidate()
486 | }
487 | anim.start()
488 | }
489 |
490 | fun getUnFilledColor(section: Int) : Int{
491 | if(section<0 || section>(sectionsCount-1))return 0
492 | return unfilledColors[section]
493 | }
494 | fun setUnFilldeColor(section: Int,color : Int){
495 | if(section<0 || section>(sectionsCount-1))return
496 | unfilledColors[section] = color
497 | invalidate()
498 | }
499 |
500 | fun getFilledColor(section: Int) : Int{
501 | if(section<0 || section>(sectionsCount-1))return 0
502 | return filledColors[section]
503 | }
504 | fun setFilldeColor(section: Int,color : Int){
505 | if(section<0 || section>(sectionsCount-1))return
506 | filledColors[section] = color
507 | invalidate()
508 | }
509 |
510 | fun setSectionIcons(sectionIcons : MutableList){
511 | this.sectionIcons = sectionIcons
512 | invalidate()
513 | }
514 |
515 |
516 | var downX = 0f
517 | var downY = 0f
518 | var touchingSection : Int = -1
519 | var touchingSectionValue : Int = -1
520 | override fun onTouchEvent(event: MotionEvent?): Boolean {
521 | when(event?.action){
522 | MotionEvent.ACTION_DOWN -> {
523 | downX = event.x
524 | downY = event.y
525 |
526 | if(allowSettingValueByTouch) {
527 | val secLine = handleTouchSectionLine(downX, downY)
528 | touchingSection = secLine.first
529 | touchingSectionValue = secLine.second
530 |
531 | setSectionValue(secLine.first, secLine.second)
532 | listener?.onStartSettingSectionValue(secLine.first, secLine.second)
533 | }
534 | }
535 | MotionEvent.ACTION_UP -> {
536 | if(downX==event.x && downY==event.y){
537 | //Click happened
538 | handleOnClick(event)
539 | }
540 |
541 | if(touchingSection!=-1 && touchingSectionValue!=-1) {
542 | listener?.onFinishedSettingSectionValue(touchingSection,touchingSectionValue)
543 | touchingSection = -1
544 | touchingSectionValue = -1
545 | }
546 | }
547 | MotionEvent.ACTION_MOVE -> {
548 | val secLine = handleTouchSectionLine(event.x,event.y)
549 |
550 | if(touchingSection == secLine.first && touchingSection!=-1) {
551 | if(touchingSectionValue != secLine.second) {
552 | setSectionValue(secLine.first, secLine.second)
553 | listener?.onContinueSettingSectionValue(secLine.first, secLine.second)
554 | }
555 |
556 | touchingSectionValue = secLine.second
557 | }
558 |
559 | }
560 | }
561 | return true
562 | }
563 |
564 | private fun handleTouchSectionLine(touchX: Float, touchY: Float) : Pair {
565 | //To move center of screen as 0, 0 point
566 | var dX = (touchX - (width/2)).toDouble()
567 | var dY = (touchY - (height/2)).toDouble()
568 |
569 | var r = Math.sqrt(dX*dX + dY*dY)
570 | var theta = Math.toDegrees(Math.atan2(dY, dX))
571 |
572 | if(theta<0)
573 | theta = 180 + (180 - Math.abs(theta))
574 |
575 |
576 | var foundSection : Int = -1
577 | for(i in 0..(sectionsCount-1)){
578 | //StartDegree of current checking section
579 | val startDegree = startDegreeOffset + (i*sectionDegree)
580 | if(theta >= startDegree && theta <= startDegree + sectionDegree){
581 | //Section is Found!!
582 | foundSection = i
583 | break
584 | }
585 | }
586 |
587 |
588 | var foundLine : Int = -1
589 | for(i in 1..linesCount){
590 | //Current checking line distance
591 | val distance = midStartExtraOffset/2 + i*(linesWidth+linesSpace)
592 |
593 | if(r <= midStartExtraOffset/2){
594 | foundLine = 0
595 | break
596 | }
597 |
598 | if(r <= distance){
599 | //Line is Found!!
600 | foundLine = i
601 | break
602 | }
603 | }
604 |
605 | if(foundLine==-1)foundLine = linesCount
606 |
607 | return Pair(foundSection,foundLine)
608 | }
609 |
610 | private fun handleOnClick(event: MotionEvent) {
611 | val iconsRect = getDrawingIconsRect()
612 |
613 | for(j in 0..(iconsRect.size-1)){
614 | val r = iconsRect[j] ?: break
615 |
616 | if(r.contains(event.x.toInt(), event.y.toInt())){
617 | //icon in Section j clicked
618 | listener?.onSectionsIconClicked(j)
619 | }
620 |
621 | }
622 | }
623 |
624 |
625 | override fun onSaveInstanceState(): Parcelable {
626 | val superState = super.onSaveInstanceState()
627 | val ss = SavedState(superState)
628 | ss.linesCount = linesCount
629 | ss.linesWidth = linesWidth
630 | ss.linesSpace = linesSpace
631 | ss.sectionsCount = sectionsCount
632 | ss.sectionsSpace = sectionsSpace
633 | ss.midStartExtraOffset = midStartExtraOffset
634 | ss.iconSize = iconSize
635 | ss.iconMargin = iconMargin
636 | ss.startDegreeOffset = startDegreeOffset
637 | ss.allowSettingValueByTouch = allowSettingValueByTouch
638 | ss.allowAnimationsOnSetValue = allowAnimationsOnSetValue
639 | ss.sectionsValue = sectionsValue
640 | ss.sectionDegree = sectionDegree
641 | return ss
642 | }
643 |
644 | override fun onRestoreInstanceState(state: Parcelable?) {
645 | val savedState = state as SavedState
646 | super.onRestoreInstanceState(savedState.superState)
647 | linesCount = savedState.linesCount
648 | linesWidth = savedState.linesWidth
649 | linesSpace = savedState.linesSpace
650 | sectionsCount = savedState.sectionsCount
651 | sectionsSpace = savedState.sectionsSpace
652 | midStartExtraOffset = savedState.midStartExtraOffset
653 | iconSize = savedState.iconSize
654 | iconMargin = savedState.iconMargin
655 | startDegreeOffset = savedState.startDegreeOffset
656 | allowSettingValueByTouch = savedState.allowSettingValueByTouch
657 | allowAnimationsOnSetValue = savedState.allowAnimationsOnSetValue
658 | sectionsValue = savedState.sectionsValue
659 | sectionDegree = savedState.sectionDegree
660 | }
661 |
662 |
663 | class SavedState : BaseSavedState{
664 | companion object CREATOR : Parcelable.Creator{
665 | override fun createFromParcel(source: Parcel?) = SavedState(source)
666 | override fun newArray(size: Int) = arrayOfNulls(size)
667 | }
668 |
669 |
670 | var linesCount : Int = 0
671 | var linesWidth: Float = 0f
672 | var linesSpace : Float = 0f
673 | var sectionsCount : Int = 0
674 | var sectionsSpace: Float = 0f
675 | var midStartExtraOffset: Float = 0f
676 | var iconSize: Float = 0f
677 | var iconMargin: Float = 0f
678 | var startDegreeOffset: Float = 0f
679 | var allowSettingValueByTouch = true
680 | var allowAnimationsOnSetValue = true
681 | var sectionsValue : Array = emptyArray()
682 | var sectionDegree : Float = 0f
683 |
684 | constructor(parcelable: Parcelable) : super(parcelable)
685 | constructor(parcel : Parcel?) : super(parcel){
686 | parcel?.let {
687 | linesCount = it.readInt()
688 | linesWidth = it.readFloat()
689 | linesSpace = it.readFloat()
690 | sectionsCount = it.readInt()
691 | sectionsSpace = it.readFloat()
692 | midStartExtraOffset = it.readFloat()
693 | iconSize = it.readFloat()
694 | iconMargin = it.readFloat()
695 | startDegreeOffset = it.readFloat()
696 | allowSettingValueByTouch = it.readByte() == 1.toByte()
697 | allowAnimationsOnSetValue = it.readByte() == 1.toByte()
698 | sectionsValue = it.readArray(ClassLoader.getSystemClassLoader()) as Array
699 | sectionDegree = it.readFloat()
700 | }
701 |
702 | }
703 |
704 | override fun writeToParcel(out: Parcel?, flags: Int) {
705 | super.writeToParcel(out, flags)
706 |
707 | out?.let {
708 | it.writeInt(linesCount)
709 | it.writeFloat(linesWidth)
710 | it.writeFloat(linesSpace)
711 | it.writeInt(sectionsCount)
712 | it.writeFloat(sectionsSpace)
713 | it.writeFloat(midStartExtraOffset)
714 | it.writeFloat(iconSize)
715 | it.writeFloat(iconMargin)
716 | it.writeFloat(startDegreeOffset)
717 | it.writeByte(if(allowSettingValueByTouch) 1 else 0)
718 | it.writeByte(if(allowAnimationsOnSetValue) 1 else 0)
719 | it.writeArray(sectionsValue)
720 | it.writeFloat(sectionDegree)
721 | }
722 | }
723 | }
724 |
725 | interface AcvListener {
726 | fun onSectionsIconClicked(sectionPos : Int){}
727 | fun onStartSettingSectionValue(sectionPos : Int, sectionValue : Int){}
728 | fun onContinueSettingSectionValue(sectionPos : Int, sectionValue : Int){}
729 | fun onFinishedSettingSectionValue(sectionPos : Int, sectionValue : Int){}
730 | }
731 | }
--------------------------------------------------------------------------------
/arcchartview/src/main/java/com/neo/arcchartview/DpHandler.kt:
--------------------------------------------------------------------------------
1 | package com.neo.arcchartview
2 |
3 | import android.content.Context
4 | import android.util.DisplayMetrics
5 |
6 | /**
7 | * Created by iman.
8 | * iman.neofight@gmail.com
9 | */
10 | class DpHandler {
11 | companion object {
12 |
13 | fun dpToPx(ctx: Context, dp: Int): Int {
14 | val displayMetrics = ctx.resources.displayMetrics
15 | return Math.round(dp * (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT))
16 | }
17 |
18 | fun pxToDp(ctx: Context, px: Int): Int {
19 | val displayMetrics = ctx.resources.displayMetrics
20 | return Math.round(px / (displayMetrics.xdpi / DisplayMetrics.DENSITY_DEFAULT))
21 | }
22 |
23 | }
24 | }
--------------------------------------------------------------------------------
/arcchartview/src/main/res/drawable/ic_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/arcchartview/src/main/res/drawable/ic_star.png
--------------------------------------------------------------------------------
/arcchartview/src/main/res/values/attrs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/arcchartview/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | #00ff80
5 | #d2fde7
6 |
7 | #0caf00
8 | #defddc
9 |
10 | #009baf
11 | #d8fbff
12 |
13 | #5a00af
14 | #e6ccff
15 |
16 | #b700ff
17 | #f2cfff
18 |
19 | #d94f00
20 | #fedbc8
21 |
22 | #ff0000
23 | #fbd2d2
24 |
25 | #ffe100
26 | #fffbdf
27 |
28 |
--------------------------------------------------------------------------------
/arcchartview/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | ArcChartView
3 |
4 |
--------------------------------------------------------------------------------
/arcchartview/src/test/java/com/neo/arcchartview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.neo.arcchartview;
2 |
3 | import org.junit.Test;
4 |
5 | import static org.junit.Assert.*;
6 |
7 | /**
8 | * Example local unit test, which will execute on the development machine (host).
9 | *
10 | * @see Testing documentation
11 | */
12 | public class ExampleUnitTest {
13 | @Test
14 | public void addition_isCorrect() throws Exception {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/build.gradle:
--------------------------------------------------------------------------------
1 | // Top-level build file where you can add configuration options common to all sub-projects/modules.
2 |
3 | buildscript {
4 | ext.kotlin_version = '1.2.10'
5 | ext.kotlin_version = '1.1.60'
6 | repositories {
7 | google()
8 | jcenter()
9 | }
10 | dependencies {
11 | classpath 'com.android.tools.build:gradle:3.0.1'
12 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
13 |
14 | // NOTE: Do not place your application dependencies here; they belong
15 | // in the individual module build.gradle files
16 | }
17 | }
18 |
19 | allprojects {
20 | repositories {
21 | google()
22 | jcenter()
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 |
3 | # IDE (e.g. Android Studio) users:
4 | # Gradle settings configured through the IDE *will override*
5 | # any settings specified in this file.
6 |
7 | # For more details on how to configure your build environment visit
8 | # http://www.gradle.org/docs/current/userguide/build_environment.html
9 |
10 | # Specifies the JVM arguments used for the daemon process.
11 | # The setting is particularly useful for tweaking memory settings.
12 | org.gradle.jvmargs=-Xmx1536m
13 |
14 | # When configured, Gradle will run in incubating parallel mode.
15 | # This option should only be used with decoupled projects. More details, visit
16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
17 | # org.gradle.parallel=true
18 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Tue Dec 19 21:11:52 IRST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
10 | DEFAULT_JVM_OPTS=""
11 |
12 | APP_NAME="Gradle"
13 | APP_BASE_NAME=`basename "$0"`
14 |
15 | # Use the maximum available, or set MAX_FD != -1 to use that value.
16 | MAX_FD="maximum"
17 |
18 | warn ( ) {
19 | echo "$*"
20 | }
21 |
22 | die ( ) {
23 | echo
24 | echo "$*"
25 | echo
26 | exit 1
27 | }
28 |
29 | # OS specific support (must be 'true' or 'false').
30 | cygwin=false
31 | msys=false
32 | darwin=false
33 | case "`uname`" in
34 | CYGWIN* )
35 | cygwin=true
36 | ;;
37 | Darwin* )
38 | darwin=true
39 | ;;
40 | MINGW* )
41 | msys=true
42 | ;;
43 | esac
44 |
45 | # Attempt to set APP_HOME
46 | # Resolve links: $0 may be a link
47 | PRG="$0"
48 | # Need this for relative symlinks.
49 | while [ -h "$PRG" ] ; do
50 | ls=`ls -ld "$PRG"`
51 | link=`expr "$ls" : '.*-> \(.*\)$'`
52 | if expr "$link" : '/.*' > /dev/null; then
53 | PRG="$link"
54 | else
55 | PRG=`dirname "$PRG"`"/$link"
56 | fi
57 | done
58 | SAVED="`pwd`"
59 | cd "`dirname \"$PRG\"`/" >/dev/null
60 | APP_HOME="`pwd -P`"
61 | cd "$SAVED" >/dev/null
62 |
63 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
64 |
65 | # Determine the Java command to use to start the JVM.
66 | if [ -n "$JAVA_HOME" ] ; then
67 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
68 | # IBM's JDK on AIX uses strange locations for the executables
69 | JAVACMD="$JAVA_HOME/jre/sh/java"
70 | else
71 | JAVACMD="$JAVA_HOME/bin/java"
72 | fi
73 | if [ ! -x "$JAVACMD" ] ; then
74 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
75 |
76 | Please set the JAVA_HOME variable in your environment to match the
77 | location of your Java installation."
78 | fi
79 | else
80 | JAVACMD="java"
81 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
82 |
83 | Please set the JAVA_HOME variable in your environment to match the
84 | location of your Java installation."
85 | fi
86 |
87 | # Increase the maximum file descriptors if we can.
88 | if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then
89 | MAX_FD_LIMIT=`ulimit -H -n`
90 | if [ $? -eq 0 ] ; then
91 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
92 | MAX_FD="$MAX_FD_LIMIT"
93 | fi
94 | ulimit -n $MAX_FD
95 | if [ $? -ne 0 ] ; then
96 | warn "Could not set maximum file descriptor limit: $MAX_FD"
97 | fi
98 | else
99 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
100 | fi
101 | fi
102 |
103 | # For Darwin, add options to specify how the application appears in the dock
104 | if $darwin; then
105 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
106 | fi
107 |
108 | # For Cygwin, switch paths to Windows format before running java
109 | if $cygwin ; then
110 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
111 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
112 | JAVACMD=`cygpath --unix "$JAVACMD"`
113 |
114 | # We build the pattern for arguments to be converted via cygpath
115 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
116 | SEP=""
117 | for dir in $ROOTDIRSRAW ; do
118 | ROOTDIRS="$ROOTDIRS$SEP$dir"
119 | SEP="|"
120 | done
121 | OURCYGPATTERN="(^($ROOTDIRS))"
122 | # Add a user-defined pattern to the cygpath arguments
123 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
124 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
125 | fi
126 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
127 | i=0
128 | for arg in "$@" ; do
129 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
130 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
131 |
132 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
133 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
134 | else
135 | eval `echo args$i`="\"$arg\""
136 | fi
137 | i=$((i+1))
138 | done
139 | case $i in
140 | (0) set -- ;;
141 | (1) set -- "$args0" ;;
142 | (2) set -- "$args0" "$args1" ;;
143 | (3) set -- "$args0" "$args1" "$args2" ;;
144 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
145 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
146 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
147 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
148 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
149 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
150 | esac
151 | fi
152 |
153 | # Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
154 | function splitJvmOpts() {
155 | JVM_OPTS=("$@")
156 | }
157 | eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
158 | JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
159 |
160 | exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"
161 |
--------------------------------------------------------------------------------
/gradlew.bat:
--------------------------------------------------------------------------------
1 | @if "%DEBUG%" == "" @echo off
2 | @rem ##########################################################################
3 | @rem
4 | @rem Gradle startup script for Windows
5 | @rem
6 | @rem ##########################################################################
7 |
8 | @rem Set local scope for the variables with windows NT shell
9 | if "%OS%"=="Windows_NT" setlocal
10 |
11 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
12 | set DEFAULT_JVM_OPTS=
13 |
14 | set DIRNAME=%~dp0
15 | if "%DIRNAME%" == "" set DIRNAME=.
16 | set APP_BASE_NAME=%~n0
17 | set APP_HOME=%DIRNAME%
18 |
19 | @rem Find java.exe
20 | if defined JAVA_HOME goto findJavaFromJavaHome
21 |
22 | set JAVA_EXE=java.exe
23 | %JAVA_EXE% -version >NUL 2>&1
24 | if "%ERRORLEVEL%" == "0" goto init
25 |
26 | echo.
27 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
28 | echo.
29 | echo Please set the JAVA_HOME variable in your environment to match the
30 | echo location of your Java installation.
31 |
32 | goto fail
33 |
34 | :findJavaFromJavaHome
35 | set JAVA_HOME=%JAVA_HOME:"=%
36 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe
37 |
38 | if exist "%JAVA_EXE%" goto init
39 |
40 | echo.
41 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
42 | echo.
43 | echo Please set the JAVA_HOME variable in your environment to match the
44 | echo location of your Java installation.
45 |
46 | goto fail
47 |
48 | :init
49 | @rem Get command-line arguments, handling Windowz variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 | if "%@eval[2+2]" == "4" goto 4NT_args
53 |
54 | :win9xME_args
55 | @rem Slurp the command line arguments.
56 | set CMD_LINE_ARGS=
57 | set _SKIP=2
58 |
59 | :win9xME_args_slurp
60 | if "x%~1" == "x" goto execute
61 |
62 | set CMD_LINE_ARGS=%*
63 | goto execute
64 |
65 | :4NT_args
66 | @rem Get arguments from the 4NT Shell from JP Software
67 | set CMD_LINE_ARGS=%$
68 |
69 | :execute
70 | @rem Setup the command line
71 |
72 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
73 |
74 | @rem Execute Gradle
75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
76 |
77 | :end
78 | @rem End local scope for the variables with windows NT shell
79 | if "%ERRORLEVEL%"=="0" goto mainEnd
80 |
81 | :fail
82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
83 | rem the _cmd.exe /c_ return code!
84 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
85 | exit /b 1
86 |
87 | :mainEnd
88 | if "%OS%"=="Windows_NT" endlocal
89 |
90 | :omega
91 |
--------------------------------------------------------------------------------
/repo_files/AcvDemo-1-0-2.apk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/AcvDemo-1-0-2.apk
--------------------------------------------------------------------------------
/repo_files/images/demoo.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/images/demoo.gif
--------------------------------------------------------------------------------
/repo_files/images/sample1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/images/sample1.gif
--------------------------------------------------------------------------------
/repo_files/images/sample2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/images/sample2.png
--------------------------------------------------------------------------------
/repo_files/images/sample3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/images/sample3.png
--------------------------------------------------------------------------------
/repo_files/images/sample4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/images/sample4.png
--------------------------------------------------------------------------------
/repo_files/images/sample5.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/images/sample5.gif
--------------------------------------------------------------------------------
/repo_files/images/sample6.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/images/sample6.gif
--------------------------------------------------------------------------------
/repo_files/images/sample_change_color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/images/sample_change_color.png
--------------------------------------------------------------------------------
/repo_files/images/sample_icons.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/imaNNeo/ArcChartView/56b77356d32a2643932096918b915c9793be6f75/repo_files/images/sample_icons.png
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':arcchartview'
2 |
--------------------------------------------------------------------------------