From 988033f5fd0a7e593ba31dc5290bb56ae6ee0c9c Mon Sep 17 00:00:00 2001 From: Ammar Githam Date: Sat, 15 May 2021 07:07:27 +0900 Subject: [PATCH] Fix verified, private icons in profile details shifting when scrolling --- .../fragments/main/ProfileFragment.java | 4 +- .../res/layout/layout_profile_details.xml | 40 +++++++++++-------- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java index e9870987..da752a26 100644 --- a/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java +++ b/app/src/main/java/awais/instagrabber/fragments/main/ProfileFragment.java @@ -527,7 +527,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe @Override public void onRefresh() { - profileDetailsBinding.countsBarrier.getRoot().setVisibility(View.GONE); + profileDetailsBinding.countsDivider.getRoot().setVisibility(View.GONE); profileDetailsBinding.mainProfileImage.setVisibility(View.INVISIBLE); fetchProfileDetails(); } @@ -748,7 +748,7 @@ public class ProfileFragment extends Fragment implements SwipeRefreshLayout.OnRe profileDetailsBinding.mainProfileImage.setImageURI(profileModel.getProfilePicUrl()); profileDetailsBinding.mainProfileImage.setVisibility(View.VISIBLE); - profileDetailsBinding.countsBarrier.getRoot().setVisibility(View.VISIBLE); + profileDetailsBinding.countsDivider.getRoot().setVisibility(View.VISIBLE); final long followersCount = profileModel.getFollowerCount(); final long followingCount = profileModel.getFollowingCount(); diff --git a/app/src/main/res/layout/layout_profile_details.xml b/app/src/main/res/layout/layout_profile_details.xml index d7f5bdd8..61cec0ff 100644 --- a/app/src/main/res/layout/layout_profile_details.xml +++ b/app/src/main/res/layout/layout_profile_details.xml @@ -15,10 +15,11 @@ android:transitionName="profile_pic" android:visibility="invisible" app:actualImageScaleType="centerCrop" - app:layout_constraintBottom_toBottomOf="@id/btnTagged" + app:layout_constraintBottom_toTopOf="@id/top_barrier" app:layout_constraintEnd_toStartOf="@id/btnFollow" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" + app:layout_constraintVertical_bias="0" tools:foreground="@mipmap/ic_launcher" tools:visibility="visible" /> @@ -112,7 +113,7 @@ app:chipBackgroundColor="@null" app:chipIcon="@drawable/ic_outline_person_pin_24" app:chipIconTint="@color/deep_orange_800" - app:layout_constraintBottom_toTopOf="@+id/mainFullName" + app:layout_constraintBottom_toTopOf="@+id/top_barrier" app:layout_constraintStart_toEndOf="@id/mainProfileImage" app:layout_constraintTop_toBottomOf="@id/fav_chip" app:rippleColor="@color/deep_orange_400" @@ -128,12 +129,18 @@ app:chipBackgroundColor="@null" app:chipIcon="@drawable/ic_round_send_24" app:chipIconTint="@color/green" - app:layout_constraintBottom_toTopOf="@+id/mainFullName" + app:layout_constraintBottom_toTopOf="@+id/top_barrier" app:layout_constraintStart_toEndOf="@id/btnTagged" app:layout_constraintTop_toBottomOf="@id/fav_chip" app:rippleColor="@color/green" tools:visibility="visible" /> + + @@ -233,6 +237,7 @@ android:paddingBottom="4dp" android:textAppearance="@style/TextAppearance.AppCompat.Body1" android:visibility="gone" + app:layout_constraintBottom_toTopOf="@id/profileContext" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/mainBiography" @@ -254,7 +259,7 @@ android:textSize="12sp" android:textStyle="italic" android:visibility="gone" - app:layout_constraintBottom_toTopOf="@id/counts_barrier" + app:layout_constraintBottom_toTopOf="@id/counts_divider" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/mainUrl" @@ -262,11 +267,12 @@ tools:visibility="visible" />