]> git.ktnx.net Git - mobile-ledger.git/commitdiff
rename method to better reflect its function
authorDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 19 May 2020 19:11:53 +0000 (22:11 +0300)
committerDamyan Ivanov <dam+mobileledger@ktnx.net>
Tue, 19 May 2020 19:11:53 +0000 (22:11 +0300)
app/src/main/java/net/ktnx/mobileledger/ui/MobileLedgerListFragment.java
app/src/main/java/net/ktnx/mobileledger/utils/Colors.java

index 13c4fe04bd1d61d41045f841831a35e6625c3c23..b7cafca484a8cfb98271212ae01256046122e0f3 100644 (file)
@@ -35,7 +35,7 @@ public class MobileLedgerListFragment extends Fragment {
     protected MainActivity mActivity;
     protected RecyclerView root;
     protected void themeChanged(Integer counter) {
     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)
     }
     public void onBackgroundTaskRunningChanged(Boolean isRunning) {
         if (mActivity == null)
index 1316a8e584ecc06e1c7b69b8c73cb02a0e68464b..80ec58ab82db1f642d10b1a76716a9362e1dc2e0 100644 (file)
@@ -202,7 +202,7 @@ public class Colors {
         int themeId = -1;
         if (themeHue == 360)
             themeHue = 0;
         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",
             int index;
             if ((themeHue % HueRing.hueStepDegrees) != 0) {
                 Logger.warn("profiles",
@@ -237,12 +237,12 @@ public class Colors {
     }
     public static @NonNull
     ColorStateList getColorStateList(int hue) {
     }
     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);
         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);