diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..15a15b2
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
index e0d5b93..703e5d4 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,35 +1,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
diff --git a/app/.idea/caches/build_file_checksums.ser b/app/.idea/caches/build_file_checksums.ser
new file mode 100644
index 0000000..acec8a8
Binary files /dev/null and b/app/.idea/caches/build_file_checksums.ser differ
diff --git a/app/.idea/codeStyles/Project.xml b/app/.idea/codeStyles/Project.xml
new file mode 100644
index 0000000..30aa626
--- /dev/null
+++ b/app/.idea/codeStyles/Project.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/gradle.xml b/app/.idea/gradle.xml
new file mode 100644
index 0000000..d417c89
--- /dev/null
+++ b/app/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml b/app/.idea/libraries/Gradle__android_arch_core_common_1_1_1_jar.xml
new file mode 100644
index 0000000..bf16fff
--- /dev/null
+++ b/app/.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/app/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1_aar.xml b/app/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1_aar.xml
new file mode 100644
index 0000000..2a55e9a
--- /dev/null
+++ b/app/.idea/libraries/Gradle__android_arch_core_runtime_1_1_1_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml b/app/.idea/libraries/Gradle__android_arch_lifecycle_common_1_1_1_jar.xml
new file mode 100644
index 0000000..27b1867
--- /dev/null
+++ b/app/.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/app/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1_aar.xml b/app/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1_aar.xml
new file mode 100644
index 0000000..137be86
--- /dev/null
+++ b/app/.idea/libraries/Gradle__android_arch_lifecycle_livedata_1_1_1_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1_aar.xml b/app/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1_aar.xml
new file mode 100644
index 0000000..4f197f2
--- /dev/null
+++ b/app/.idea/libraries/Gradle__android_arch_lifecycle_livedata_core_1_1_1_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1_aar.xml b/app/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1_aar.xml
new file mode 100644
index 0000000..782aec9
--- /dev/null
+++ b/app/.idea/libraries/Gradle__android_arch_lifecycle_runtime_1_1_1_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1_aar.xml b/app/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1_aar.xml
new file mode 100644
index 0000000..f96c9ac
--- /dev/null
+++ b/app/.idea/libraries/Gradle__android_arch_lifecycle_viewmodel_1_1_1_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0_aar.xml
new file mode 100644
index 0000000..204ace2
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_animated_vector_drawable_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0_aar.xml
new file mode 100644
index 0000000..26172c1
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_appcompat_v7_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0_aar.xml
new file mode 100644
index 0000000..d834219
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_asynclayoutinflater_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_cardview_v7_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_cardview_v7_28_0_0_aar.xml
new file mode 100644
index 0000000..fc394e2
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_cardview_v7_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml b/app/.idea/libraries/Gradle__com_android_support_collections_28_0_0_jar.xml
new file mode 100644
index 0000000..80e4d73
--- /dev/null
+++ b/app/.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/app/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_1_3_aar.xml b/app/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_1_3_aar.xml
new file mode 100644
index 0000000..bfde8aa
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_1_1_3_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_solver_1_1_3_jar.xml b/app/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_solver_1_1_3_jar.xml
new file mode 100644
index 0000000..c0adf88
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_constraint_constraint_layout_solver_1_1_3_jar.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0_aar.xml
new file mode 100644
index 0000000..1a77586
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_coordinatorlayout_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0_aar.xml
new file mode 100644
index 0000000..ae63275
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_cursoradapter_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_customview_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_customview_28_0_0_aar.xml
new file mode 100644
index 0000000..2dc06b2
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_customview_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_design_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_design_28_0_0_aar.xml
new file mode 100644
index 0000000..ca3a3a3
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_design_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0_aar.xml
new file mode 100644
index 0000000..b089fe1
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_documentfile_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0_aar.xml
new file mode 100644
index 0000000..4aa699d
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_drawerlayout_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0_aar.xml
new file mode 100644
index 0000000..6fb4636
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_interpolator_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_loader_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_loader_28_0_0_aar.xml
new file mode 100644
index 0000000..6b58464
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_loader_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0_aar.xml
new file mode 100644
index 0000000..9fffd90
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_localbroadcastmanager_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_print_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_print_28_0_0_aar.xml
new file mode 100644
index 0000000..1a3bae0
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_print_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_recyclerview_v7_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_recyclerview_v7_28_0_0_aar.xml
new file mode 100644
index 0000000..b70e4ae
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_recyclerview_v7_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0_aar.xml
new file mode 100644
index 0000000..26b0b24
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_slidingpanelayout_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml b/app/.idea/libraries/Gradle__com_android_support_support_annotations_28_0_0_jar.xml
new file mode 100644
index 0000000..0fdecce
--- /dev/null
+++ b/app/.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/app/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0_aar.xml
new file mode 100644
index 0000000..289a159
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_support_compat_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0_aar.xml
new file mode 100644
index 0000000..883c10e
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_support_core_ui_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0_aar.xml
new file mode 100644
index 0000000..1341b10
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_support_core_utils_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0_aar.xml
new file mode 100644
index 0000000..79da099
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_support_fragment_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0_aar.xml
new file mode 100644
index 0000000..8d9775b
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_support_vector_drawable_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0_aar.xml
new file mode 100644
index 0000000..1abdb00
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_swiperefreshlayout_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_2_aar.xml b/app/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_2_aar.xml
new file mode 100644
index 0000000..d0621ea
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_core_3_0_2_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_2_aar.xml b/app/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_2_aar.xml
new file mode 100644
index 0000000..8921cbd
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_test_espresso_espresso_idling_resource_3_0_2_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_test_monitor_1_0_2_aar.xml b/app/.idea/libraries/Gradle__com_android_support_test_monitor_1_0_2_aar.xml
new file mode 100644
index 0000000..6ec4e06
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_test_monitor_1_0_2_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_test_runner_1_0_2_aar.xml b/app/.idea/libraries/Gradle__com_android_support_test_runner_1_0_2_aar.xml
new file mode 100644
index 0000000..b0bd20e
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_test_runner_1_0_2_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_transition_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_transition_28_0_0_aar.xml
new file mode 100644
index 0000000..825a89a
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_transition_28_0_0_aar.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0_aar.xml
new file mode 100644
index 0000000..63c2a95
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_versionedparcelable_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0_aar.xml b/app/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0_aar.xml
new file mode 100644
index 0000000..8c50ebf
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_android_support_viewpager_28_0_0_aar.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_github_bumptech_glide_annotations_4_8_0_jar.xml b/app/.idea/libraries/Gradle__com_github_bumptech_glide_annotations_4_8_0_jar.xml
new file mode 100644
index 0000000..a8d7725
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_github_bumptech_glide_annotations_4_8_0_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_github_bumptech_glide_disklrucache_4_8_0_jar.xml b/app/.idea/libraries/Gradle__com_github_bumptech_glide_disklrucache_4_8_0_jar.xml
new file mode 100644
index 0000000..9642802
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_github_bumptech_glide_disklrucache_4_8_0_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_github_bumptech_glide_gifdecoder_4_8_0_aar.xml b/app/.idea/libraries/Gradle__com_github_bumptech_glide_gifdecoder_4_8_0_aar.xml
new file mode 100644
index 0000000..8a47e5b
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_github_bumptech_glide_gifdecoder_4_8_0_aar.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_github_bumptech_glide_glide_4_8_0_aar.xml b/app/.idea/libraries/Gradle__com_github_bumptech_glide_glide_4_8_0_aar.xml
new file mode 100644
index 0000000..0e9e5a6
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_github_bumptech_glide_glide_4_8_0_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml b/app/.idea/libraries/Gradle__com_google_code_findbugs_jsr305_2_0_1_jar.xml
new file mode 100644
index 0000000..947e251
--- /dev/null
+++ b/app/.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/app/.idea/libraries/Gradle__com_jakewharton_timber_timber_4_7_1_aar.xml b/app/.idea/libraries/Gradle__com_jakewharton_timber_timber_4_7_1_aar.xml
new file mode 100644
index 0000000..528c302
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_jakewharton_timber_timber_4_7_1_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml b/app/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml
new file mode 100644
index 0000000..5c4dd4e
--- /dev/null
+++ b/app/.idea/libraries/Gradle__com_squareup_javawriter_2_1_1_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__de_hdodenhof_circleimageview_2_2_0_aar.xml b/app/.idea/libraries/Gradle__de_hdodenhof_circleimageview_2_2_0_aar.xml
new file mode 100644
index 0000000..38f7aa5
--- /dev/null
+++ b/app/.idea/libraries/Gradle__de_hdodenhof_circleimageview_2_2_0_aar.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml b/app/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml
new file mode 100644
index 0000000..f9c9a30
--- /dev/null
+++ b/app/.idea/libraries/Gradle__javax_inject_javax_inject_1_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__junit_junit_4_12_jar.xml b/app/.idea/libraries/Gradle__junit_junit_4_12_jar.xml
new file mode 100644
index 0000000..f4f25a8
--- /dev/null
+++ b/app/.idea/libraries/Gradle__junit_junit_4_12_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml b/app/.idea/libraries/Gradle__net_sf_kxml_kxml2_2_3_0_jar.xml
new file mode 100644
index 0000000..5855a29
--- /dev/null
+++ b/app/.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/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml b/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
new file mode 100644
index 0000000..50cf2b9
--- /dev/null
+++ b/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_core_1_3_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml b/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
new file mode 100644
index 0000000..a5eaca5
--- /dev/null
+++ b/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_integration_1_3_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml b/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
new file mode 100644
index 0000000..b4dabdc
--- /dev/null
+++ b/app/.idea/libraries/Gradle__org_hamcrest_hamcrest_library_1_3_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__org_jetbrains_annotations_16_0_1_jar.xml b/app/.idea/libraries/Gradle__org_jetbrains_annotations_16_0_1_jar.xml
new file mode 100644
index 0000000..f6e8b2a
--- /dev/null
+++ b/app/.idea/libraries/Gradle__org_jetbrains_annotations_16_0_1_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_2_71_jar.xml b/app/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_2_71_jar.xml
new file mode 100644
index 0000000..efdd78a
--- /dev/null
+++ b/app/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_2_71_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_2_71_jar.xml b/app/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_2_71_jar.xml
new file mode 100644
index 0000000..32d55b9
--- /dev/null
+++ b/app/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_common_1_2_71_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_2_71_jar.xml b/app/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_2_71_jar.xml
new file mode 100644
index 0000000..b52e964
--- /dev/null
+++ b/app/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_jdk7_1_2_71_jar.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/misc.xml b/app/.idea/misc.xml
new file mode 100644
index 0000000..af0bbdd
--- /dev/null
+++ b/app/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/modules.xml b/app/.idea/modules.xml
new file mode 100644
index 0000000..4bdddcd
--- /dev/null
+++ b/app/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/runConfigurations.xml b/app/.idea/runConfigurations.xml
new file mode 100644
index 0000000..7f68460
--- /dev/null
+++ b/app/.idea/runConfigurations.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/vcs.xml b/app/.idea/vcs.xml
new file mode 100644
index 0000000..6c0b863
--- /dev/null
+++ b/app/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/.idea/workspace.xml b/app/.idea/workspace.xml
new file mode 100644
index 0000000..0d5aed1
--- /dev/null
+++ b/app/.idea/workspace.xml
@@ -0,0 +1,2563 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1558119852770
+
+
+ 1558119852770
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/gradle/wrapper/gradle-wrapper.jar b/app/gradle/wrapper/gradle-wrapper.jar
new file mode 100644
index 0000000..f6b961f
Binary files /dev/null and b/app/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/app/gradle/wrapper/gradle-wrapper.properties b/app/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..0719d74
--- /dev/null
+++ b/app/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,6 @@
+#Fri May 17 22:04:15 EEST 2019
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
diff --git a/app/gradlew b/app/gradlew
new file mode 100644
index 0000000..cccdd3d
--- /dev/null
+++ b/app/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/app/gradlew.bat b/app/gradlew.bat
new file mode 100644
index 0000000..f955316
--- /dev/null
+++ b/app/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/app/local.properties b/app/local.properties
new file mode 100644
index 0000000..c8b7308
--- /dev/null
+++ b/app/local.properties
@@ -0,0 +1,9 @@
+## This file must *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.
+#Fri May 17 22:04:12 EEST 2019
+ndk.dir=C\:\\Users\\blogp\\AppData\\Local\\Android\\Sdk\\ndk-bundle
+sdk.dir=C\:\\Users\\blogp\\AppData\\Local\\Android\\Sdk
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 3543f08..b97ea60 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -4,22 +4,27 @@
package="com.example.blogp.collapsingavatar">
-
+
-
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/java/com/example/blogp/collapsingavatar/Demo1Activity.kt b/app/src/main/java/com/example/blogp/collapsingavatar/Demo1Activity.kt
new file mode 100644
index 0000000..562aeda
--- /dev/null
+++ b/app/src/main/java/com/example/blogp/collapsingavatar/Demo1Activity.kt
@@ -0,0 +1,157 @@
+package com.example.blogp.collapsingavatar
+
+
+import android.content.Intent
+import android.os.Bundle
+import android.support.design.widget.AppBarLayout
+import android.support.v4.content.ContextCompat
+import android.support.v7.app.AppCompatActivity
+import android.support.v7.widget.AppCompatTextView
+import android.support.v7.widget.Toolbar
+import android.util.TypedValue
+import android.view.View
+import android.widget.Button
+import android.widget.FrameLayout
+import android.widget.ImageView
+
+
+class Demo1Activity : AppCompatActivity() {
+ private lateinit var ivUserAvatar: ImageView
+ private var EXPAND_AVATAR_SIZE: Float = 0F
+ private var COLLAPSE_IMAGE_SIZE: Float = 0F
+ private var horizontalToolbarAvatarMargin: Float = 0F
+ private lateinit var toolbar: Toolbar
+ private lateinit var appBarLayout: AppBarLayout
+ private var cashCollapseState: Pair? = null
+ private lateinit var titleToolbarText: AppCompatTextView
+ private lateinit var titleToolbarTextSingle: AppCompatTextView
+ private lateinit var invisibleTextViewWorkAround: AppCompatTextView
+ private lateinit var background: FrameLayout
+ /**/
+ private var avatarAnimateStartPointY: Float = 0F
+ private var avatarCollapseAnimationChangeWeight: Float = 0F
+ private var isCalculated = false
+ private var verticalToolbarAvatarMargin =0F
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_demo_1)
+ /**/
+ EXPAND_AVATAR_SIZE = resources.getDimension(R.dimen.default_expanded_image_size)
+ COLLAPSE_IMAGE_SIZE = resources.getDimension(R.dimen.default_collapsed_image_size)
+ horizontalToolbarAvatarMargin = resources.getDimension(R.dimen.activity_margin)
+ /* collapsingAvatarContainer = findViewById(R.id.stuff_container)*/
+ appBarLayout = findViewById(R.id.app_bar_layout)
+ toolbar = findViewById(R.id.anim_toolbar)
+ ivUserAvatar = findViewById(R.id.imgb_avatar_wrap)
+ titleToolbarText = findViewById(R.id.tv_profile_name)
+ titleToolbarTextSingle = findViewById(R.id.tv_profile_name_single)
+ background = findViewById(R.id.fl_background)
+ invisibleTextViewWorkAround = findViewById(R.id.tv_workaround)
+
+ (toolbar.height - COLLAPSE_IMAGE_SIZE) * 2
+ /**/
+ appBarLayout.addOnOffsetChangedListener(
+ AppBarLayout.OnOffsetChangedListener { appBarLayout, i ->
+ if (isCalculated.not()) {
+ avatarAnimateStartPointY = Math.abs((appBarLayout.height - (EXPAND_AVATAR_SIZE + horizontalToolbarAvatarMargin)) / appBarLayout.totalScrollRange)
+ avatarCollapseAnimationChangeWeight = 1 / (1 - avatarAnimateStartPointY)
+ verticalToolbarAvatarMargin = (toolbar.height - COLLAPSE_IMAGE_SIZE) * 2
+ isCalculated = true
+ }
+ /**/
+ updateViews(Math.abs(i / appBarLayout.totalScrollRange.toFloat()))
+ })
+ findViewById(R.id.b_go_demo_2).setOnClickListener {
+ startActivity(Intent(this@Demo1Activity, Demo2Activity::class.java))
+ }
+ }
+
+ private fun updateViews(offset: Float) {
+ /* apply levels changes*/
+ when (offset) {
+ in 0.15F..1F -> {
+ titleToolbarText.apply {
+ if (visibility != View.VISIBLE) visibility = View.VISIBLE
+ alpha = (1 - offset) * 0.35F
+ }
+ }
+
+ in 0F..0.15F -> {
+ titleToolbarText.alpha = (1f)
+ ivUserAvatar.alpha = 1f
+ }
+ }
+
+ /** collapse - expand switch*/
+ when {
+ offset < SWITCH_BOUND -> Pair(TO_EXPANDED, cashCollapseState?.second ?: WAIT_FOR_SWITCH)
+ else -> Pair(TO_COLLAPSED, cashCollapseState?.second ?: WAIT_FOR_SWITCH)
+ }.apply {
+ when {
+ cashCollapseState != null && cashCollapseState != this -> {
+ when (first) {
+ TO_EXPANDED -> {
+ /* set avatar on start position (center of parent frame layout)*/
+ ivUserAvatar.translationX = 0F
+ /**/
+ background.setBackgroundColor(ContextCompat.getColor(this@Demo1Activity, R.color.color_transparent))
+ /* hide top titles on toolbar*/
+ titleToolbarTextSingle.visibility = View.INVISIBLE
+ }
+ TO_COLLAPSED -> background.apply {
+ alpha = 0F
+ setBackgroundColor(ContextCompat.getColor(this@Demo1Activity, R.color.colorPrimary))
+ animate().setDuration(250).alpha(1.0F)
+
+ /* show titles on toolbar with animation*/
+ titleToolbarTextSingle.apply {
+ visibility = View.VISIBLE
+ alpha = 0F
+ animate().setDuration(500).alpha(1.0f)
+ }
+ }
+ }
+ cashCollapseState = Pair(first, SWITCHED)
+ }
+ else -> {
+ cashCollapseState = Pair(first, WAIT_FOR_SWITCH)
+ }
+ }
+
+ /* Collapse avatar img*/
+ ivUserAvatar.apply {
+ when {
+ offset > avatarAnimateStartPointY -> {
+ val avatarCollapseAnimateOffset = (offset - avatarAnimateStartPointY) * avatarCollapseAnimationChangeWeight
+ val avatarSize = EXPAND_AVATAR_SIZE - (EXPAND_AVATAR_SIZE - COLLAPSE_IMAGE_SIZE) * avatarCollapseAnimateOffset
+ this.layoutParams.also {
+ it.height = Math.round(avatarSize)
+ it.width = Math.round(avatarSize)
+ }
+ invisibleTextViewWorkAround.setTextSize(TypedValue.COMPLEX_UNIT_PX, offset)
+
+ this.translationX = ((appBarLayout.width - horizontalToolbarAvatarMargin - avatarSize) / 2) * avatarCollapseAnimateOffset
+ this.translationY = ((toolbar.height - verticalToolbarAvatarMargin - avatarSize ) / 2) * avatarCollapseAnimateOffset
+ }
+ else -> this.layoutParams.also {
+ if (it.height != EXPAND_AVATAR_SIZE.toInt()) {
+ it.height = EXPAND_AVATAR_SIZE.toInt()
+ it.width = EXPAND_AVATAR_SIZE.toInt()
+ this.layoutParams = it
+ }
+ translationX = 0f
+ }
+ }
+ }
+ }
+ }
+
+ companion object {
+ const val SWITCH_BOUND = 0.8f
+ const val TO_EXPANDED = 0
+ const val TO_COLLAPSED = 1
+ const val WAIT_FOR_SWITCH = 0
+ const val SWITCHED = 1
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/blogp/collapsingavatar/Demo2Activity.kt b/app/src/main/java/com/example/blogp/collapsingavatar/Demo2Activity.kt
new file mode 100644
index 0000000..9d8453a
--- /dev/null
+++ b/app/src/main/java/com/example/blogp/collapsingavatar/Demo2Activity.kt
@@ -0,0 +1,206 @@
+package com.example.blogp.collapsingavatar
+
+
+import android.animation.ValueAnimator
+import android.os.Bundle
+import android.support.design.widget.AppBarLayout
+import android.support.v4.content.ContextCompat
+import android.support.v7.app.AppCompatActivity
+import android.support.v7.widget.AppCompatTextView
+import android.support.v7.widget.Toolbar
+import android.view.View
+import android.view.animation.AnticipateOvershootInterpolator
+import android.widget.Button
+import android.widget.FrameLayout
+import android.widget.ImageView
+import timber.log.Timber
+
+
+class Demo2Activity : AppCompatActivity() {
+ private lateinit var ivAvatar: ImageView
+ private var EXPAND_AVATAR_SIZE: Float = 0F
+ private var COLLAPSE_IMAGE_SIZE: Float = 0F
+ private var margin: Float = 0F
+ private lateinit var toolbar: Toolbar
+ private lateinit var appBarLayout: AppBarLayout
+ private var cashCollapseState: Pair? = null
+ private lateinit var titleToolbarText: AppCompatTextView
+ private lateinit var titleToolbarTextSingle: AppCompatTextView
+ private lateinit var collapsingAvatarContainer: FrameLayout
+ private lateinit var background: FrameLayout
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_demo_2)
+ /**/
+ EXPAND_AVATAR_SIZE = resources.getDimension(R.dimen.default_expanded_image_size)
+ COLLAPSE_IMAGE_SIZE = resources.getDimension(R.dimen.default_collapsed_image_size)
+ margin = resources.getDimension(R.dimen.avatar_margin)
+ collapsingAvatarContainer = findViewById(R.id.stuff_container)
+ appBarLayout = findViewById(R.id.app_bar_layout)
+ toolbar = findViewById(R.id.anim_toolbar)
+ toolbar.visibility = View.INVISIBLE
+ ivAvatar = findViewById(R.id.imgb_avatar_wrap)
+ titleToolbarText = findViewById(R.id.tv_profile_name)
+ titleToolbarTextSingle = findViewById(R.id.tv_profile_name_single)
+ background = findViewById(R.id.fl_background)
+ /**/
+ appBarLayout.addOnOffsetChangedListener(
+ AppBarLayout.OnOffsetChangedListener { appBarLayout, i ->
+ if (isCalculated.not()) {
+ startAvatarAnimatePointY = Math.abs((appBarLayout.height - EXPAND_AVATAR_SIZE - toolbar.height / 2) / appBarLayout.totalScrollRange)
+ animateWeigt = 1 / (1 - startAvatarAnimatePointY)
+ isCalculated = true
+ }
+
+ val offset = Math.abs(i / appBarLayout.totalScrollRange.toFloat())
+ updateViews(offset)
+ })
+
+ findViewById(R.id.b_go_demo_1).setOnClickListener {
+ finish()
+ }
+ }
+
+ private var startAvatarAnimatePointY: Float = 0F
+ private var animateWeigt: Float = 0F
+ private var isCalculated = false
+
+ private fun updateViews(percentOffset: Float) {
+ /* Collapsing avatar transparent*/
+ when {
+ percentOffset > mUpperLimitTransparently -> {
+ //avatarContainerView.alpha = 0.0f
+ titleToolbarText.alpha = 0.0F
+ }
+
+ percentOffset < mUpperLimitTransparently -> {
+ // avatarContainerView.alpha = 1 - percentOffset
+ titleToolbarText.alpha = 1f
+ }
+ }
+
+ /*Collapsed/expended sizes for views*/
+ val result: Pair = when {
+ percentOffset < ABROAD -> {
+ Pair(TO_EXPANDED_STATE, cashCollapseState?.second
+ ?: WAIT_FOR_SWITCH)
+ }
+ else -> {
+ Pair(TO_COLLAPSED_STATE, cashCollapseState?.second ?: WAIT_FOR_SWITCH)
+ }
+ }
+ result.apply {
+ var translationY = 0f
+ var headContainerHeight = 0f
+ val translationX: Float
+ var currentImageSize = 0
+ when {
+ cashCollapseState != null && cashCollapseState != this -> {
+ when (first) {
+ TO_EXPANDED_STATE -> {
+ translationY = toolbar.height.toFloat()
+ headContainerHeight = appBarLayout.totalScrollRange.toFloat()
+ currentImageSize = EXPAND_AVATAR_SIZE.toInt()
+ /**/
+ titleToolbarText.visibility = View.VISIBLE
+ titleToolbarTextSingle.visibility = View.INVISIBLE
+ background.setBackgroundColor(ContextCompat.getColor(this@Demo2Activity, R.color.color_transparent))
+ /**/
+ ivAvatar.translationX = 0f
+ }
+
+ TO_COLLAPSED_STATE -> {
+ background.setBackgroundColor(ContextCompat.getColor(this@Demo2Activity, R.color.colorPrimary))
+ currentImageSize = COLLAPSE_IMAGE_SIZE.toInt()
+ translationY = appBarLayout.totalScrollRange.toFloat() - (toolbar.height - COLLAPSE_IMAGE_SIZE) / 2
+ headContainerHeight = toolbar.height.toFloat()
+ translationX = appBarLayout.width / 2f - COLLAPSE_IMAGE_SIZE / 2 - margin * 2
+ /**/
+ ValueAnimator.ofFloat(ivAvatar.translationX, translationX).apply {
+ addUpdateListener {
+ if (cashCollapseState!!.first == TO_COLLAPSED_STATE) {
+ ivAvatar.translationX = it.animatedValue as Float
+ }
+ }
+ interpolator = AnticipateOvershootInterpolator()
+ startDelay = 69
+ duration = 350
+ start()
+ }
+ /**/
+ titleToolbarText.visibility = View.INVISIBLE
+ titleToolbarTextSingle.apply {
+ visibility = View.VISIBLE
+ alpha = 0.2f
+ this.translationX = width.toFloat() / 2
+ animate().translationX(0f)
+ .setInterpolator(AnticipateOvershootInterpolator())
+ .alpha(1.0f)
+ .setStartDelay(69)
+ .setDuration(450)
+ .setListener(null)
+ }
+ }
+ }
+
+ ivAvatar.apply {
+ layoutParams.height = currentImageSize
+ layoutParams.width = currentImageSize
+ }
+ collapsingAvatarContainer.apply {
+ layoutParams.height = headContainerHeight.toInt()
+ this.translationY = translationY
+ requestLayout()
+ }
+ /**/
+ cashCollapseState = Pair(first, SWITCHED)
+ }
+ else -> {
+ /* Collapse avatar img*/
+ ivAvatar.apply {
+ if (percentOffset > startAvatarAnimatePointY) {
+
+ val animateOffset = (percentOffset - startAvatarAnimatePointY) * animateWeigt
+ Timber.d("offset for anim $animateOffset")
+ val avatarSize = EXPAND_AVATAR_SIZE - (EXPAND_AVATAR_SIZE - COLLAPSE_IMAGE_SIZE) * animateOffset
+
+ this.layoutParams.also {
+ if (it.height != Math.round(avatarSize)) {
+ it.height = Math.round(avatarSize)
+ it.width = Math.round(avatarSize)
+ this.requestLayout()
+ }
+ }
+
+ this.translationY = (COLLAPSE_IMAGE_SIZE - avatarSize) * animateOffset
+
+ } else {
+ this.layoutParams.also {
+ if (it.height != EXPAND_AVATAR_SIZE.toInt()) {
+ it.height = EXPAND_AVATAR_SIZE.toInt()
+ it.width = EXPAND_AVATAR_SIZE.toInt()
+ this.layoutParams = it
+ }
+ }
+ }
+ }
+ cashCollapseState = Pair(first, WAIT_FOR_SWITCH)
+ }
+ }
+
+
+ }
+ }
+
+ companion object {
+ const val ABROAD = 0.99f
+ const val TO_EXPANDED_STATE = 0
+ const val TO_COLLAPSED_STATE = 1
+ const val WAIT_FOR_SWITCH = 0
+ const val SWITCHED = 1
+ }
+
+ private val mLowerLimitTransparently = ABROAD * 0.45
+ private val mUpperLimitTransparently = ABROAD * 0.65
+}
diff --git a/app/src/main/java/com/example/blogp/collapsingavatar/FlingBehavior.java b/app/src/main/java/com/example/blogp/collapsingavatar/FlingBehavior.java
new file mode 100644
index 0000000..59865d4
--- /dev/null
+++ b/app/src/main/java/com/example/blogp/collapsingavatar/FlingBehavior.java
@@ -0,0 +1,46 @@
+package com.example.blogp.collapsingavatar;
+
+import android.content.Context;
+import android.support.annotation.NonNull;
+import android.support.design.widget.AppBarLayout;
+import android.support.design.widget.CoordinatorLayout;
+import android.support.v7.widget.RecyclerView;
+import android.util.AttributeSet;
+import android.view.View;
+
+public final class FlingBehavior extends AppBarLayout.Behavior {
+
+ private static final int TOP_CHILD_FLING_THRESHOLD = 3;
+ private boolean isPositive;
+
+ public FlingBehavior() {
+ }
+
+ public FlingBehavior(Context context, AttributeSet attrs) {
+ super(context, attrs);
+ }
+
+ @Override
+ public boolean onNestedFling(@NonNull CoordinatorLayout coordinatorLayout,
+ @NonNull AppBarLayout child, @NonNull View target, float velocityX,
+ float velocityY, boolean consumed) {
+ if (velocityY > 0 && !isPositive || velocityY < 0 && isPositive) {
+ velocityY = velocityY * -1;
+ }
+ if (target instanceof RecyclerView && velocityY < 0) {
+ final RecyclerView recyclerView = (RecyclerView) target;
+ final View firstChild = recyclerView.getChildAt(0);
+ final int childAdapterPosition = recyclerView.getChildAdapterPosition(firstChild);
+ consumed = childAdapterPosition > TOP_CHILD_FLING_THRESHOLD;
+ }
+ return super
+ .onNestedFling(coordinatorLayout, child, target, velocityX, velocityY, consumed);
+ }
+
+ @Override
+ public void onNestedPreScroll(CoordinatorLayout coordinatorLayout, AppBarLayout child,
+ View target, int dx, int dy, int[] consumed, int type) {
+ super.onNestedPreScroll(coordinatorLayout, child, target, dx, dy, consumed, type);
+ isPositive = dy > 0;
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/blogp/collapsingavatar/HeadCollapsing.kt b/app/src/main/java/com/example/blogp/collapsingavatar/HeadCollapsing.kt
deleted file mode 100644
index c2a881c..0000000
--- a/app/src/main/java/com/example/blogp/collapsingavatar/HeadCollapsing.kt
+++ /dev/null
@@ -1,252 +0,0 @@
-package com.example.blogp.collapsingavatar
-
-
-import android.animation.ValueAnimator
-import android.content.Context
-import android.support.design.widget.AppBarLayout
-import android.support.v7.widget.AppCompatTextView
-import android.support.v7.widget.Toolbar
-import android.util.AttributeSet
-import android.view.View
-import android.view.ViewGroup
-import android.view.animation.LinearInterpolator
-import android.widget.FrameLayout
-import android.widget.ImageView
-
-
-class HeadCollapsing(context: Context, attrs: AttributeSet?) : FrameLayout(context, attrs), AppBarLayout.OnOffsetChangedListener {
-
- private lateinit var avatarContainerView: ImageView
- //private lateinit var avatar: ImageView
-
- private val expandedImageSize: Float
- private val collapsedImageSize: Float
-
- private val activityMargin: Float
-
- private var valuesCalculatedAlready = false
- private lateinit var toolbar: Toolbar
- private lateinit var appBarLayout: AppBarLayout
- private var collapsedHeight: Float = 0.toFloat()
- private var expandedHeight: Float = 0.toFloat()
- private var maxOffset: Float = 0.toFloat()
- private var lastOffset = -1
- private var cashCollapseState: kotlin.Pair? = null
-
- //profile title
- private var titleToolbarText: AppCompatTextView? = null
- private var titleTolbarTextSingle: AppCompatTextView? = null
-
- companion object {
- const val ABROAD = 0.95f
- const val TO_EXPANDED_STATE = 0
- const val TO_COLLAPSED_STATE = 1
- const val WAIT_FOR_SWITCH = 0
- const val SWITCHED = 1
- }
-
- constructor(context: Context) : this(context, null) {
- init()
- }
-
- init {
- init()
- val resources = resources
- collapsedImageSize = resources.getDimension(R.dimen.default_collapsed_image_size)
- expandedImageSize = resources.getDimension(R.dimen.default_expanded_image_size)
- activityMargin = resources.getDimension(R.dimen.activity_margin)
- }
-
- private fun init() {
- //sdo nothing
- }
-
- private fun findParentAppBarLayout(): AppBarLayout {
- val parent = this.parent
- return parent as? AppBarLayout ?: if (parent.parent is AppBarLayout) {
- parent.parent as AppBarLayout
- } else {
- throw IllegalStateException("Must be inside an AppBarLayout")
- }
- }
-
- override fun onAttachedToWindow() {
- super.onAttachedToWindow()
- findViews()
- appBarLayout.addOnOffsetChangedListener(this)
- }
-
- private fun findViews() {
- appBarLayout = findParentAppBarLayout()
- toolbar = findSiblingToolbar()
- avatarContainerView = findAvatarContainer()
-
- titleToolbarText = findTextView(appBarLayout, R.id.tv_profile_name)
-
- if (titleToolbarText != null) {
- titleTolbarTextSingle = findTextView(appBarLayout, R.id.tv_profile_name_single, true)
- }
- }
-
- private fun findTextView(appBarLayout: AppBarLayout, id: Int, getItAnuWay: Boolean = false): AppCompatTextView? {
- return appBarLayout.findViewById(id).run {
- when {
- visibility == View.VISIBLE -> this
- getItAnuWay.not() -> null
- else -> this
- }
- }
- }
-
- private fun findAvatarContainer(): ImageView {
- return findViewById(R.id.imgb_avatar_wrap)
- ?: throw IllegalStateException("View with id imgb_avatar_wrap not found")
- }
-
- private fun findSiblingToolbar(): Toolbar {
- val parent = this.parent as ViewGroup
- var i = 0
- val c = parent.childCount
- while (i < c) {
- val child = parent.getChildAt(i)
- if (child is Toolbar) {
- return child
- }
- i++
- }
- throw IllegalStateException("No toolbar found as sibling")
- }
-
- override fun onOffsetChanged(appBarLayout: AppBarLayout, offset: Int) {
- if (lastOffset == offset) {
- return
- }
- lastOffset = offset
- if (!valuesCalculatedAlready) {
- calculateValues()
- valuesCalculatedAlready = true
- }
- val expandedPercentage = 1 - -offset / maxOffset
- updateViews(expandedPercentage)
- }
-
- private fun calculateValues() {
- collapsedHeight = toolbar.height.toFloat()
- expandedHeight = (appBarLayout.height - toolbar.height).toFloat()
- maxOffset = expandedHeight
- }
-
-
- private fun updateViews(updatePercentage: Float) {
- val inversePercentage = 1 - updatePercentage
- var translationY = 0f //\* expandedPercentage
- var currHeight = 0f
- var state = kotlin.Pair(0, 0)
- var translationX = 0f
- var currentImageSize = 0
-
- //PUT collapsing avatar transparent
- when {
- inversePercentage > ABROAD * 0.47 && inversePercentage < ABROAD * 0.77 -> {
- if (avatarContainerView.alpha != updatePercentage) {
- avatarContainerView.alpha = updatePercentage
- avatarContainerView.invalidate()
- }
- }
-
- inversePercentage > ABROAD * 0.77 && inversePercentage < ABROAD -> {
- avatarContainerView.alpha = 0.0f
- avatarContainerView.invalidate()
- }
-
- else -> handler.post {
- if (avatarContainerView.alpha != 1f) {
- avatarContainerView.alpha = 1f
- avatarContainerView.invalidate()
- }
- }
- }
-
- //PUT TOOLBAR title
- when {
-
- inversePercentage < ABROAD -> {
- state = kotlin.Pair(TO_EXPANDED_STATE, cashCollapseState?.second ?: WAIT_FOR_SWITCH)
- titleToolbarText?.visibility = View.VISIBLE
- titleTolbarTextSingle?.visibility = View.INVISIBLE
- }
-
- inversePercentage > ABROAD -> {
- state = kotlin.Pair(TO_COLLAPSED_STATE, cashCollapseState?.second
- ?: WAIT_FOR_SWITCH)
-
- titleToolbarText?.visibility = View.INVISIBLE
- titleTolbarTextSingle?.visibility = View.VISIBLE
-
-
- titleTolbarTextSingle?.let {
- animateShowText(it)
- }
- }
- }
-
- //PUT collapsed/expended sizes for views
- when {
- cashCollapseState != null && cashCollapseState != state -> {
- when (state.first) {
- TO_EXPANDED_STATE -> {
- translationY = toolbar.height.toFloat()
- currHeight = expandedHeight
- translationX = 0f
- currentImageSize = expandedImageSize.toInt()
- }
- TO_COLLAPSED_STATE -> {
- currentImageSize = collapsedImageSize.toInt()
- translationY = (appBarLayout.height - toolbar.height).toFloat()
- currHeight = collapsedHeight
- translationX = appBarLayout.width / 2f - collapsedImageSize / 2 - activityMargin * 2
- }
- }
- this.translationY = translationY
-
- this.layoutParams.height = currHeight.toInt()
-
- ValueAnimator.ofFloat(avatarContainerView.translationX, translationX).apply {
- addUpdateListener {
- avatarContainerView.translationX = it.animatedValue as Float
- }
-
- duration = 350
- (state.first == TO_COLLAPSED_STATE).apply {
- if (this) interpolator = LinearInterpolator()
- }
- start()
- }
-
- avatarContainerView.layoutParams.height = currentImageSize
- avatarContainerView.layoutParams.width = currentImageSize
-
- this.requestLayout()
-
- //SWITCH STATE CASE
- cashCollapseState = kotlin.Pair(state.first, SWITCHED)
- }
- else -> {
- cashCollapseState = kotlin.Pair(state.first, WAIT_FOR_SWITCH)
- }
- }
- }
-
- private fun animateShowText(appCompatTextView: AppCompatTextView) {
- appCompatTextView.apply {
- alpha = 0.0f
- this.translationX = width.toFloat() / 2
- animate()
- .translationX(0f)
- .alpha(1.0f)
- .setDuration(500)
- .setListener(null)
- }
- }
-
-}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/blogp/collapsingavatar/MainActivity.kt b/app/src/main/java/com/example/blogp/collapsingavatar/MainActivity.kt
deleted file mode 100644
index 70b8f34..0000000
--- a/app/src/main/java/com/example/blogp/collapsingavatar/MainActivity.kt
+++ /dev/null
@@ -1,12 +0,0 @@
-package com.example.blogp.collapsingavatar
-
-import android.os.Bundle
-import android.support.v7.app.AppCompatActivity
-
-class MainActivity : AppCompatActivity() {
-
- override fun onCreate(savedInstanceState: Bundle?) {
- super.onCreate(savedInstanceState)
- setContentView(R.layout.activity_main)
- }
-}
diff --git a/app/src/main/java/com/example/blogp/collapsingavatar/MyApp.kt b/app/src/main/java/com/example/blogp/collapsingavatar/MyApp.kt
new file mode 100644
index 0000000..6fdabf3
--- /dev/null
+++ b/app/src/main/java/com/example/blogp/collapsingavatar/MyApp.kt
@@ -0,0 +1,17 @@
+package com.example.blogp.collapsingavatar
+
+import android.app.Application
+import timber.log.Timber
+
+
+class MyApp : Application() {
+
+ override fun onCreate() {
+ super.onCreate()
+ if (BuildConfig.DEBUG) {
+ Timber.plant(Timber.DebugTree())
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/avatar_hit_ledger_img.jpg b/app/src/main/res/drawable/avatar_hit_ledger_img.jpg
new file mode 100644
index 0000000..03390f2
Binary files /dev/null and b/app/src/main/res/drawable/avatar_hit_ledger_img.jpg differ
diff --git a/app/src/main/res/drawable/background_img.jpg b/app/src/main/res/drawable/background_img.jpg
index 55be1a1..054e136 100644
Binary files a/app/src/main/res/drawable/background_img.jpg and b/app/src/main/res/drawable/background_img.jpg differ
diff --git a/app/src/main/res/drawable/background_jocker.jpg b/app/src/main/res/drawable/background_jocker.jpg
new file mode 100644
index 0000000..2d5f41a
Binary files /dev/null and b/app/src/main/res/drawable/background_jocker.jpg differ
diff --git a/app/src/main/res/layout/activity_demo_1.xml b/app/src/main/res/layout/activity_demo_1.xml
new file mode 100644
index 0000000..ab87a93
--- /dev/null
+++ b/app/src/main/res/layout/activity_demo_1.xml
@@ -0,0 +1,163 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_demo_2.xml
similarity index 58%
rename from app/src/main/res/layout/activity_main.xml
rename to app/src/main/res/layout/activity_demo_2.xml
index 3013676..3a7216d 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_demo_2.xml
@@ -16,18 +16,35 @@
android:id="@+id/collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="@dimen/top_head_height"
- android:background="@color/colorPrimary"
- app:contentScrim="?attr/colorPrimary"
- app:layout_scrollFlags="scroll|exitUntilCollapsed">
+ android:background="@color/color_white"
+ app:contentScrim="@color/color_gray_green"
+ app:layout_scrollFlags="scroll|exitUntilCollapsed|snap">
-
+
+
+
+
+
+
+
+ android:layout_height="match_parent"
+ android:fitsSystemWindows="true"
+ app:layout_collapseMode="parallax"
+ app:layout_collapseParallaxMultiplier="0.7" />
-
+ android:layout_height="match_parent">
+ android:visibility="invisible" />
+ android:src="@drawable/avatar_hit_ledger_img"
+ app:civ_border_color="@color/color_white" />
-
+
@@ -86,15 +102,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
- android:layout_margin="@dimen/activity_margin"
- android:textColor="@color/color_white"
+ android:layout_margin="@dimen/avatar_margin"
android:ellipsize="marquee"
android:gravity="center"
android:maxLines="2"
android:scrollHorizontally="true"
- app:layout_collapseMode="pin"
- android:text=" Christian Charles\n Philip Bale"
+ android:text="@string/heath_andrew_ledger_full_txt"
+ android:textAllCaps="true"
+ android:textColor="@color/color_white"
android:textSize="24sp"
+ app:layout_collapseMode="pin"
tools:visibility="visible" />
@@ -107,23 +124,37 @@
android:scrollbars="none"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
-
-
-
+
+
-
+ android:layout_marginStart="@dimen/activity_margin"
+ android:layout_marginTop="32dp"
+ android:layout_marginEnd="@dimen/activity_margin"
+ android:layout_marginBottom="8dp"
+ app:cardElevation="8dp"
+ app:contentPadding="16dp">
+
+
+
+
+
+
diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml
new file mode 100644
index 0000000..b82f634
--- /dev/null
+++ b/app/src/main/res/values/attrs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index 9f3373f..92079b5 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,10 +1,13 @@
- #e77402
- #c45501
- #D81B60
+ #1a4a61
+ #002237
+ #2196F3
#ffffff
+ #77002237
- #70ac4501
+ #375730
+ #613C5730
+ #00FFFFFF
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 8053679..e8c9d4c 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -1,16 +1,17 @@
- 16dp
+ 8dp
+ 24dp
8dp
200dp
- 280dp
- 220dp
+ 220dp
+ 160dp
- 55dp
- 120dp
+ 45dp
+ 135dp
4dp
11dp
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1cb755a..21b8ffa 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -2,9 +2,16 @@
CollapsingAvatar
"Christian Charles Philip Bale (born 30 January 1974) is an English-American actor. He is known for his intense method acting style, often transforming his body drastically for his roles. The recipient of many awards, including an Academy Award and a Golden Globe, he was featured in the Time 100 list of 2011.
-
-Born in Haverfordwest, Wales, to English parents, Bale had his first starring role at age 13 in Steven Spielberg\'s war film Empire of the Sun (1987). Following a decade of leading and supporting roles, including in Little Women (1994), he gained wider recognition for portraying the serial killer Patrick Bateman in American Psycho (2000).
+ Born in Haverfordwest, Wales, to English parents, Bale had his first starring role at age 13 in Steven Spielberg\'s war film Empire of the Sun (1987). Following a decade of leading and supporting roles, including in Little Women (1994), he gained wider recognition for portraying the serial killer Patrick Bateman in American Psycho (2000).
In 2004, he lost 63 pounds (28.5 kg) for his role in the psychological thriller The Machinist (2004). Within six months he gained 100 lb (45 kg) to star as Batman in Christopher Nolan\'s superhero film Batman Begins (2005). He later reprised his role in subsequent installments of the Dark Knight Trilogy, which ranks as the 8th highest-grossing film series. Bale continued to take on starring roles in Nolan's period drama The Prestige (2006), the western 3:10 to Yuma (2007), the science fiction film Terminator Salvation (2009), and the crime drama Public Enemies (2009).
He won the Academy Award for Best Supporting Actor for his portrayal of Dicky Eklund in the David O. Russell-directed biographical film The Fighter (2010). This acclaim continued with his Oscar-nominated roles in Russell's black comedy American Hustle (2013) and in Adam McKay's financial satire The Big Short (2015)."
+ Demo 2
+ Demo 1
+ Heath Ledger
+ Heath Andrew Ledger
+
+ "Heath Andrew Ledger[a] (4 April 1979 – 22 January 2008) was an Australian actor and music video director. After performing roles in several Australian television and film productions during the 1990s, Ledger left for the United States in 1998 to further develop his film career. His work comprised nineteen films, including 10 Things I Hate About You (1999), The Patriot (2000), A Knight's Tale (2001), Monster's Ball (2001), Lords of Dogtown (2005), Brokeback Mountain (2005), Casanova (2005), The Dark Knight (2008), and The Imaginarium of Doctor Parnassus (2009), the latter two being posthumous releases. He also produced and directed music videos and aspired to be a film director."
+ Christian Charles\nPhilip Bale
+ Christian Bale
diff --git a/art/beil_14M_gif.gif b/art/beil_14M_gif.gif
new file mode 100644
index 0000000..f9fc099
Binary files /dev/null and b/art/beil_14M_gif.gif differ
diff --git a/art/beil_gif_14m_cropped.gif b/art/beil_gif_14m_cropped.gif
new file mode 100644
index 0000000..3403372
Binary files /dev/null and b/art/beil_gif_14m_cropped.gif differ
diff --git a/art/ledger_gif_15M.gif b/art/ledger_gif_15M.gif
new file mode 100644
index 0000000..29d738d
Binary files /dev/null and b/art/ledger_gif_15M.gif differ
diff --git a/art/ledger_gif_15M_cropped.gif b/art/ledger_gif_15M_cropped.gif
new file mode 100644
index 0000000..dbcbb53
Binary files /dev/null and b/art/ledger_gif_15M_cropped.gif differ
diff --git a/art/ledger_mp4_4M.mp4 b/art/ledger_mp4_4M.mp4
new file mode 100644
index 0000000..c422efe
Binary files /dev/null and b/art/ledger_mp4_4M.mp4 differ