├── .DS_Store
├── .gradle
├── 5.4.1
│ ├── executionHistory
│ │ ├── executionHistory.bin
│ │ └── executionHistory.lock
│ ├── fileChanges
│ │ └── last-build.bin
│ ├── fileContent
│ │ └── fileContent.lock
│ ├── fileHashes
│ │ ├── fileHashes.bin
│ │ ├── fileHashes.lock
│ │ └── resourceHashesCache.bin
│ ├── gc.properties
│ └── javaCompile
│ │ ├── classAnalysis.bin
│ │ ├── jarAnalysis.bin
│ │ ├── javaCompile.lock
│ │ └── taskHistory.bin
├── buildOutputCleanup
│ ├── buildOutputCleanup.lock
│ ├── cache.properties
│ └── outputFiles.bin
└── vcs-1
│ └── gc.properties
├── .idea
├── caches
│ └── build_file_checksums.ser
├── codeStyles
│ └── Project.xml
├── gradle.xml
├── libraries
│ ├── Gradle__androidx_activity_activity_1_0_0_aar.xml
│ ├── Gradle__androidx_annotation_annotation_1_1_0_jar.xml
│ ├── Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml
│ ├── Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml
│ ├── Gradle__androidx_arch_core_core_common_2_1_0_jar.xml
│ ├── Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml
│ ├── Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml
│ ├── Gradle__androidx_cardview_cardview_1_0_0_aar.xml
│ ├── Gradle__androidx_collection_collection_1_1_0_jar.xml
│ ├── Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml
│ ├── Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml
│ ├── Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_core_core_1_1_0_aar.xml
│ ├── Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml
│ ├── Gradle__androidx_customview_customview_1_0_0_aar.xml
│ ├── Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml
│ ├── Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_fragment_fragment_1_1_0_aar.xml
│ ├── Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml
│ ├── Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml
│ ├── Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml
│ ├── Gradle__androidx_loader_loader_1_0_0_aar.xml
│ ├── Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml
│ ├── Gradle__androidx_print_print_1_0_0_aar.xml
│ ├── Gradle__androidx_recyclerview_recyclerview_1_0_0_aar.xml
│ ├── Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml
│ ├── Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml
│ ├── Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml
│ ├── Gradle__androidx_test_core_1_2_0_aar.xml
│ ├── Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml
│ ├── Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml
│ ├── Gradle__androidx_test_ext_junit_1_1_1_aar.xml
│ ├── Gradle__androidx_test_monitor_1_2_0_aar.xml
│ ├── Gradle__androidx_test_runner_1_2_0_aar.xml
│ ├── Gradle__androidx_transition_transition_1_0_0_aar.xml
│ ├── Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml
│ ├── Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml
│ ├── Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml
│ ├── Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml
│ ├── Gradle__ch_ielse_switchbutton_1_0_1_aar.xml
│ ├── Gradle__com_github_CymChad_BaseRecyclerViewAdapterHelper_2_9_30_aar.xml
│ ├── Gradle__com_github_NoEndToLF_PieRotateView_1_0_3_aar.xml
│ ├── Gradle__com_github_duanhong169_checkerboarddrawable_1_0_2_aar.xml
│ ├── Gradle__com_github_duanhong169_colorpicker_1_1_6_aar.xml
│ ├── Gradle__com_github_duanhong169_logger_1_0_0_aar.xml
│ ├── Gradle__com_google_android_material_material_1_0_0_aar.xml
│ ├── Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
│ ├── Gradle__com_jakewharton_butterknife_10_0_0_aar.xml
│ ├── Gradle__com_jakewharton_butterknife_annotations_10_0_0_jar.xml
│ ├── Gradle__com_jakewharton_butterknife_runtime_10_0_0_aar.xml
│ ├── Gradle__com_squareup_javawriter_2_1_1_jar.xml
│ ├── Gradle__javax_inject_javax_inject_1_jar.xml
│ ├── Gradle__junit_junit_4_12_jar.xml
│ ├── Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml
│ ├── Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
│ ├── Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
│ └── Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
├── misc.xml
├── modules.xml
├── runConfigurations.xml
├── vcs.xml
└── workspace.xml
├── DemoImg
├── demo1.gif
└── demo2.gif
├── PieRotateView.iml
├── README.md
├── app
├── .gitignore
├── PieRotateView-app.iml
├── app.iml
├── build.gradle
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── aice
│ │ └── pierotateview
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── aice
│ │ │ └── pierotateview
│ │ │ ├── MainActivity.java
│ │ │ ├── NormalActivity.java
│ │ │ ├── SwipRefreshAppbarActivity.java
│ │ │ └── listener
│ │ │ └── AppBarLayoutStateChangeListener.java
│ └── res
│ │ ├── drawable-v24
│ │ └── ic_launcher_foreground.xml
│ │ ├── drawable
│ │ └── ic_launcher_background.xml
│ │ ├── layout
│ │ ├── activity_main.xml
│ │ ├── activity_normal.xml
│ │ └── activity_swiprefresh_appbar.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ └── ic_launcher_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── strings.xml
│ │ └── styles.xml
│ └── test
│ └── java
│ └── com
│ └── aice
│ └── pierotateview
│ └── ExampleUnitTest.java
├── build.gradle
├── gradle.properties
├── gradle
└── wrapper
│ ├── gradle-wrapper.jar
│ └── gradle-wrapper.properties
├── gradlew
├── gradlew.bat
├── local.properties
├── pierotateviewlibrary
├── .gitignore
├── PieRotateView-pierotateviewlibrary.iml
├── build.gradle
├── consumer-rules.pro
├── pierotateviewlibrary.iml
├── proguard-rules.pro
└── src
│ ├── androidTest
│ └── java
│ │ └── com
│ │ └── wxy
│ │ └── pierotateview
│ │ └── ExampleInstrumentedTest.java
│ ├── main
│ ├── AndroidManifest.xml
│ ├── java
│ │ └── com
│ │ │ └── wxy
│ │ │ └── pierotateview
│ │ │ ├── model
│ │ │ └── PieRotateViewModel.java
│ │ │ └── view
│ │ │ └── PieRotateView.java
│ └── res
│ │ └── values
│ │ └── strings.xml
│ └── test
│ └── java
│ └── com
│ └── wxy
│ └── pierotateview
│ └── ExampleUnitTest.java
└── settings.gradle
/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.DS_Store
--------------------------------------------------------------------------------
/.gradle/5.4.1/executionHistory/executionHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/executionHistory/executionHistory.bin
--------------------------------------------------------------------------------
/.gradle/5.4.1/executionHistory/executionHistory.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/executionHistory/executionHistory.lock
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileContent/fileContent.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/fileContent/fileContent.lock
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileHashes/fileHashes.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/fileHashes/fileHashes.bin
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/5.4.1/fileHashes/resourceHashesCache.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/fileHashes/resourceHashesCache.bin
--------------------------------------------------------------------------------
/.gradle/5.4.1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/gc.properties
--------------------------------------------------------------------------------
/.gradle/5.4.1/javaCompile/classAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/javaCompile/classAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/5.4.1/javaCompile/jarAnalysis.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/javaCompile/jarAnalysis.bin
--------------------------------------------------------------------------------
/.gradle/5.4.1/javaCompile/javaCompile.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/javaCompile/javaCompile.lock
--------------------------------------------------------------------------------
/.gradle/5.4.1/javaCompile/taskHistory.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/5.4.1/javaCompile/taskHistory.bin
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Fri Dec 13 10:51:20 CST 2019
2 | gradle.version=5.4.1
3 |
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/outputFiles.bin:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/buildOutputCleanup/outputFiles.bin
--------------------------------------------------------------------------------
/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/.idea/caches/build_file_checksums.ser:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/.idea/caches/build_file_checksums.ser
--------------------------------------------------------------------------------
/.idea/codeStyles/Project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | xmlns:android
14 |
15 | ^$
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | xmlns:.*
25 |
26 | ^$
27 |
28 |
29 | BY_NAME
30 |
31 |
32 |
33 |
34 |
35 |
36 | .*:id
37 |
38 | http://schemas.android.com/apk/res/android
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | .*:name
48 |
49 | http://schemas.android.com/apk/res/android
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | name
59 |
60 | ^$
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 | style
70 |
71 | ^$
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 | .*
81 |
82 | ^$
83 |
84 |
85 | BY_NAME
86 |
87 |
88 |
89 |
90 |
91 |
92 | .*
93 |
94 | http://schemas.android.com/apk/res/android
95 |
96 |
97 | ANDROID_ATTRIBUTE_ORDER
98 |
99 |
100 |
101 |
102 |
103 |
104 | .*
105 |
106 | .*
107 |
108 |
109 | BY_NAME
110 |
111 |
112 |
113 |
114 |
115 |
116 |
--------------------------------------------------------------------------------
/.idea/gradle.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_activity_activity_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_annotation_annotation_1_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_appcompat_appcompat_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_appcompat_appcompat_resources_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_common_2_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_arch_core_core_runtime_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_asynclayoutinflater_asynclayoutinflater_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_cardview_cardview_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_collection_collection_1_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_1_1_3_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_constraintlayout_constraintlayout_solver_1_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_coordinatorlayout_coordinatorlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_core_core_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_cursoradapter_cursoradapter_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_customview_customview_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_documentfile_documentfile_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_drawerlayout_drawerlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_fragment_fragment_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_interpolator_interpolator_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_ui_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_legacy_legacy_support_core_utils_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_common_2_1_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_livedata_core_2_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_runtime_2_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_lifecycle_lifecycle_viewmodel_2_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_loader_loader_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_localbroadcastmanager_localbroadcastmanager_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_print_print_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_recyclerview_recyclerview_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_savedstate_savedstate_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_slidingpanelayout_slidingpanelayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_swiperefreshlayout_swiperefreshlayout_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_core_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_espresso_espresso_core_3_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_espresso_espresso_idling_resource_3_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_ext_junit_1_1_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_monitor_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_test_runner_1_2_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_transition_transition_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_vectordrawable_vectordrawable_animated_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_versionedparcelable_versionedparcelable_1_1_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__androidx_viewpager_viewpager_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__ch_ielse_switchbutton_1_0_1_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_github_CymChad_BaseRecyclerViewAdapterHelper_2_9_30_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_github_NoEndToLF_PieRotateView_1_0_3_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_github_duanhong169_checkerboarddrawable_1_0_2_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_github_duanhong169_colorpicker_1_1_6_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_github_duanhong169_logger_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_google_android_material_material_1_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_jakewharton_butterknife_10_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_jakewharton_butterknife_annotations_10_0_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_jakewharton_butterknife_runtime_10_0_0_aar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__junit_junit_4_12_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/.idea/runConfigurations.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/DemoImg/demo1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/DemoImg/demo1.gif
--------------------------------------------------------------------------------
/DemoImg/demo2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/DemoImg/demo2.gif
--------------------------------------------------------------------------------
/PieRotateView.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # PieRotateView
2 |
3 | [](https://jitpack.io/#NoEndToLF/PieRotateView)
4 |
5 | **PieRotateView**:这是一个可旋转,自动回弹,可惯性旋转的饼状图,多属性控制,使用简单,具备一个自定义View应有的基本素质
6 |
7 | * **原理** :自定义坐标象限,Move事件中不断叠加划过的角度,重绘arcPath,判断滑动或者点击到某个区块使用Region。
8 | * **功能** :
9 | * 1、可跟随手势旋转、旋转完自动回弹到区块中心。
10 | * 2、惯性旋转+旋转完后回弹到区块中心。
11 | * 3、点击某个区块自动旋转至该区块中心。
12 | * 4、指针箭头指到某个区块内发送区块select事件。
13 | * 5、提供了刷新入口(设置属性刷新、Data改变刷新)
14 | * **基本素质** :
15 | * 1、旋转屏幕状态不丢失,转之前啥样,回来还是啥样(处理好onSaveInstanceState和onRestoreInstanceState)
16 | * 2、暴露事件冲突接口,允许外界操作父控件的事件及该view自己的事件(因为这只是个View,没办法直接处理所有的滑动冲突场景)
17 | * 3、内存抖动要小,防止内存溢出。
18 | -------------------
19 | # 示例(真机流畅丝滑,压缩的GIF丢帧严重)
20 | ## Demo演示了普通用法和涉及到SwipeRefreshLayout+AppBarLayout等类似的滑动冲突的用法(细节请看代码)。
21 | * **1、普通使用** :没啥可说的,只有Down的点在圆的范围内才可以响应事件,否则通知父控件拦截
22 | * **2、下拉刷新及其他滑动冲突** :
23 | * 1、Down的点在圆内,通过onPromiseParentTouchListener方法中使用SwipeRefreshLayout.setEnabled(promise)通知外界设置SwipeRefreshLayout不可以滑动。
24 | * 2、在SwipeRefreshLayout的OnRefreshListener中设置PierotateView的setEnableTouch(false)方法通知刷新期间,PierotateView不响应任何事件。
25 | * 3、同理,监听AppBarLayout的滚动高度来控制只有完全展开才允许SwipeRefreshLayout下拉刷新和PierotateView旋转,否则都禁止
26 |
27 | | 常规使用 |下拉刷新及其他滑动冲突 |
28 | | :--------:| :--------:|
29 | || |
30 |
31 |
32 | # 开始使用
33 | * [基本API](#基本API)
34 | * [使用](#使用)
35 | * [引入](#引入)
36 | * [布局XML中添加](#布局XML中添加与系统View使用方式一样如果宽高只确定其一另一个取其相同值且圆的圆心由padding后的View中心圆的半径为宽高中的较小值和对应的padding决定)
37 | * [代码中设置Data和View属性](#Demo中的SwipRefreshAppbarActivity和NormalActivity中有详细使用代码)
38 | * [反馈与建议](#反馈与建议)
39 | # 基本API
40 | ## Data实例类 PieRotateViewModel,以下为使用期间会接触到的属性,前三个属性用于构造PieRotateViewModel,别的属性都是为绘制准备的,不用关心,也不用去设置。
41 |
42 | |属性 | 类型 |作用 |
43 | | :--------| :--------|:--: |
44 | | name| String|表示该扇形区块的名字|
45 | | num| float|表示该扇形区块的数字(决定它的百分比占比,总数为所有的PieRotateViewModel num叠加)|
46 | | color| int|表示该扇形区块的颜色|
47 | | percent| String|表示该扇形区块所占的百分比|
48 |
49 | ## PieRotateView
50 |
51 | |方法 |参数 | 作用 |
52 | | :--------| :--------| :--: |
53 | |setEnableTouch |boolean | 设置是否可以消费事件(默认为true) |
54 | |setPieRotateViewModelList |List | 设置Data |
55 | |setFling |boolean | 设置是否可以惯性滑动 |
56 | |setRecoverTime |int | 设置回弹动画的时长 |
57 | |setCircleColor |int | 设置中间遮罩圆的颜色 |
58 | |setTextColor |int | 设置中间Text文本的颜色 |
59 | |setArrawColor |int | 设置下方指针箭头的颜色 |
60 | |setOnSelectionListener |PieRotateView.onSelectionListener | 指针指向某个区块以及点击事件指向的区块事件回调 |
61 | |setOnPromiseParentTouchListener |PieRotateView.onPromiseParentTouchListener | 通知外界是否允许pierotateview之上的view拦截事件 |
62 | |notifyDataChanged |void | 通知pierotateview数据源发生了改变,重置相关初始属性,刷新View |
63 | |notifySettingChanged |void | 通知pierotateview某些设置发生了改变,刷新View |
64 |
65 | # 使用
66 | ## 引入
67 | Step 1. Add it in your root build.gradle at the end of repositories:
68 |
69 | allprojects {
70 | repositories {
71 | ...
72 | maven { url 'https://jitpack.io' }
73 | }
74 | }
75 | Step 2. Add the dependency
76 |
77 | dependencies {
78 | implementation 'com.github.NoEndToLF:PieRotateView:1.0.3'
79 | }
80 | ## 布局XML中添加
81 | ### 布局XML中添加,与系统View使用方式一样,如果宽高只确定其一,另一个取其相同值,且圆的圆心由padding后的View中心,圆的半径为宽高中的较小值和对应的padding决定
82 |
83 | ``` java
84 |
89 |
90 | ```
91 | ## 代码中设置Data和View属性
92 | ### Demo中的SwipRefreshAppbarActivity和NormalActivity中有详细使用代码
93 | #### 设置Data
94 |
95 | ``` java
96 | List list = new ArrayList<>();
97 | list.add(new PieRotateViewModel("红扇", 20, getResources().getColor(R.color.colorAccent)));
98 | list.add(new PieRotateViewModel("绿扇", 10, getResources().getColor(R.color.colorPrimaryDark)));
99 | list.add(new PieRotateViewModel("蓝扇", 10, Color.BLUE));
100 | list.add(new PieRotateViewModel("黄扇", 60, Color.parseColor("#FF7F00")));
101 | list.add(new PieRotateViewModel("粉扇", 50, Color.parseColor("#EE7AE9")));
102 | pie.setPieRotateViewModelList(list);
103 | ```
104 |
105 | #### 刷新Data,可以重新使用setPieRotateViewModelList,或者重置list后调用pie.notifyDataChangeChanged(),刷新期间禁止PieRotateView消费事件。
106 |
107 | ``` java
108 | swipe.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
109 | @Override
110 | public void onRefresh() {
111 | pie.setEnableTouch(false);
112 |
113 | new Handler().postDelayed(new Runnable() {
114 | @Override
115 | public void run() {
116 | list.clear();
117 | list.add(new PieRotateViewModel("红扇", 20, getResources().getColor(R.color.colorAccent)));
118 | list.add(new PieRotateViewModel("绿扇", 10, getResources().getColor(R.color.colorPrimaryDark)));
119 | pie.notifyDataChanged();
120 | swipe.setRefreshing(false);
121 | pie.setEnableTouch(true);
122 | }
123 | },2000);
124 | }
125 | });
126 | ```
127 | #### 添加区块选中回调;
128 | ``` java
129 | pie.setOnSelectionListener(new PieRotateView.onSelectionListener() {
130 | @Override
131 | public void onSelect(int position, String percent) {
132 | tvName.setText(list.get(position).getName() + "数额:" + list.get(position).getNum() + " 占比:" + percent);
133 | tvName.setTextColor(list.get(position).getColor());
134 | }
135 | });
136 | ```
137 | #### 添加事件处理回调,即通知外界是否要拦截事件;
138 | ``` java
139 | pie.setOnPromiseParentTouchListener(new PieRotateView.onPromiseParentTouchListener() {
140 | @Override
141 | public void onPromiseTouch(boolean promise) {
142 | swipe.setEnabled(promise);
143 | }
144 | });
145 | ```
146 | #### 修改pieratateview的其他属性,如果设置属性在setPieRotateViewModelList之前则不需要调用notifySettingChanged(),因为setPieRotateViewModelList会让View重绘,属性自然会生效,反之设置下方的属性后,需要再调用notifySettingChanged()通知View刷新,
147 |
148 | |方法 |参数 | 作用 |
149 | | :--------| :--------| :--: |
150 | |setFling |boolean | 设置是否可以惯性滑动 |
151 | |setRecoverTime |int | 设置回弹动画的时长 |
152 | |setCircleColor |int | 设置中间遮罩圆的颜色 |
153 | |setTextColor |int | 设置中间Text文本的颜色 |
154 | |setArrawColor |int | 设置下方指针箭头的颜色 |
155 |
156 | # 反馈与建议
157 | - 邮箱:
158 |
159 | # License
160 | ```
161 | Copyright (c) [2018] [static]
162 |
163 | Permission is hereby granted, free of charge, to any person obtaining a copy
164 | of this software and associated documentation files (the "Software"), to deal
165 | in the Software without restriction, including without limitation the rights
166 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
167 | copies of the Software, and to permit persons to whom the Software is
168 | furnished to do so, subject to the following conditions:
169 |
170 | The above copyright notice and this permission notice shall be included in all
171 | copies or substantial portions of the Software.
172 |
173 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
174 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
175 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
176 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
177 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
178 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
179 | SOFTWARE.
180 | ```
181 | ---------
182 |
183 |
--------------------------------------------------------------------------------
/app/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/app/PieRotateView-app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | generateDebugSources
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
--------------------------------------------------------------------------------
/app/app.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | generateDebugSources
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 |
145 |
146 |
147 |
148 |
149 |
150 |
151 |
152 |
153 |
154 |
155 |
--------------------------------------------------------------------------------
/app/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.application'
2 |
3 | android {
4 | compileSdkVersion 29
5 | buildToolsVersion "29.0.2"
6 | defaultConfig {
7 | applicationId "com.wxy.pierotateview"
8 | minSdkVersion 15
9 | targetSdkVersion 29
10 | versionCode 1
11 | versionName "1.0"
12 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
13 | }
14 | buildTypes {
15 | release {
16 | minifyEnabled false
17 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
18 | }
19 | }
20 | compileOptions {
21 | sourceCompatibility JavaVersion.VERSION_1_8
22 | targetCompatibility JavaVersion.VERSION_1_8
23 | }
24 | }
25 |
26 | dependencies {
27 | implementation fileTree(dir: 'libs', include: ['*.jar'])
28 | implementation 'androidx.appcompat:appcompat:1.1.0'
29 | implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
30 | testImplementation 'junit:junit:4.12'
31 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
32 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
33 | // implementation project(':pierotateviewlibrary')
34 | implementation 'com.github.NoEndToLF:PieRotateView:1.0.3'
35 | //butterknife
36 | implementation 'com.jakewharton:butterknife:10.0.0'
37 | annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
38 | //万能adapter
39 | implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
40 | //colorpicker
41 | implementation 'com.github.duanhong169:colorpicker:1.1.6'
42 | //switchbutton
43 | implementation 'ch.ielse:switchbutton:1.0.1'
44 | implementation 'com.android.support:design:29.0.0'
45 | implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'
46 | }
47 |
--------------------------------------------------------------------------------
/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/aice/pierotateview/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.aice.pierotateview;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.wxy.pierotateview", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
4 |
5 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/java/com/aice/pierotateview/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.aice.pierotateview;
2 |
3 | import android.content.Intent;
4 | import android.os.Bundle;
5 | import android.view.View;
6 | import android.widget.Button;
7 |
8 | import androidx.appcompat.app.AppCompatActivity;
9 | import butterknife.BindView;
10 | import butterknife.ButterKnife;
11 | import butterknife.OnClick;
12 |
13 | public class MainActivity extends AppCompatActivity {
14 |
15 | @BindView(R.id.btn_normal)
16 | Button btnNormal;
17 | @BindView(R.id.btn_refresh)
18 | Button btnRefresh;
19 |
20 | @Override
21 | protected void onCreate(Bundle savedInstanceState) {
22 | super.onCreate(savedInstanceState);
23 | setContentView(R.layout.activity_main);
24 | ButterKnife.bind(this);
25 | }
26 |
27 | @OnClick({R.id.btn_normal, R.id.btn_refresh})
28 | public void onViewClicked(View view) {
29 | switch (view.getId()) {
30 | case R.id.btn_normal:
31 | startActivity(new Intent(this,NormalActivity.class));
32 | break;
33 | case R.id.btn_refresh:
34 | startActivity(new Intent(this,SwipRefreshAppbarActivity.class));
35 |
36 | break;
37 | }
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/app/src/main/java/com/aice/pierotateview/NormalActivity.java:
--------------------------------------------------------------------------------
1 | package com.aice.pierotateview;
2 |
3 | import androidx.appcompat.app.AppCompatActivity;
4 | import androidx.appcompat.widget.AppCompatSeekBar;
5 | import butterknife.BindView;
6 | import butterknife.ButterKnife;
7 | import butterknife.OnClick;
8 | import ch.ielse.view.SwitchView;
9 | import top.defaults.colorpicker.ColorPickerPopup;
10 |
11 | import android.graphics.Color;
12 | import android.os.Bundle;
13 | import android.view.View;
14 | import android.widget.Button;
15 | import android.widget.LinearLayout;
16 | import android.widget.SeekBar;
17 | import android.widget.TextView;
18 |
19 | import com.wxy.pierotateview.model.PieRotateViewModel;
20 | import com.wxy.pierotateview.view.PieRotateView;
21 |
22 | import java.util.ArrayList;
23 | import java.util.List;
24 |
25 | public class NormalActivity extends AppCompatActivity {
26 | @BindView(R.id.pie)
27 | PieRotateView pie;
28 | @BindView(R.id.tv_name)
29 | TextView tvName;
30 | @BindView(R.id.btn_circle_color)
31 | Button btnCircleColor;
32 | @BindView(R.id.btn_text_color)
33 | Button btnTextColor;
34 | @BindView(R.id.btn_arraw_color)
35 | Button btnArrawColor;
36 | @BindView(R.id.linear_parent)
37 | LinearLayout linearParent;
38 | @BindView(R.id.switch_fling)
39 | SwitchView switchFling;
40 | @BindView(R.id.tv_fling)
41 | TextView tvFling;
42 | @BindView(R.id.seekbar)
43 | AppCompatSeekBar seekbar;
44 | @BindView(R.id.tv_recovre_time)
45 | TextView tvRecovreTime;
46 | @Override
47 | protected void onCreate(Bundle savedInstanceState) {
48 | super.onCreate(savedInstanceState);
49 | setContentView(R.layout.activity_normal);
50 | ButterKnife.bind(this);
51 |
52 | List list = new ArrayList<>();
53 | list.add(new PieRotateViewModel("红扇", 20, getResources().getColor(R.color.colorAccent)));
54 | list.add(new PieRotateViewModel("绿扇", 10, getResources().getColor(R.color.colorPrimaryDark)));
55 | list.add(new PieRotateViewModel("蓝扇", 10, Color.BLUE));
56 | list.add(new PieRotateViewModel("黄扇", 60, Color.parseColor("#FF7F00")));
57 | list.add(new PieRotateViewModel("粉扇", 50, Color.parseColor("#EE7AE9")));
58 | pie.setPieRotateViewModelList(list);
59 | pie.setOnSelectionListener(new PieRotateView.onSelectionListener() {
60 | @Override
61 | public void onSelect(int position, String percent) {
62 | tvName.setText(list.get(position).getName() + "数额:" + list.get(position).getNum() + " 占比:" + percent);
63 | tvName.setTextColor(list.get(position).getColor());
64 | }
65 | });
66 | if (pie.isFling()) {
67 | tvFling.setText("是否允许Fling:是");
68 | } else {
69 | tvFling.setText("是否允许Fling:否");
70 | }
71 | switchFling.setOnClickListener(new View.OnClickListener() {
72 | @Override
73 | public void onClick(View v) {
74 | if (switchFling.isOpened()) {
75 | pie.setFling(true);
76 | tvFling.setText("是否允许Fling:是");
77 | pie.notifySettingChanged();
78 | } else {
79 | pie.setFling(false);
80 | tvFling.setText("是否允许Fling:否");
81 |
82 | pie.notifySettingChanged();
83 | }
84 | }
85 | });
86 | seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
87 | @Override
88 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
89 | int recoverTime = (int) ((float) progress / 100 * 1000);
90 | pie.setRecoverTime(recoverTime);
91 | tvRecovreTime.setText("recoverTime:" + recoverTime);
92 | pie.notifySettingChanged();
93 | }
94 |
95 | @Override
96 | public void onStartTrackingTouch(SeekBar seekBar) {
97 |
98 | }
99 |
100 | @Override
101 | public void onStopTrackingTouch(SeekBar seekBar) {
102 |
103 | }
104 | });
105 | }
106 | @OnClick({R.id.btn_circle_color, R.id.btn_text_color, R.id.btn_arraw_color})
107 | public void onViewClicked(View view) {
108 | switch (view.getId()) {
109 | case R.id.btn_circle_color:
110 | new ColorPickerPopup.Builder(this)
111 | .initialColor(Color.RED) // Set initial color
112 | .enableBrightness(true) // Enable brightness slider or not
113 | .enableAlpha(true) // Enable alpha slider or not
114 | .okTitle("确定")
115 | .cancelTitle("取消")
116 | .showIndicator(true)
117 | .showValue(true)
118 | .build()
119 | .show(linearParent, new ColorPickerPopup.ColorPickerObserver() {
120 | @Override
121 | public void onColorPicked(int color) {
122 | pie.setCircleColor(color);
123 | pie.notifySettingChanged();
124 | }
125 | });
126 | break;
127 | case R.id.btn_text_color:
128 | new ColorPickerPopup.Builder(this)
129 | .initialColor(Color.RED) // Set initial color
130 | .enableBrightness(true) // Enable brightness slider or not
131 | .enableAlpha(true) // Enable alpha slider or not
132 | .okTitle("确定")
133 | .cancelTitle("取消")
134 | .showIndicator(true)
135 | .showValue(true)
136 | .build()
137 | .show(linearParent, new ColorPickerPopup.ColorPickerObserver() {
138 | @Override
139 | public void onColorPicked(int color) {
140 | pie.setTextColor(color);
141 | pie.notifySettingChanged();
142 | }
143 | });
144 | break;
145 | case R.id.btn_arraw_color:
146 | new ColorPickerPopup.Builder(this)
147 | .initialColor(Color.RED) // Set initial color
148 | .enableBrightness(true) // Enable brightness slider or not
149 | .enableAlpha(true) // Enable alpha slider or not
150 | .okTitle("确定")
151 | .cancelTitle("取消")
152 | .showIndicator(true)
153 | .showValue(true)
154 | .build()
155 | .show(linearParent, new ColorPickerPopup.ColorPickerObserver() {
156 | @Override
157 | public void onColorPicked(int color) {
158 | pie.setArrawColor(color);
159 | pie.notifySettingChanged();
160 | }
161 | });
162 | break;
163 | default:
164 | }
165 | }
166 | }
167 |
--------------------------------------------------------------------------------
/app/src/main/java/com/aice/pierotateview/SwipRefreshAppbarActivity.java:
--------------------------------------------------------------------------------
1 | package com.aice.pierotateview;
2 |
3 | import android.graphics.Color;
4 | import android.os.Bundle;
5 | import android.os.Handler;
6 | import android.view.View;
7 | import android.widget.Button;
8 | import android.widget.LinearLayout;
9 | import android.widget.SeekBar;
10 | import android.widget.TextView;
11 |
12 | import com.aice.pierotateview.listener.AppBarLayoutStateChangeListener;
13 | import com.google.android.material.appbar.AppBarLayout;
14 | import com.wxy.pierotateview.model.PieRotateViewModel;
15 | import com.wxy.pierotateview.view.PieRotateView;
16 |
17 | import java.util.ArrayList;
18 | import java.util.List;
19 |
20 | import androidx.appcompat.app.AppCompatActivity;
21 | import androidx.appcompat.widget.AppCompatSeekBar;
22 | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
23 | import butterknife.BindView;
24 | import butterknife.ButterKnife;
25 | import butterknife.OnClick;
26 | import ch.ielse.view.SwitchView;
27 | import top.defaults.colorpicker.ColorPickerPopup;
28 |
29 | import static com.aice.pierotateview.listener.AppBarLayoutStateChangeListener.State.EXPANDED;
30 |
31 |
32 | public class SwipRefreshAppbarActivity extends AppCompatActivity {
33 |
34 | @BindView(R.id.pie)
35 | PieRotateView pie;
36 | @BindView(R.id.tv_name)
37 | TextView tvName;
38 | @BindView(R.id.btn_circle_color)
39 | Button btnCircleColor;
40 | @BindView(R.id.btn_text_color)
41 | Button btnTextColor;
42 | @BindView(R.id.btn_arraw_color)
43 | Button btnArrawColor;
44 | @BindView(R.id.linear_parent)
45 | LinearLayout linearParent;
46 | @BindView(R.id.switch_fling)
47 | SwitchView switchFling;
48 | @BindView(R.id.tv_fling)
49 | TextView tvFling;
50 | @BindView(R.id.seekbar)
51 | AppCompatSeekBar seekbar;
52 | @BindView(R.id.tv_recovre_time)
53 | TextView tvRecovreTime;
54 | @BindView(R.id.swipe)
55 | SwipeRefreshLayout swipe;
56 | @BindView(R.id.appbar_layout)
57 | AppBarLayout appbarLayout;
58 | private AppBarLayoutStateChangeListener.State appbarState;
59 |
60 | @Override
61 | protected void onCreate(Bundle savedInstanceState) {
62 | super.onCreate(savedInstanceState);
63 | setContentView(R.layout.activity_swiprefresh_appbar);
64 | ButterKnife.bind(this);
65 | List list = new ArrayList<>();
66 | list.add(new PieRotateViewModel("红扇", 20, getResources().getColor(R.color.colorAccent)));
67 | list.add(new PieRotateViewModel("绿扇", 10, getResources().getColor(R.color.colorPrimaryDark)));
68 | list.add(new PieRotateViewModel("蓝扇", 10, Color.BLUE));
69 | list.add(new PieRotateViewModel("黄扇", 60, Color.parseColor("#FF7F00")));
70 | list.add(new PieRotateViewModel("粉扇", 50, Color.parseColor("#EE7AE9")));
71 | pie.setPieRotateViewModelList(list);
72 | pie.setOnPromiseParentTouchListener(new PieRotateView.onPromiseParentTouchListener() {
73 | @Override
74 | public void onPromiseTouch(boolean promise) {
75 | swipe.setEnabled(promise);
76 | }
77 | });
78 | swipe.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
79 | @Override
80 | public void onRefresh() {
81 | pie.setEnableTouch(false);
82 |
83 | new Handler().postDelayed(new Runnable() {
84 | @Override
85 | public void run() {
86 | list.clear();
87 | list.add(new PieRotateViewModel("红扇", 20, getResources().getColor(R.color.colorAccent)));
88 | list.add(new PieRotateViewModel("绿扇", 10, getResources().getColor(R.color.colorPrimaryDark)));
89 | pie.notifyDataChanged();
90 | swipe.setRefreshing(false);
91 | if (appbarState==EXPANDED){
92 | swipe.setEnabled(true);
93 | pie.setEnableTouch(true);
94 | }else {
95 | pie.setEnableTouch(false);
96 | swipe.setEnabled(false);
97 | }
98 | }
99 | },2000);
100 | }
101 | });
102 | appbarLayout.addOnOffsetChangedListener(new AppBarLayoutStateChangeListener() {
103 | @Override
104 | public void onStateChanged(AppBarLayout appBarLayout, State state) {
105 | appbarState=state;
106 | switch (state) {
107 | case EXPANDED:
108 | swipe.setEnabled(true);
109 | pie.setEnableTouch(true);
110 | break;
111 | case COLLAPSED:
112 | case INTERMEDIATE:
113 | if (!swipe.isRefreshing()){
114 | swipe.setEnabled(false);}
115 | pie.setEnableTouch(false);
116 | break;
117 | }
118 | }
119 | });
120 | pie.setOnSelectionListener(new PieRotateView.onSelectionListener() {
121 | @Override
122 | public void onSelect(int position, String percent) {
123 | tvName.setText(list.get(position).getName() + "数额:" + list.get(position).getNum() + " 占比:" + percent);
124 | tvName.setTextColor(list.get(position).getColor());
125 | }
126 | });
127 | if (pie.isFling()) {
128 | tvFling.setText("是否允许Fling:是");
129 | } else {
130 | tvFling.setText("是否允许Fling:否");
131 | }
132 | switchFling.setOnClickListener(new View.OnClickListener() {
133 | @Override
134 | public void onClick(View v) {
135 | if (switchFling.isOpened()) {
136 | pie.setFling(true);
137 | tvFling.setText("是否允许Fling:是");
138 | pie.notifySettingChanged();
139 | } else {
140 | pie.setFling(false);
141 | tvFling.setText("是否允许Fling:否");
142 |
143 | pie.notifySettingChanged();
144 | }
145 | }
146 | });
147 | seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
148 | @Override
149 | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
150 | int recoverTime = (int) ((float) progress / 100 * 1000);
151 | pie.setRecoverTime(recoverTime);
152 | tvRecovreTime.setText("recoverTime:" + recoverTime);
153 | pie.notifySettingChanged();
154 | }
155 |
156 | @Override
157 | public void onStartTrackingTouch(SeekBar seekBar) {
158 |
159 | }
160 |
161 | @Override
162 | public void onStopTrackingTouch(SeekBar seekBar) {
163 |
164 | }
165 | });
166 | }
167 |
168 | @OnClick({R.id.btn_circle_color, R.id.btn_text_color, R.id.btn_arraw_color})
169 | public void onViewClicked(View view) {
170 | switch (view.getId()) {
171 | case R.id.btn_circle_color:
172 | new ColorPickerPopup.Builder(this)
173 | .initialColor(Color.RED) // Set initial color
174 | .enableBrightness(true) // Enable brightness slider or not
175 | .enableAlpha(true) // Enable alpha slider or not
176 | .okTitle("确定")
177 | .cancelTitle("取消")
178 | .showIndicator(true)
179 | .showValue(true)
180 | .build()
181 | .show(linearParent, new ColorPickerPopup.ColorPickerObserver() {
182 | @Override
183 | public void onColorPicked(int color) {
184 | pie.setCircleColor(color);
185 | pie.notifySettingChanged();
186 | }
187 | });
188 | break;
189 | case R.id.btn_text_color:
190 | new ColorPickerPopup.Builder(this)
191 | .initialColor(Color.RED) // Set initial color
192 | .enableBrightness(true) // Enable brightness slider or not
193 | .enableAlpha(true) // Enable alpha slider or not
194 | .okTitle("确定")
195 | .cancelTitle("取消")
196 | .showIndicator(true)
197 | .showValue(true)
198 | .build()
199 | .show(linearParent, new ColorPickerPopup.ColorPickerObserver() {
200 | @Override
201 | public void onColorPicked(int color) {
202 | pie.setTextColor(color);
203 | pie.notifySettingChanged();
204 | }
205 | });
206 | break;
207 | case R.id.btn_arraw_color:
208 | new ColorPickerPopup.Builder(this)
209 | .initialColor(Color.RED) // Set initial color
210 | .enableBrightness(true) // Enable brightness slider or not
211 | .enableAlpha(true) // Enable alpha slider or not
212 | .okTitle("确定")
213 | .cancelTitle("取消")
214 | .showIndicator(true)
215 | .showValue(true)
216 | .build()
217 | .show(linearParent, new ColorPickerPopup.ColorPickerObserver() {
218 | @Override
219 | public void onColorPicked(int color) {
220 | pie.setArrawColor(color);
221 | pie.notifySettingChanged();
222 | }
223 | });
224 | break;
225 | default:
226 | }
227 | }
228 | }
229 |
--------------------------------------------------------------------------------
/app/src/main/java/com/aice/pierotateview/listener/AppBarLayoutStateChangeListener.java:
--------------------------------------------------------------------------------
1 | package com.aice.pierotateview.listener;
2 |
3 | import com.google.android.material.appbar.AppBarLayout;
4 |
5 | public abstract class AppBarLayoutStateChangeListener implements AppBarLayout.OnOffsetChangedListener{
6 |
7 | public enum State{
8 | EXPANDED,//展开
9 | COLLAPSED,//折叠
10 | INTERMEDIATE//中间状态
11 | }
12 | private State mCurrentState = State.INTERMEDIATE;
13 |
14 | @Override
15 | public void onOffsetChanged(AppBarLayout appBarLayout, int verticalOffset) {
16 | if (verticalOffset == 0) {
17 | if (mCurrentState != State.EXPANDED) {
18 | onStateChanged(appBarLayout, State.EXPANDED);
19 | }
20 | mCurrentState = State.EXPANDED;
21 | } else if (Math.abs(verticalOffset) >= appBarLayout.getTotalScrollRange()) {
22 | if (mCurrentState != State.COLLAPSED) {
23 | onStateChanged(appBarLayout, State.COLLAPSED);
24 | }
25 | mCurrentState = State.COLLAPSED;
26 | } else {
27 | onStateChanged(appBarLayout, State.INTERMEDIATE);
28 | mCurrentState = State.INTERMEDIATE;
29 | }
30 | }
31 |
32 | public abstract void onStateChanged(AppBarLayout appBarLayout, State state);
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/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/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
10 |
15 |
20 |
25 |
30 |
35 |
40 |
45 |
50 |
55 |
60 |
65 |
70 |
75 |
80 |
85 |
90 |
95 |
100 |
105 |
110 |
115 |
120 |
125 |
130 |
135 |
140 |
145 |
150 |
155 |
160 |
165 |
170 |
171 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
15 |
16 |
22 |
23 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_normal.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
12 |
13 |
18 |
25 |
26 |
31 |
32 |
37 |
43 |
50 |
51 |
56 |
62 |
63 |
64 |
70 |
71 |
76 |
81 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/app/src/main/res/layout/activity_swiprefresh_appbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
9 |
13 |
17 |
24 |
28 |
34 |
41 |
42 |
47 |
48 |
49 |
50 |
55 |
60 |
61 |
66 |
72 |
79 |
80 |
85 |
91 |
92 |
93 |
99 |
100 |
105 |
110 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
--------------------------------------------------------------------------------
/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/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/app/src/main/res/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #008577
4 | #00574B
5 | #D81B60
6 |
7 |
--------------------------------------------------------------------------------
/app/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | PieRotateView
3 |
4 |
--------------------------------------------------------------------------------
/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/app/src/test/java/com/aice/pierotateview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.aice.pierotateview;
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() {
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 | repositories {
5 | google()
6 | jcenter()
7 |
8 | }
9 | dependencies {
10 | classpath 'com.android.tools.build:gradle:3.5.2'
11 | classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
12 | // NOTE: Do not place your application dependencies here; they belong
13 | // in the individual module build.gradle files
14 | }
15 | }
16 |
17 | allprojects {
18 | repositories {
19 | google()
20 | jcenter()
21 | maven { url 'https://jitpack.io' }
22 |
23 | }
24 | }
25 |
26 | task clean(type: Delete) {
27 | delete rootProject.buildDir
28 | }
29 |
--------------------------------------------------------------------------------
/gradle.properties:
--------------------------------------------------------------------------------
1 | # Project-wide Gradle settings.
2 | # IDE (e.g. Android Studio) users:
3 | # Gradle settings configured through the IDE *will override*
4 | # any settings specified in this file.
5 | # For more details on how to configure your build environment visit
6 | # http://www.gradle.org/docs/current/userguide/build_environment.html
7 | # Specifies the JVM arguments used for the daemon process.
8 | # The setting is particularly useful for tweaking memory settings.
9 | org.gradle.jvmargs=-Xmx1536m
10 | # When configured, Gradle will run in incubating parallel mode.
11 | # This option should only be used with decoupled projects. More details, visit
12 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13 | # org.gradle.parallel=true
14 | # AndroidX package structure to make it clearer which packages are bundled with the
15 | # Android operating system, and which are packaged with your app's APK
16 | # https://developer.android.com/topic/libraries/support-library/androidx-rn
17 | android.useAndroidX=true
18 | # Automatically convert third-party libraries to use AndroidX
19 | android.enableJetifier=true
20 |
21 |
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/gradle/wrapper/gradle-wrapper.jar
--------------------------------------------------------------------------------
/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Thu Dec 05 22:13:41 CST 2019
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-5.4.1-all.zip
7 |
--------------------------------------------------------------------------------
/gradlew:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 |
3 | ##############################################################################
4 | ##
5 | ## Gradle start up script for UN*X
6 | ##
7 | ##############################################################################
8 |
9 | # Attempt to set APP_HOME
10 | # Resolve links: $0 may be a link
11 | PRG="$0"
12 | # Need this for relative symlinks.
13 | while [ -h "$PRG" ] ; do
14 | ls=`ls -ld "$PRG"`
15 | link=`expr "$ls" : '.*-> \(.*\)$'`
16 | if expr "$link" : '/.*' > /dev/null; then
17 | PRG="$link"
18 | else
19 | PRG=`dirname "$PRG"`"/$link"
20 | fi
21 | done
22 | SAVED="`pwd`"
23 | cd "`dirname \"$PRG\"`/" >/dev/null
24 | APP_HOME="`pwd -P`"
25 | cd "$SAVED" >/dev/null
26 |
27 | APP_NAME="Gradle"
28 | APP_BASE_NAME=`basename "$0"`
29 |
30 | # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
31 | DEFAULT_JVM_OPTS=""
32 |
33 | # Use the maximum available, or set MAX_FD != -1 to use that value.
34 | MAX_FD="maximum"
35 |
36 | warn () {
37 | echo "$*"
38 | }
39 |
40 | die () {
41 | echo
42 | echo "$*"
43 | echo
44 | exit 1
45 | }
46 |
47 | # OS specific support (must be 'true' or 'false').
48 | cygwin=false
49 | msys=false
50 | darwin=false
51 | nonstop=false
52 | case "`uname`" in
53 | CYGWIN* )
54 | cygwin=true
55 | ;;
56 | Darwin* )
57 | darwin=true
58 | ;;
59 | MINGW* )
60 | msys=true
61 | ;;
62 | NONSTOP* )
63 | nonstop=true
64 | ;;
65 | esac
66 |
67 | CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
68 |
69 | # Determine the Java command to use to start the JVM.
70 | if [ -n "$JAVA_HOME" ] ; then
71 | if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
72 | # IBM's JDK on AIX uses strange locations for the executables
73 | JAVACMD="$JAVA_HOME/jre/sh/java"
74 | else
75 | JAVACMD="$JAVA_HOME/bin/java"
76 | fi
77 | if [ ! -x "$JAVACMD" ] ; then
78 | die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
79 |
80 | Please set the JAVA_HOME variable in your environment to match the
81 | location of your Java installation."
82 | fi
83 | else
84 | JAVACMD="java"
85 | which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
86 |
87 | Please set the JAVA_HOME variable in your environment to match the
88 | location of your Java installation."
89 | fi
90 |
91 | # Increase the maximum file descriptors if we can.
92 | if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
93 | MAX_FD_LIMIT=`ulimit -H -n`
94 | if [ $? -eq 0 ] ; then
95 | if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
96 | MAX_FD="$MAX_FD_LIMIT"
97 | fi
98 | ulimit -n $MAX_FD
99 | if [ $? -ne 0 ] ; then
100 | warn "Could not set maximum file descriptor limit: $MAX_FD"
101 | fi
102 | else
103 | warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
104 | fi
105 | fi
106 |
107 | # For Darwin, add options to specify how the application appears in the dock
108 | if $darwin; then
109 | GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
110 | fi
111 |
112 | # For Cygwin, switch paths to Windows format before running java
113 | if $cygwin ; then
114 | APP_HOME=`cygpath --path --mixed "$APP_HOME"`
115 | CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
116 | JAVACMD=`cygpath --unix "$JAVACMD"`
117 |
118 | # We build the pattern for arguments to be converted via cygpath
119 | ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
120 | SEP=""
121 | for dir in $ROOTDIRSRAW ; do
122 | ROOTDIRS="$ROOTDIRS$SEP$dir"
123 | SEP="|"
124 | done
125 | OURCYGPATTERN="(^($ROOTDIRS))"
126 | # Add a user-defined pattern to the cygpath arguments
127 | if [ "$GRADLE_CYGPATTERN" != "" ] ; then
128 | OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
129 | fi
130 | # Now convert the arguments - kludge to limit ourselves to /bin/sh
131 | i=0
132 | for arg in "$@" ; do
133 | CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
134 | CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
135 |
136 | if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
137 | eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
138 | else
139 | eval `echo args$i`="\"$arg\""
140 | fi
141 | i=$((i+1))
142 | done
143 | case $i in
144 | (0) set -- ;;
145 | (1) set -- "$args0" ;;
146 | (2) set -- "$args0" "$args1" ;;
147 | (3) set -- "$args0" "$args1" "$args2" ;;
148 | (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
149 | (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
150 | (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
151 | (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
152 | (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
153 | (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
154 | esac
155 | fi
156 |
157 | # Escape application args
158 | save () {
159 | for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
160 | echo " "
161 | }
162 | APP_ARGS=$(save "$@")
163 |
164 | # Collect all arguments for the java command, following the shell quoting and substitution rules
165 | eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
166 |
167 | # by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
168 | if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
169 | cd "$(dirname "$0")"
170 | fi
171 |
172 | exec "$JAVACMD" "$@"
173 |
--------------------------------------------------------------------------------
/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 | set DIRNAME=%~dp0
12 | if "%DIRNAME%" == "" set DIRNAME=.
13 | set APP_BASE_NAME=%~n0
14 | set APP_HOME=%DIRNAME%
15 |
16 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
17 | set DEFAULT_JVM_OPTS=
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 Windows variants
50 |
51 | if not "%OS%" == "Windows_NT" goto win9xME_args
52 |
53 | :win9xME_args
54 | @rem Slurp the command line arguments.
55 | set CMD_LINE_ARGS=
56 | set _SKIP=2
57 |
58 | :win9xME_args_slurp
59 | if "x%~1" == "x" goto execute
60 |
61 | set CMD_LINE_ARGS=%*
62 |
63 | :execute
64 | @rem Setup the command line
65 |
66 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
67 |
68 | @rem Execute Gradle
69 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
70 |
71 | :end
72 | @rem End local scope for the variables with windows NT shell
73 | if "%ERRORLEVEL%"=="0" goto mainEnd
74 |
75 | :fail
76 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
77 | rem the _cmd.exe /c_ return code!
78 | if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
79 | exit /b 1
80 |
81 | :mainEnd
82 | if "%OS%"=="Windows_NT" endlocal
83 |
84 | :omega
85 |
--------------------------------------------------------------------------------
/local.properties:
--------------------------------------------------------------------------------
1 | ## This file must *NOT* be checked into Version Control Systems,
2 | # as it contains information specific to your local configuration.
3 | #
4 | # Location of the SDK. This is only used by Gradle.
5 | # For customization when using a Version Control System, please read the
6 | # header note.
7 | #Fri Dec 13 10:33:38 CST 2019
8 | sdk.dir=/Users/static/Library/Android/sdk
9 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/.gitignore:
--------------------------------------------------------------------------------
1 | /build
2 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/PieRotateView-pierotateviewlibrary.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | generateDebugSources
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/build.gradle:
--------------------------------------------------------------------------------
1 | apply plugin: 'com.android.library'
2 | apply plugin:'com.github.dcendents.android-maven'
3 | group='com.github.NoEndToLF'
4 | android {
5 | compileSdkVersion 29
6 | buildToolsVersion "29.0.2"
7 |
8 |
9 | defaultConfig {
10 | minSdkVersion 15
11 | targetSdkVersion 29
12 | versionCode 1
13 | versionName "1.0"
14 |
15 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
16 | consumerProguardFiles 'consumer-rules.pro'
17 | }
18 |
19 | buildTypes {
20 | release {
21 | minifyEnabled false
22 | proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
23 | }
24 | }
25 |
26 | }
27 |
28 | dependencies {
29 | implementation fileTree(dir: 'libs', include: ['*.jar'])
30 |
31 | implementation 'androidx.appcompat:appcompat:1.1.0'
32 | testImplementation 'junit:junit:4.12'
33 | androidTestImplementation 'androidx.test.ext:junit:1.1.1'
34 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
35 | }
36 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/consumer-rules.pro:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aiceking/PieRotateView/d5b5d18e435e360db2af598dfe6444df0c8de30c/pierotateviewlibrary/consumer-rules.pro
--------------------------------------------------------------------------------
/pierotateviewlibrary/pierotateviewlibrary.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | generateDebugSources
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/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 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/src/androidTest/java/com/wxy/pierotateview/ExampleInstrumentedTest.java:
--------------------------------------------------------------------------------
1 | package com.wxy.pierotateview;
2 |
3 | import android.content.Context;
4 |
5 | import androidx.test.platform.app.InstrumentationRegistry;
6 | import androidx.test.ext.junit.runners.AndroidJUnit4;
7 |
8 | import org.junit.Test;
9 | import org.junit.runner.RunWith;
10 |
11 | import static org.junit.Assert.*;
12 |
13 | /**
14 | * Instrumented test, which will execute on an Android device.
15 | *
16 | * @see Testing documentation
17 | */
18 | @RunWith(AndroidJUnit4.class)
19 | public class ExampleInstrumentedTest {
20 | @Test
21 | public void useAppContext() {
22 | // Context of the app under test.
23 | Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
24 |
25 | assertEquals("com.wxy.pieraoateview.test", appContext.getPackageName());
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/src/main/java/com/wxy/pierotateview/model/PieRotateViewModel.java:
--------------------------------------------------------------------------------
1 | package com.wxy.pierotateview.model;
2 |
3 |
4 | import android.graphics.Path;
5 |
6 | public class PieRotateViewModel {
7 | private String name;
8 | private float num;
9 | private Path path;
10 | private int color;
11 | private float centerDregee;
12 | private float selfDregee;
13 | private String percent;
14 |
15 | public String getPercent() {
16 | return percent;
17 | }
18 |
19 | public void setPercent(String percent) {
20 | this.percent = percent;
21 | }
22 |
23 | public float getSelfDregee() {
24 | return selfDregee;
25 | }
26 |
27 | public void setSelfDregee(float selfDregee) {
28 | this.selfDregee = selfDregee;
29 | }
30 |
31 | public float getCenterDregee() {
32 | return centerDregee;
33 | }
34 |
35 | public void setCenterDregee(float centerDregee) {
36 | this.centerDregee = centerDregee;
37 | }
38 |
39 | public Path getPath() {
40 | return path;
41 | }
42 |
43 | public void setPath(Path path) {
44 | this.path = path;
45 | }
46 |
47 | public int getColor() {
48 | return color;
49 | }
50 |
51 | public void setColor(int color) {
52 | this.color = color;
53 | }
54 |
55 |
56 | public PieRotateViewModel(String name, float num, int color) {
57 | this.name = name;
58 | this.num = num;
59 | this.color = color;
60 | }
61 |
62 | public String getName() {
63 | return name;
64 | }
65 |
66 | public void setName(String name) {
67 | this.name = name;
68 | }
69 |
70 | public float getNum() {
71 | return num;
72 | }
73 |
74 | public void setNum(float num) {
75 | this.num = num;
76 | }
77 |
78 |
79 | }
80 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | pieraoateview
3 |
4 |
--------------------------------------------------------------------------------
/pierotateviewlibrary/src/test/java/com/wxy/pierotateview/ExampleUnitTest.java:
--------------------------------------------------------------------------------
1 | package com.wxy.pierotateview;
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() {
15 | assertEquals(4, 2 + 2);
16 | }
17 | }
--------------------------------------------------------------------------------
/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app', ':pierotateviewlibrary'
2 | rootProject.name='PieRotateView'
3 |
--------------------------------------------------------------------------------