kristiyanP / colorpicker

A simple color picker library for Android
Apache License 2.0
193 stars 43 forks source link

problem with custom set color #13

Closed avrpic8 closed 7 years ago

avrpic8 commented 7 years ago

Hi my bro. I have a problem with setColors(ArrayList colorsHexList) method. when I set my own color by a ArrayList , the dialog nothink show. What should I do?

this is my code:

ArrayList colorHex = new ArrayList<>(); colorHex.add("0xFF000000");

    final ColorPicker colorPicker = new ColorPicker(this);
    colorPicker.setOnFastChooseColorListener(new ColorPicker.OnFastChooseColorListener() {
        @Override
        public void setOnFastChooseColorListener(int position, int color) {
            showToast(String.valueOf(color));
        }

        @Override
        public void onCancel(){
            // put code
        }
    }).setColors(colorHex).show();
edi233 commented 7 years ago

I have the same problem: final ColorPicker colorPicker = new ColorPicker(activity); ArrayList colors = new ArrayList<>(); colors.add("#82B926"); colors.add("#a276eb"); colors.add("#6a3ab2"); colors.add("#666666"); colors.add("#FFFF00"); colors.add("#3C8D2F"); colors.add("#FA9F00"); colors.add("#FF0000"); colorPicker.setColors(colors); and see only white squares

ksrpraneeth commented 7 years ago

Yes even i am facing the same problem