فهرست منبع

Fixed https://github.com/afollestad/material-dialogs/issues/771

Aidan Follestad 9 سال پیش
والد
کامیت
68fd646664
1فایلهای تغییر یافته به همراه4 افزوده شده و 5 حذف شده
  1. 4 5
      commons/src/main/java/com/afollestad/materialdialogs/color/ColorChooserDialog.java

+ 4 - 5
commons/src/main/java/com/afollestad/materialdialogs/color/ColorChooserDialog.java

@@ -329,14 +329,13 @@ public class ColorChooserDialog extends DialogFragment implements View.OnClickLi
             mCustomSeekGValue = (TextView) v.findViewById(R.id.colorGValue);
             mCustomSeekB = (SeekBar) v.findViewById(R.id.colorB);
             mCustomSeekBValue = (TextView) v.findViewById(R.id.colorBValue);
+            if (!foundPreselectColor) {
+                // If color wasn't found in the preset colors, it must be custom
+                toggleCustom(dialog);
+            }
         }
 
         invalidate();
-        if (!foundPreselectColor) {
-            // If color wasn't found in the preset colors, it must be custom
-            toggleCustom(dialog);
-        }
-
         return dialog;
     }