skydoves / ColorPickerPreference

🎨 A library that lets you implement ColorPicker, ColorPickerDialog, ColorPickerPreference.
Apache License 2.0
477 stars 51 forks source link

How selected color when dragging is Stopped by user . #9

Closed Dhiru-Dev closed 5 years ago

Dhiru-Dev commented 6 years ago

I need to call some api as per our requirements ,i using


colorPickerView.setColorListener(new ColorListener() {
            @Override
            public void onColorSelected(ColorEnvelope colorEnvelope) {
                //LinearLayout linearLayout = findViewById(R.id.linearLayout);
                //linearLayout.setBackgroundColor(colorEnvelope.getColor())

                int rr [] = colorEnvelope.getColorRGB();
                 Log.i("Print","Color: "+rr);
            }
        });

But it is calling many time when i drag the pointer ,it's kind of live feed . but i want the color selected value when the user left dragging , in this way we have restrict unnecessary api call .

Please help me

skydoves commented 6 years ago

@DhiruServer Hello!, then would use this method?

.setACTION_UP(true)

This method makes the listener be invoked when ACTION_UP action.