diff --git a/.gradle/4.6/fileChanges/last-build.bin b/.gradle/4.6/fileChanges/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/.gradle/4.6/fileChanges/last-build.bin differ
diff --git a/.gradle/4.6/fileContent/fileContent.lock b/.gradle/4.6/fileContent/fileContent.lock
new file mode 100644
index 0000000..6da1484
Binary files /dev/null and b/.gradle/4.6/fileContent/fileContent.lock differ
diff --git a/.gradle/4.6/fileHashes/fileHashes.bin b/.gradle/4.6/fileHashes/fileHashes.bin
new file mode 100644
index 0000000..3bc9b6f
Binary files /dev/null and b/.gradle/4.6/fileHashes/fileHashes.bin differ
diff --git a/.gradle/4.6/fileHashes/fileHashes.lock b/.gradle/4.6/fileHashes/fileHashes.lock
new file mode 100644
index 0000000..33437e0
Binary files /dev/null and b/.gradle/4.6/fileHashes/fileHashes.lock differ
diff --git a/.gradle/4.6/fileHashes/resourceHashesCache.bin b/.gradle/4.6/fileHashes/resourceHashesCache.bin
new file mode 100644
index 0000000..342edfe
Binary files /dev/null and b/.gradle/4.6/fileHashes/resourceHashesCache.bin differ
diff --git a/.gradle/4.6/javaCompile/classAnalysis.bin b/.gradle/4.6/javaCompile/classAnalysis.bin
new file mode 100644
index 0000000..09d0892
Binary files /dev/null and b/.gradle/4.6/javaCompile/classAnalysis.bin differ
diff --git a/.gradle/4.6/javaCompile/jarAnalysis.bin b/.gradle/4.6/javaCompile/jarAnalysis.bin
new file mode 100644
index 0000000..ab65e6f
Binary files /dev/null and b/.gradle/4.6/javaCompile/jarAnalysis.bin differ
diff --git a/.gradle/4.6/javaCompile/javaCompile.lock b/.gradle/4.6/javaCompile/javaCompile.lock
new file mode 100644
index 0000000..a10ae02
Binary files /dev/null and b/.gradle/4.6/javaCompile/javaCompile.lock differ
diff --git a/.gradle/4.6/javaCompile/taskHistory.bin b/.gradle/4.6/javaCompile/taskHistory.bin
new file mode 100644
index 0000000..f4fc08c
Binary files /dev/null and b/.gradle/4.6/javaCompile/taskHistory.bin differ
diff --git a/.gradle/4.6/javaCompile/taskJars.bin b/.gradle/4.6/javaCompile/taskJars.bin
new file mode 100644
index 0000000..3592e0b
Binary files /dev/null and b/.gradle/4.6/javaCompile/taskJars.bin differ
diff --git a/.gradle/4.6/taskHistory/taskHistory.bin b/.gradle/4.6/taskHistory/taskHistory.bin
new file mode 100644
index 0000000..ae503e3
Binary files /dev/null and b/.gradle/4.6/taskHistory/taskHistory.bin differ
diff --git a/.gradle/4.6/taskHistory/taskHistory.lock b/.gradle/4.6/taskHistory/taskHistory.lock
new file mode 100644
index 0000000..09cfe83
Binary files /dev/null and b/.gradle/4.6/taskHistory/taskHistory.lock differ
diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 0000000..2f3869f
Binary files /dev/null and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.gradle/buildOutputCleanup/cache.properties b/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000..91e8b47
--- /dev/null
+++ b/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Thu Jan 03 16:38:26 PKT 2019
+gradle.version=4.6
diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin
new file mode 100644
index 0000000..3e89c0a
Binary files /dev/null and b/.gradle/buildOutputCleanup/outputFiles.bin differ
diff --git a/.gradle/vcsWorkingDirs/gc.properties b/.gradle/vcsWorkingDirs/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser
new file mode 100644
index 0000000..6223cfe
Binary files /dev/null and b/.idea/caches/build_file_checksums.ser differ
diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..38391c3
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_android_28.xml b/.idea/libraries/Gradle__android_android_28.xml
new file mode 100644
index 0000000..76e28b4
--- /dev/null
+++ b/.idea/libraries/Gradle__android_android_28.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml b/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml
new file mode 100644
index 0000000..bf16fff
--- /dev/null
+++ b/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1.xml b/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1.xml
new file mode 100644
index 0000000..244af34
--- /dev/null
+++ b/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml b/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml
new file mode 100644
index 0000000..27b1867
--- /dev/null
+++ b/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1.xml b/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1.xml
new file mode 100644
index 0000000..65c90ca
--- /dev/null
+++ b/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1.xml b/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1.xml
new file mode 100644
index 0000000..4c012bc
--- /dev/null
+++ b/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1.xml b/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1.xml
new file mode 100644
index 0000000..e690c0c
--- /dev/null
+++ b/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1.xml b/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1.xml
new file mode 100644
index 0000000..e1de96b
--- /dev/null
+++ b/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0.xml
new file mode 100644
index 0000000..23b8617
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0.xml
new file mode 100644
index 0000000..2d49954
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0.xml
new file mode 100644
index 0000000..adb88c4
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml b/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml
new file mode 100644
index 0000000..80e4d73
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0.xml
new file mode 100644
index 0000000..82e6324
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0.xml
new file mode 100644
index 0000000..f5f8be4
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_customview_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_customview_28_0_0.xml
new file mode 100644
index 0000000..2877e49
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_customview_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0.xml
new file mode 100644
index 0000000..88831c3
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0.xml
new file mode 100644
index 0000000..62eb47e
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0.xml
new file mode 100644
index 0000000..ef32148
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_loader_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_loader_28_0_0.xml
new file mode 100644
index 0000000..b4e9da4
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_loader_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0.xml
new file mode 100644
index 0000000..b1d7830
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_print_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_print_28_0_0.xml
new file mode 100644
index 0000000..73f2ff2
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_print_28_0_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0.xml
new file mode 100644
index 0000000..8fa2a3d
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml b/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml
new file mode 100644
index 0000000..0fdecce
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0.xml
new file mode 100644
index 0000000..aa0b235
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0.xml
new file mode 100644
index 0000000..31de408
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0.xml
new file mode 100644
index 0000000..02fcee2
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0.xml
new file mode 100644
index 0000000..0e9ce17
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0.xml
new file mode 100644
index 0000000..8d65b47
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0.xml
new file mode 100644
index 0000000..dd1c270
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_2.xml b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_2.xml
new file mode 100644
index 0000000..dcc3289
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_2.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_2.xml b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_2.xml
new file mode 100644
index 0000000..7ab1e73
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_2.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_monitor_1_0_2.xml b/.idea/libraries/Gradle__com_android_support_test_monitor_1_0_2.xml
new file mode 100644
index 0000000..85915ab
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_monitor_1_0_2.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_test_runner_1_0_2.xml b/.idea/libraries/Gradle__com_android_support_test_runner_1_0_2.xml
new file mode 100644
index 0000000..994bf94
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_test_runner_1_0_2.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0.xml
new file mode 100644
index 0000000..b12e1c9
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0.xml b/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0.xml
new file mode 100644
index 0000000..d96d1c4
--- /dev/null
+++ b/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml b/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
new file mode 100644
index 0000000..947e251
--- /dev/null
+++ b/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml b/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml
new file mode 100644
index 0000000..5c4dd4e
--- /dev/null
+++ b/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__io_reactivex_rxjava2_rxandroid_2_0_2.xml b/.idea/libraries/Gradle__io_reactivex_rxjava2_rxandroid_2_0_2.xml
new file mode 100644
index 0000000..43badc6
--- /dev/null
+++ b/.idea/libraries/Gradle__io_reactivex_rxjava2_rxandroid_2_0_2.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__io_reactivex_rxjava2_rxjava_2_1_9_jar.xml b/.idea/libraries/Gradle__io_reactivex_rxjava2_rxjava_2_1_9_jar.xml
new file mode 100644
index 0000000..e23e22e
--- /dev/null
+++ b/.idea/libraries/Gradle__io_reactivex_rxjava2_rxjava_2_1_9_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml b/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml
new file mode 100644
index 0000000..f9c9a30
--- /dev/null
+++ b/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__junit_junit_4_12_jar.xml b/.idea/libraries/Gradle__junit_junit_4_12_jar.xml
new file mode 100644
index 0000000..f4f25a8
--- /dev/null
+++ b/.idea/libraries/Gradle__junit_junit_4_12_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml b/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml
new file mode 100644
index 0000000..5855a29
--- /dev/null
+++ b/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
new file mode 100644
index 0000000..50cf2b9
--- /dev/null
+++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
new file mode 100644
index 0000000..a5eaca5
--- /dev/null
+++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml b/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
new file mode 100644
index 0000000..b4dabdc
--- /dev/null
+++ b/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_jetbrains_annotations_13_0_jar.xml b/.idea/libraries/Gradle__org_jetbrains_annotations_13_0_jar.xml
new file mode 100644
index 0000000..93524e8
--- /dev/null
+++ b/.idea/libraries/Gradle__org_jetbrains_annotations_13_0_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_11_jar.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_11_jar.xml
new file mode 100644
index 0000000..8762d3d
--- /dev/null
+++ b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_3_11_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_11_jar.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_11_jar.xml
new file mode 100644
index 0000000..7eba057
--- /dev/null
+++ b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_3_11_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_11_jar.xml b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_11_jar.xml
new file mode 100644
index 0000000..ad4fd51
--- /dev/null
+++ b/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_3_11_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Gradle__org_reactivestreams_reactive_streams_1_0_2_jar.xml b/.idea/libraries/Gradle__org_reactivestreams_reactive_streams_1_0_2_jar.xml
new file mode 100644
index 0000000..7616606
--- /dev/null
+++ b/.idea/libraries/Gradle__org_reactivestreams_reactive_streams_1_0_2_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..44a4802
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..f24ed38
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..0729334
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,4091 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1546515435953
+
+
+ 1546515435953
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/LoadingDialog.iml b/LoadingDialog.iml
new file mode 100644
index 0000000..dee3c50
--- /dev/null
+++ b/LoadingDialog.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.gitignore b/app/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/app/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/app/app.iml b/app/app.iml
new file mode 100644
index 0000000..30e99df
--- /dev/null
+++ b/app/app.iml
@@ -0,0 +1,201 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/build.gradle b/app/build.gradle
new file mode 100644
index 0000000..80ec58b
--- /dev/null
+++ b/app/build.gradle
@@ -0,0 +1,36 @@
+apply plugin: 'com.android.application'
+apply plugin: 'kotlin-android'
+
+android {
+ signingConfigs {
+ }
+ compileSdkVersion 28
+ defaultConfig {
+ applicationId "com.github.loading"
+ minSdkVersion 15
+ targetSdkVersion 28
+ versionCode 1
+ versionName "1.0"
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+}
+
+dependencies {
+ implementation fileTree(include: ['*.jar'], dir: 'libs')
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'com.android.support.test:runner:1.0.2'
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+ implementation project(':loadingview')
+ implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
+}
+repositories {
+ mavenCentral()
+}
diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro
new file mode 100644
index 0000000..f1b4245
--- /dev/null
+++ b/app/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/app/src/androidTest/java/com/github/loading/ExampleInstrumentedTest.java b/app/src/androidTest/java/com/github/loading/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..154384e
--- /dev/null
+++ b/app/src/androidTest/java/com/github/loading/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.github.loading;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("com.github.loading", appContext.getPackageName());
+ }
+}
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..e3b1b9d
--- /dev/null
+++ b/app/src/main/AndroidManifest.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/java/com/github/loading/SampleActivity.kt b/app/src/main/java/com/github/loading/SampleActivity.kt
new file mode 100644
index 0000000..fea905c
--- /dev/null
+++ b/app/src/main/java/com/github/loading/SampleActivity.kt
@@ -0,0 +1,31 @@
+package com.github.loading
+
+import android.os.Bundle
+import android.support.v7.app.AppCompatActivity
+import android.view.View
+import com.github.loadingview.LoadingDialog
+import com.github.loadingview.LoadingView
+import io.reactivex.Observable
+import io.reactivex.android.schedulers.AndroidSchedulers
+import java.util.concurrent.TimeUnit
+
+
+class SampleActivity() : AppCompatActivity() {
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_sample)
+
+ findViewById(R.id.button)?.setOnClickListener {
+ val dialog = LoadingDialog[this@SampleActivity].show()
+ Observable.timer(java.util.Random().nextInt(9999).toLong(), TimeUnit.MILLISECONDS)
+ .observeOn(AndroidSchedulers.mainThread())
+ .subscribe {
+ dialog.hide();
+ }
+
+ }
+ val loading = findViewById(R.id.loadingView)
+ loading?.start()
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
new file mode 100644
index 0000000..1f6bb29
--- /dev/null
+++ b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml b/app/src/main/res/drawable/ic_launcher_background.xml
new file mode 100644
index 0000000..0d025f9
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_background.xml
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_sample.xml b/app/src/main/res/layout/activity_sample.xml
new file mode 100644
index 0000000..ac2c7a2
--- /dev/null
+++ b/app/src/main/res/layout/activity_sample.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
new file mode 100644
index 0000000..eca70cf
--- /dev/null
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png b/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..898f3ed
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dffca36
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png b/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..64ba76f
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..dae5e08
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..e5ed465
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..14ed0af
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..b0907ca
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..d8ae031
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..2c18de9
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..beed3cd
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..69b2233
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,6 @@
+
+
+ #008577
+ #00574B
+ #D81B60
+
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..b7e7060
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ LoadingDialog
+
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..5885930
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
diff --git a/app/src/test/java/com/github/loading/ExampleUnitTest.java b/app/src/test/java/com/github/loading/ExampleUnitTest.java
new file mode 100644
index 0000000..d397cfe
--- /dev/null
+++ b/app/src/test/java/com/github/loading/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.github.loading;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
new file mode 100644
index 0000000..4189a0c
--- /dev/null
+++ b/build.gradle
@@ -0,0 +1,28 @@
+// Top-level build file where you can add configuration options common to all sub-projects/modules.
+
+buildscript {
+ ext.kotlin_version = '1.3.11'
+
+ repositories {
+ google()
+ jcenter()
+ }
+ dependencies {
+ classpath 'com.android.tools.build:gradle:3.2.1'
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+
+ // NOTE: Do not place your application dependencies here; they belong
+ // in the individual module build.gradle files
+ }
+}
+
+allprojects {
+ repositories {
+ google()
+ jcenter()
+ }
+}
+
+task clean(type: Delete) {
+ delete rootProject.buildDir
+}
diff --git a/gradle.properties b/gradle.properties
new file mode 100644
index 0000000..82618ce
--- /dev/null
+++ b/gradle.properties
@@ -0,0 +1,15 @@
+# Project-wide Gradle settings.
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+org.gradle.jvmargs=-Xmx1536m
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# org.gradle.parallel=true
+
+
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..9a4163a
--- /dev/null
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
new file mode 100644
index 0000000..cccdd3d
--- /dev/null
+++ b/gradlew
@@ -0,0 +1,172 @@
+#!/usr/bin/env sh
+
+##############################################################################
+##
+## Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG=`dirname "$PRG"`"/$link"
+ fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn () {
+ echo "$*"
+}
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+ CYGWIN* )
+ cygwin=true
+ ;;
+ Darwin* )
+ darwin=true
+ ;;
+ MINGW* )
+ msys=true
+ ;;
+ NONSTOP* )
+ nonstop=true
+ ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD="java"
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+ MAX_FD_LIMIT=`ulimit -H -n`
+ if [ $? -eq 0 ] ; then
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+ MAX_FD="$MAX_FD_LIMIT"
+ fi
+ ulimit -n $MAX_FD
+ if [ $? -ne 0 ] ; then
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
+ fi
+ else
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+ fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+ JAVACMD=`cygpath --unix "$JAVACMD"`
+
+ # We build the pattern for arguments to be converted via cygpath
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+ SEP=""
+ for dir in $ROOTDIRSRAW ; do
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
+ SEP="|"
+ done
+ OURCYGPATTERN="(^($ROOTDIRS))"
+ # Add a user-defined pattern to the cygpath arguments
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+ fi
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ i=0
+ for arg in "$@" ; do
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
+
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+ else
+ eval `echo args$i`="\"$arg\""
+ fi
+ i=$((i+1))
+ done
+ case $i in
+ (0) set -- ;;
+ (1) set -- "$args0" ;;
+ (2) set -- "$args0" "$args1" ;;
+ (3) set -- "$args0" "$args1" "$args2" ;;
+ (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+ (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+ (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+ (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+ (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+ (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+ esac
+fi
+
+# Escape application args
+save () {
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
+ echo " "
+}
+APP_ARGS=$(save "$@")
+
+# Collect all arguments for the java command, following the shell quoting and substitution rules
+eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
+
+# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
+if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
+ cd "$(dirname "$0")"
+fi
+
+exec "$JAVACMD" "$@"
diff --git a/gradlew.bat b/gradlew.bat
new file mode 100644
index 0000000..f955316
--- /dev/null
+++ b/gradlew.bat
@@ -0,0 +1,84 @@
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windows variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/loadingview/.gitignore b/loadingview/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/loadingview/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/loadingview/build.gradle b/loadingview/build.gradle
new file mode 100644
index 0000000..901587c
--- /dev/null
+++ b/loadingview/build.gradle
@@ -0,0 +1,41 @@
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+
+android {
+ compileSdkVersion 28
+
+
+
+ defaultConfig {
+ minSdkVersion 15
+ targetSdkVersion 28
+ versionCode 1
+ versionName "1.0"
+
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+
+ }
+
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+
+}
+
+dependencies {
+ implementation fileTree(dir: 'libs', include: ['*.jar'])
+
+ implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
+
+ implementation 'com.android.support:appcompat-v7:28.0.0'
+ testImplementation 'junit:junit:4.12'
+ androidTestImplementation 'com.android.support.test:runner:1.0.2'
+ androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
+}
+repositories {
+ mavenCentral()
+}
diff --git a/loadingview/loadingview.iml b/loadingview/loadingview.iml
new file mode 100644
index 0000000..712f41a
--- /dev/null
+++ b/loadingview/loadingview.iml
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ generateDebugSources
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/loadingview/proguard-rules.pro b/loadingview/proguard-rules.pro
new file mode 100644
index 0000000..f1b4245
--- /dev/null
+++ b/loadingview/proguard-rules.pro
@@ -0,0 +1,21 @@
+# Add project specific ProGuard rules here.
+# You can control the set of applied configuration files using the
+# proguardFiles setting in build.gradle.
+#
+# For more details, see
+# http://developer.android.com/guide/developing/tools/proguard.html
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+# public *;
+#}
+
+# Uncomment this to preserve the line number information for
+# debugging stack traces.
+#-keepattributes SourceFile,LineNumberTable
+
+# If you keep the line number information, uncomment this to
+# hide the original source file name.
+#-renamesourcefileattribute SourceFile
diff --git a/loadingview/src/androidTest/java/com/github/loadingview/ExampleInstrumentedTest.java b/loadingview/src/androidTest/java/com/github/loadingview/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..4f578bb
--- /dev/null
+++ b/loadingview/src/androidTest/java/com/github/loadingview/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package com.github.loadingview;
+
+import android.content.Context;
+import android.support.test.InstrumentationRegistry;
+import android.support.test.runner.AndroidJUnit4;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import static org.junit.Assert.*;
+
+/**
+ * Instrumented test, which will execute on an Android device.
+ *
+ * @see Testing documentation
+ */
+@RunWith(AndroidJUnit4.class)
+public class ExampleInstrumentedTest {
+ @Test
+ public void useAppContext() {
+ // Context of the app under test.
+ Context appContext = InstrumentationRegistry.getTargetContext();
+
+ assertEquals("com.github.loadingview.test", appContext.getPackageName());
+ }
+}
diff --git a/loadingview/src/main/AndroidManifest.xml b/loadingview/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..75d954e
--- /dev/null
+++ b/loadingview/src/main/AndroidManifest.xml
@@ -0,0 +1,2 @@
+
diff --git a/loadingview/src/main/java/com/github/loadingview/LoadingDialog.kt b/loadingview/src/main/java/com/github/loadingview/LoadingDialog.kt
new file mode 100644
index 0000000..2b975f4
--- /dev/null
+++ b/loadingview/src/main/java/com/github/loadingview/LoadingDialog.kt
@@ -0,0 +1,53 @@
+package com.github.loadingview
+
+import android.app.Activity
+import android.graphics.drawable.ColorDrawable
+import android.support.v7.app.AlertDialog
+import android.view.LayoutInflater
+
+class LoadingDialog private constructor(internal var activity: Activity) {
+
+ internal var isShowing = false
+ internal var loadingView: LoadingView? = null
+ internal var alertDialog: AlertDialog? = null
+
+ fun show(): LoadingDialog {
+ if (!isShowing && alertDialog != null) {
+ isShowing = true
+ try {
+ alertDialog!!.window!!.setBackgroundDrawable(ColorDrawable(0))
+ alertDialog!!.window!!.attributes.windowAnimations = R.style.DialogAnimations
+ } catch (e: Exception) {
+
+ }
+
+ alertDialog!!.show()
+ if (loadingView != null)
+ loadingView!!.start()
+ }
+ return this
+ }
+
+ fun hide(): LoadingDialog {
+ isShowing = false
+ if (loadingView != null)
+ loadingView!!.stop()
+ if (alertDialog != null)
+ alertDialog!!.dismiss()
+ return this
+ }
+
+ companion object {
+
+ operator fun get(activity: Activity): LoadingDialog {
+ val dialog = LoadingDialog(activity)
+ val builder = AlertDialog.Builder(dialog.activity)
+ val v = LayoutInflater.from(dialog.activity).inflate(R.layout.loading_view, null)
+ dialog.loadingView = v.findViewById(R.id.loading_view)
+ builder.setView(v)
+ builder.setCancelable(false)
+ dialog.alertDialog = builder.create()
+ return dialog
+ }
+ }
+}
\ No newline at end of file
diff --git a/loadingview/src/main/java/com/github/loadingview/LoadingView.kt b/loadingview/src/main/java/com/github/loadingview/LoadingView.kt
new file mode 100644
index 0000000..ffe9fe7
--- /dev/null
+++ b/loadingview/src/main/java/com/github/loadingview/LoadingView.kt
@@ -0,0 +1,367 @@
+package com.github.loadingview
+
+import android.animation.ValueAnimator
+import android.content.Context
+import android.graphics.*
+import android.support.v4.content.ContextCompat
+import android.util.AttributeSet
+import android.view.View
+import io.reactivex.Observable
+import io.reactivex.disposables.Disposable
+import java.util.*
+import java.util.concurrent.TimeUnit
+
+/**
+ * Thanks to @JeasonWong
+ * https://github.com/JeasonWong/BezierLoadingView
+ * */
+
+class LoadingView(context: Context, atr: AttributeSet?) : View(context, atr) {
+
+ private val DEFAULT_EXTERNAL_RADIUS = dp2px(20f)
+ private val DEFAULT_INTERNAL_RADIUS = dp2px(4f)
+ private val DEFAULT_RADIAN = 45
+
+ private var mWidth: Int = 0
+ private var mHeight: Int = 0
+ private var disposable: Disposable? = null
+ private var mPaint: Paint? = null
+ private val mPath = Path()
+ private var mDuration = 2
+
+ internal var colors: IntArray? = null
+ internal var angle1 = 0
+ internal var cyclic = 0
+ private var biggerCircleRadius: Float = 0.toFloat()
+ private var smallerCircleRadius: Float = 0.toFloat()
+ private var points: MutableList? = null
+ private var animators: MutableList? = null
+ private var xX: Float = 0.toFloat()
+ private var yY: Float = 0.toFloat()
+ private val radian = DEFAULT_RADIAN
+ private val MAX_DURATION = 120
+ private val MIN_DURATION = 1
+ private var internalRadius: Float = 0.toFloat()
+ private val MAX_INTERNAL_R = dp2px(18f)
+ private val MIN_INTERNAL_R = dp2px(2f)
+ private var externalRadius: Float = 0.toFloat()
+ private val MAX_EXTERNAL_R = dp2px(150f)
+ private val MIN_EXTERNAL_R = dp2px(25f)
+
+ init {
+ init(atr)
+ }
+
+ constructor(c: Context) : this(c, null) {
+
+ }
+
+ constructor(c: Context, atr: AttributeSet?, defStyleAttr: Int) : this(c, atr) {
+ init(atr)
+ }
+
+ private fun init(attrs: AttributeSet?) {
+ animators = ArrayList()
+ points = ArrayList()
+
+ mPaint = Paint()
+ mPaint!!.isAntiAlias = true
+ mPaint!!.style = Paint.Style.FILL
+
+ val typeArray = context.obtainStyledAttributes(attrs, R.styleable.LoadingView)
+ mDuration = typeArray.getInt(R.styleable.LoadingView_lv_duration, mDuration)
+ internalRadius = typeArray.getDimension(R.styleable.LoadingView_lv_internal_radius, DEFAULT_INTERNAL_RADIUS.toFloat())
+ externalRadius = typeArray.getDimension(R.styleable.LoadingView_lv_external_radius, DEFAULT_EXTERNAL_RADIUS.toFloat())
+ val defaultColor = 999999
+ val startColor = typeArray.getColor(R.styleable.LoadingView_lv_start_color, defaultColor)
+ val endColor = typeArray.getColor(R.styleable.LoadingView_lv_end_color, defaultColor)
+ val colorList = ArrayList()
+ if (startColor != defaultColor) {
+ colorList.add(startColor)
+ }
+ if (endColor != defaultColor) {
+ colorList.add(endColor)
+ }
+ //needs >= 2 number of colors
+ if (colorList.size == 1) {
+ colorList.add(colorList[0])
+ }
+
+ if (colorList.size == 0) {
+ colors = intArrayOf(ContextCompat.getColor(context, R.color.color_start), ContextCompat.getColor(context, R.color.color_end))
+ } else {
+ colors = IntArray(colorList.size)
+ for (i in colorList.indices) {
+ colors!![i] = colorList[i]
+ }
+ }
+ typeArray.recycle()
+
+ }
+
+ override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
+ super.onSizeChanged(w, h, oldw, oldh)
+ mWidth = w
+ mHeight = h
+ setShader()
+ resetPoint()
+ }
+
+ private fun setShader() {
+ val mLinearGradient = LinearGradient(mWidth / 2 - externalRadius, mHeight / 2 - externalRadius, mWidth / 2 - externalRadius, mHeight / 2 + externalRadius, colors, null, Shader.TileMode.CLAMP)
+ mPaint!!.shader = mLinearGradient
+ }
+
+ fun start() {
+ if (disposable == null || disposable!!.isDisposed) {
+ disposable = Observable.interval(mDuration.toLong(), TimeUnit.MILLISECONDS).subscribe({ aLong -> update() })
+ }
+ this.visibility = View.VISIBLE
+ }
+
+ fun stop() {
+ if (disposable != null) {
+ disposable!!.dispose()
+ }
+ this.visibility = View.GONE
+ }
+
+ override fun onDetachedFromWindow() {
+ super.onDetachedFromWindow()
+ stop()
+ }
+
+ private fun update() {
+
+ setOffset(angle1 % radian / radian.toFloat())
+
+ angle1++
+ if (angle1 == 360) {
+ angle1 = 0
+ cyclic++
+ }
+ }
+
+ override fun onDraw(canvas: Canvas) {
+ super.onDraw(canvas)
+ drawCircle(canvas)
+ drawBezier(canvas)
+ }
+
+ private fun drawCircle(canvas: Canvas) {
+ for (i in points!!.indices) {
+ val index = angle1 / radian
+ if (isEvenCyclic()) {
+ if (i == index) {
+ if (angle1 % radian == 0) {
+ canvas.drawCircle(getCircleX(angle1), getCircleY(angle1), getMaxInternalRadius(), mPaint!!)
+ } else if (angle1 % radian > 0) {
+ canvas.drawCircle(getCircleX(angle1), getCircleY(angle1), if (smallerCircleRadius < internalRadius) internalRadius else smallerCircleRadius, mPaint!!)
+ }
+ } else if (i == index + 1) {
+ if (angle1 % radian == 0) {
+ canvas.drawCircle(points!![i].x, points!![i].y, internalRadius, mPaint!!)
+ } else {
+ canvas.drawCircle(points!![i].x, points!![i].y, if (biggerCircleRadius < internalRadius) internalRadius else biggerCircleRadius, mPaint!!)
+ }
+ } else if (i > index + 1) {
+ canvas.drawCircle(points!![i].x, points!![i].y, internalRadius, mPaint!!)
+ }
+ } else {
+ if (i < index) {
+ canvas.drawCircle(points!![i + 1].x, points!![i + 1].y, internalRadius, mPaint!!)
+ } else if (i == index) {
+ if (angle1 % radian == 0) {
+ canvas.drawCircle(getCircleX(angle1), getCircleY(angle1), getMaxInternalRadius(), mPaint!!)
+ } else {
+ canvas.drawCircle(getCircleX(angle1), getCircleY(angle1), if (smallerCircleRadius < internalRadius) internalRadius else smallerCircleRadius, mPaint!!)
+ }
+ } else if (i == index + 1) {
+ if (angle1 % radian == 0) {
+ canvas.drawCircle(getCircleX(angle1), getCircleY(angle1), getMinInternalRadius(), mPaint!!)
+ } else if (angle1 % radian > 0) {
+ canvas.drawCircle(getCircleX(angle1), getCircleY(angle1), if (biggerCircleRadius < internalRadius) internalRadius else biggerCircleRadius, mPaint!!)
+ }
+ }
+ }
+ }
+ }
+
+ private fun drawBezier(canvas: Canvas) {
+
+ mPath.reset()
+
+ val circleIndex = angle1 / radian
+
+ val rightX = getCircleX(angle1)
+ val rightY = getCircleY(angle1)
+
+ val leftX: Float
+ val leftY: Float
+ if (isEvenCyclic()) {
+ val index: Int = circleIndex + 1
+ leftX = points!![if (index >= points!!.size) points!!.size - 1 else index].x
+ leftY = points!![if (index >= points!!.size) points!!.size - 1 else index].y
+ } else {
+ leftX = points!![if (circleIndex < 0) 0 else circleIndex].x
+ leftY = points!![if (circleIndex < 0) 0 else circleIndex].y
+ }
+
+ val theta = getTheta(PointF(leftX, leftY), PointF(rightX, rightY))
+ val sinTheta = Math.sin(theta).toFloat()
+ val cosTheta = Math.cos(theta).toFloat()
+
+ val pointF1 = PointF(leftX - internalRadius * sinTheta, leftY + internalRadius * cosTheta)
+ val pointF2 = PointF(rightX - internalRadius * sinTheta, rightY + internalRadius * cosTheta)
+ val pointF3 = PointF(rightX + internalRadius * sinTheta, rightY - internalRadius * cosTheta)
+ val pointF4 = PointF(leftX + internalRadius * sinTheta, leftY - internalRadius * cosTheta)
+
+ if (isEvenCyclic()) {
+ if (angle1 % radian < radian / 2) {
+
+ mPath.moveTo(pointF3.x, pointF3.y)
+ mPath.quadTo(rightX + (leftX - rightX) / (radian / 2) * if (angle1 % radian > radian / 2) radian / 2 else angle1 % radian, rightY + (leftY - rightY) / (radian / 2) * if (angle1 % radian > radian / 2) radian / 2 else angle1 % radian, pointF2.x, pointF2.y)
+ mPath.lineTo(pointF3.x, pointF3.y)
+
+ mPath.moveTo(pointF4.x, pointF4.y)
+ mPath.quadTo(leftX + (rightX - leftX) / (radian / 2) * if (angle1 % radian > radian / 2) radian / 2 else angle1 % radian, leftY + (rightY - leftY) / (radian / 2) * if (angle1 % radian > radian / 2) radian / 2 else angle1 % radian, pointF1.x, pointF1.y)
+ mPath.lineTo(pointF4.x, pointF4.y)
+
+ mPath.close()
+ canvas.drawPath(mPath, mPaint!!)
+ return
+ }
+ } else {
+ if (circleIndex > 0 && angle1 % radian > radian / 2) {
+
+ mPath.moveTo(pointF3.x, pointF3.y)
+ mPath.quadTo(rightX + (leftX - rightX) / (radian / 2) * if (radian - angle1 % radian > radian / 2) radian / 2 else radian - angle1 % radian, rightY + (leftY - rightY) / (radian / 2) * if (radian - angle1 % radian > radian / 2) radian / 2 else radian - angle1 % radian, pointF2.x, pointF2.y)
+ mPath.lineTo(pointF3.x, pointF3.y)
+
+ mPath.moveTo(pointF4.x, pointF4.y)
+ mPath.quadTo(leftX + (rightX - leftX) / (radian / 2) * if (radian - angle1 % radian > radian / 2) radian / 2 else radian - angle1 % radian, leftY + (rightY - leftY) / (radian / 2) * if (radian - angle1 % radian > radian / 2) radian / 2 else radian - angle1 % radian, pointF1.x, pointF1.y)
+ mPath.lineTo(pointF4.x, pointF4.y)
+
+ mPath.close()
+ canvas.drawPath(mPath, mPaint!!)
+ return
+ }
+ }
+
+ if (circleIndex == 0 && !isEvenCyclic()) return
+
+ mPath.moveTo(pointF1.x, pointF1.y)
+ mPath.quadTo((leftX + rightX) / 2, (leftY + rightY) / 2, pointF2.x, pointF2.y)
+ mPath.lineTo(pointF3.x, pointF3.y)
+ mPath.quadTo((leftX + rightX) / 2, (leftY + rightY) / 2, pointF4.x, pointF4.y)
+ mPath.lineTo(pointF1.x, pointF1.y)
+
+ mPath.close()
+
+ canvas.drawPath(mPath, mPaint!!)
+ }
+
+ private fun createAnimator() {
+
+ if (points!!.isEmpty()) {
+ return
+ }
+ animators!!.clear()
+
+ val circleGetSmallerAnimator = ValueAnimator.ofFloat(getMaxInternalRadius(), getMinInternalRadius())
+ circleGetSmallerAnimator.duration = 5000L
+ circleGetSmallerAnimator.addUpdateListener { animation -> smallerCircleRadius = animation.animatedValue as Float }
+ animators!!.add(circleGetSmallerAnimator)
+
+ val circleGetBiggerAnimator = ValueAnimator.ofFloat(getMinInternalRadius(), getMaxInternalRadius())
+ circleGetBiggerAnimator.duration = 5000L
+ circleGetBiggerAnimator.addUpdateListener { animation -> biggerCircleRadius = animation.animatedValue as Float }
+ animators!!.add(circleGetBiggerAnimator)
+
+ }
+
+ private fun seekAnimator(offset: Float) {
+ for (animator in animators!!) {
+ animator.currentPlayTime = (5000.0f * offset).toLong()
+ }
+ }
+
+ fun setOffset(offSet: Float) {
+ createAnimator()
+ seekAnimator(offSet)
+ postInvalidate()
+ }
+
+ private fun resetPoint() {
+
+ xX = (mWidth / 2).toFloat()
+ yY = (mHeight / 2).toFloat()
+
+ createPoints()
+
+ if (!points!!.isEmpty()) {
+ biggerCircleRadius = getMaxInternalRadius()
+ smallerCircleRadius = getMinInternalRadius()
+ postInvalidate()
+ }
+ }
+
+ private fun createPoints() {
+ points!!.clear()
+ for (i in 0..360) {
+ if (i % radian == 0) {
+ val x1 = getCircleX(i)
+ val y1 = getCircleY(i)
+ points!!.add(PointF(x1, y1))
+ }
+ }
+ }
+
+ private fun isEvenCyclic(): Boolean {
+ return cyclic % 2 == 0
+ }
+
+ private fun getCircleY(angle: Int): Float {
+ return yY + externalRadius * Math.sin(angle * 3.14 / 180).toFloat()
+ }
+
+ private fun getCircleX(angle: Int): Float {
+ return xX + externalRadius * Math.cos(angle * 3.14 / 180).toFloat()
+ }
+
+ private fun getTheta(pointCenterLeft: PointF, pointCenterRight: PointF): Double {
+ return Math.atan(((pointCenterRight.y - pointCenterLeft.y) / (pointCenterRight.x - pointCenterLeft.x)).toDouble())
+ }
+
+ fun setExternalRadius(progress: Int) {
+ val R = (progress / 100f * MAX_EXTERNAL_R).toInt()
+ externalRadius = (if (R < MIN_EXTERNAL_R) MIN_EXTERNAL_R else R).toFloat()
+ setShader()
+ createPoints()
+ }
+
+ fun setInternalRadius(progress: Int) {
+ val r = (progress / 100f * MAX_INTERNAL_R).toInt()
+ internalRadius = (if (r < MIN_INTERNAL_R) MIN_INTERNAL_R else r).toFloat()
+ }
+
+ fun setDuration(progress: Int) {
+ stop()
+ val duration = ((1 - progress / 100f) * MAX_DURATION).toInt()
+ mDuration = if (duration < MIN_DURATION) MIN_DURATION else duration
+ start()
+ }
+
+ private fun getMaxInternalRadius(): Float {
+ return internalRadius / 10f * 14f
+ }
+
+ private fun getMinInternalRadius(): Float {
+ return internalRadius / 10f
+ }
+
+ private fun dp2px(dp: Float): Int {
+ val scale = context.resources.displayMetrics.density
+ return (dp * scale + 0.5f).toInt()
+ }
+}
\ No newline at end of file
diff --git a/loadingview/src/main/res/anim/slide_in_bottom.xml b/loadingview/src/main/res/anim/slide_in_bottom.xml
new file mode 100644
index 0000000..13efae9
--- /dev/null
+++ b/loadingview/src/main/res/anim/slide_in_bottom.xml
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/loadingview/src/main/res/anim/slide_out_top.xml b/loadingview/src/main/res/anim/slide_out_top.xml
new file mode 100644
index 0000000..77dc50f
--- /dev/null
+++ b/loadingview/src/main/res/anim/slide_out_top.xml
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/loadingview/src/main/res/layout/loading_view.xml b/loadingview/src/main/res/layout/loading_view.xml
new file mode 100644
index 0000000..bb0649b
--- /dev/null
+++ b/loadingview/src/main/res/layout/loading_view.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/loadingview/src/main/res/values/atrs.xml b/loadingview/src/main/res/values/atrs.xml
new file mode 100644
index 0000000..fdbcf45
--- /dev/null
+++ b/loadingview/src/main/res/values/atrs.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+ #00CFDB
+ #0063A6
+
\ No newline at end of file
diff --git a/loadingview/src/main/res/values/strings.xml b/loadingview/src/main/res/values/strings.xml
new file mode 100644
index 0000000..5b2ec76
--- /dev/null
+++ b/loadingview/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+
+ LoadingView Lib
+
diff --git a/loadingview/src/main/res/values/styles.xml b/loadingview/src/main/res/values/styles.xml
new file mode 100644
index 0000000..3e4bb8a
--- /dev/null
+++ b/loadingview/src/main/res/values/styles.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/loadingview/src/test/java/com/github/loadingview/ExampleUnitTest.java b/loadingview/src/test/java/com/github/loadingview/ExampleUnitTest.java
new file mode 100644
index 0000000..b05459b
--- /dev/null
+++ b/loadingview/src/test/java/com/github/loadingview/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package com.github.loadingview;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * Example local unit test, which will execute on the development machine (host).
+ *
+ * @see Testing documentation
+ */
+public class ExampleUnitTest {
+ @Test
+ public void addition_isCorrect() {
+ assertEquals(4, 2 + 2);
+ }
+}
\ No newline at end of file
diff --git a/local.properties b/local.properties
new file mode 100644
index 0000000..1b27e89
--- /dev/null
+++ b/local.properties
@@ -0,0 +1,10 @@
+## This file is automatically generated by Android Studio.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file should *NOT* be checked into Version Control Systems,
+# as it contains information specific to your local configuration.
+#
+# Location of the SDK. This is only used by Gradle.
+# For customization when using a Version Control System, please read the
+# header note.
+sdk.dir=D\:\\sumit\\android\\sdk
\ No newline at end of file
diff --git a/settings.gradle b/settings.gradle
new file mode 100644
index 0000000..15cf21d
--- /dev/null
+++ b/settings.gradle
@@ -0,0 +1 @@
+include ':app', ':loadingview'