From 2483968f11c38a4c657855baffcbc3aba0ddaf5b Mon Sep 17 00:00:00 2001 From: opyale Date: Thu, 25 Jun 2020 01:27:13 +0200 Subject: [PATCH] Inverting color of divider too (#553) Inverting color of divider too Co-authored-by: opyale Reviewed-by: 6543 <6543@noreply.codeberg.org> --- .../org/mian/gitnex/fragments/ProfileFragment.java | 12 +++++++----- app/src/main/res/layout/fragment_profile.xml | 1 + 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/mian/gitnex/fragments/ProfileFragment.java b/app/src/main/java/org/mian/gitnex/fragments/ProfileFragment.java index 2535219d..05dd0a18 100644 --- a/app/src/main/java/org/mian/gitnex/fragments/ProfileFragment.java +++ b/app/src/main/java/org/mian/gitnex/fragments/ProfileFragment.java @@ -56,6 +56,7 @@ public class ProfileFragment extends Fragment { ImageView userAvatarBackground = v.findViewById(R.id.userAvatarBackground); ImageView userAvatar = v.findViewById(R.id.userAvatar); TextView userLogin = v.findViewById(R.id.userLogin); + View divider = v.findViewById(R.id.divider); TextView userLanguage = v.findViewById(R.id.userLanguage); ImageView userLanguageIcon = v.findViewById(R.id.userLanguageIcon); @@ -82,13 +83,14 @@ public class ProfileFragment extends Fragment { @Override public void onSuccess() { - int textColor = new ColorInverter().getImageViewContrastColor(userAvatarBackground); + int invertedColor = new ColorInverter().getImageViewContrastColor(userAvatarBackground); - userFullName.setTextColor(textColor); - userLogin.setTextColor(textColor); - userLanguage.setTextColor(textColor); + userFullName.setTextColor(invertedColor); + divider.setBackgroundColor(invertedColor); + userLogin.setTextColor(invertedColor); + userLanguage.setTextColor(invertedColor); - ImageViewCompat.setImageTintList(userLanguageIcon, ColorStateList.valueOf(textColor)); + ImageViewCompat.setImageTintList(userLanguageIcon, ColorStateList.valueOf(invertedColor)); blurView.setupWith(aboutFrame) .setBlurAlgorithm(new RenderScriptBlur(ctx)) diff --git a/app/src/main/res/layout/fragment_profile.xml b/app/src/main/res/layout/fragment_profile.xml index 8d3c30ed..3bbb9d1e 100644 --- a/app/src/main/res/layout/fragment_profile.xml +++ b/app/src/main/res/layout/fragment_profile.xml @@ -61,6 +61,7 @@ android:textSize="14sp" />