Selaa lähdekoodia

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

Aidan Follestad 9 vuotta sitten
vanhempi
commit
68fd646664

+ 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;
     }