From: Damyan Ivanov Date: Tue, 19 May 2020 19:11:53 +0000 (+0300) Subject: rename method to better reflect its function X-Git-Tag: v0.14.0~77 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=898bf5932a1bdb2a7b197d9e0981f722111295b6;p=mobile-ledger.git rename method to better reflect its function --- diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/MobileLedgerListFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/MobileLedgerListFragment.java index 13c4fe04..b7cafca4 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/MobileLedgerListFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/MobileLedgerListFragment.java @@ -35,7 +35,7 @@ public class MobileLedgerListFragment extends Fragment { protected MainActivity mActivity; protected RecyclerView root; protected void themeChanged(Integer counter) { - swiper.setColorSchemeColors(Colors.getColors()); + swiper.setColorSchemeColors(Colors.getSwipeCircleColors()); } public void onBackgroundTaskRunningChanged(Boolean isRunning) { if (mActivity == null) diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java b/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java index 1316a8e5..80ec58ab 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java @@ -202,7 +202,7 @@ public class Colors { int themeId = -1; if (themeHue == 360) themeHue = 0; - if ((themeHue >= 0) && (themeHue < 360)) { + if ((themeHue >= 0) && (themeHue < 360) && (themeHue != DEFAULT_HUE_DEG)) { int index; if ((themeHue % HueRing.hueStepDegrees) != 0) { Logger.warn("profiles", @@ -237,12 +237,12 @@ public class Colors { } public static @NonNull ColorStateList getColorStateList(int hue) { - return new ColorStateList(EMPTY_STATES, getColors(hue)); + return new ColorStateList(EMPTY_STATES, getSwipeCircleColors(hue)); } - public static int[] getColors() { - return getColors(profileThemeId); + public static int[] getSwipeCircleColors() { + return getSwipeCircleColors(profileThemeId); } - public static int[] getColors(int hue) { + public static int[] getSwipeCircleColors(int hue) { int[] colors = new int[]{0, 0, 0, 0, 0, 0}; for (int i = 0; i < 6; i++, hue = (hue + 60) % 360) { colors[i] = getPrimaryColorForHue(hue);