From 6324e9b642496172e32095a8f823b0d043c0da09 Mon Sep 17 00:00:00 2001 From: masrobot Date: Tue, 27 Apr 2021 21:56:21 +0700 Subject: [PATCH] add scale image animation --- .../user/profile/UpdateUserProfileActivity.kt | 8 ++ .../layout/activity_update_user_profile.xml | 24 ++--- ...ate_user_profile_xml_form_layout_scene.xml | 98 +++++++++++++++++++ 3 files changed, 119 insertions(+), 11 deletions(-) create mode 100644 app/src/main/res/xml/activity_update_user_profile_xml_form_layout_scene.xml diff --git a/app/src/main/java/c/m/koskosan/ui/form/update/user/profile/UpdateUserProfileActivity.kt b/app/src/main/java/c/m/koskosan/ui/form/update/user/profile/UpdateUserProfileActivity.kt index c6c50d6..4dc1b11 100644 --- a/app/src/main/java/c/m/koskosan/ui/form/update/user/profile/UpdateUserProfileActivity.kt +++ b/app/src/main/java/c/m/koskosan/ui/form/update/user/profile/UpdateUserProfileActivity.kt @@ -145,6 +145,14 @@ class UpdateUserProfileActivity : AppCompatActivity() { // Form Validator formValidation() + + // swipe to refresh data + updateUserProfileBinding.updateUserProfileSwipeRefreshView.setOnRefreshListener { + updateUserProfileBinding.updateUserProfileSwipeRefreshView.isRefreshing = false + + // get data + initializeFieldValueOfUserProfileData() + } } // Validate form on this activity diff --git a/app/src/main/res/layout/activity_update_user_profile.xml b/app/src/main/res/layout/activity_update_user_profile.xml index 3f6dbac..c483be0 100644 --- a/app/src/main/res/layout/activity_update_user_profile.xml +++ b/app/src/main/res/layout/activity_update_user_profile.xml @@ -36,10 +36,11 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - + android:layout_height="wrap_content" + app:layoutDescription="@xml/activity_update_user_profile_xml_form_layout_scene"> + app:layout_constraintTop_toTopOf="parent" />