ColorPicker icon indicating copy to clipboard operation
ColorPicker copied to clipboard

Colorpanel not working properly inside nested scroll view

Open richanshah opened this issue 4 years ago • 8 comments

richanshah avatar Jun 02 '20 08:06 richanshah

I could understand this.

Override public boolean onTouchEvent(MotionEvent event) {
    boolean update = false;

    Log.i("Reiko","ColorPiverView onTouchEvent"+event.getAction());
    switch (event.getAction()) {

      case MotionEvent.ACTION_DOWN:
        startTouchPoint = new Point((int) event.getX(), (int) event.getY());
        update = moveTrackersIfNeeded(event);
        break;
      case MotionEvent.ACTION_MOVE:
        update = moveTrackersIfNeeded(event);
        break;
      case MotionEvent.ACTION_UP:
        startTouchPoint = null;
        update = moveTrackersIfNeeded(event);
        break;
    }
    Log.i("Reiko","ColorPickerView update:"+update);
    if (update) {
      Log.i("Reiko","ColorPickerView if update");
      if (onColorChangedListener != null) {
        Log.i("Reiko","ColorPickerView2 if update");
        onColorChangedListener.onColorChanged(Color.HSVToColor(alpha, new float[] { hue, sat, val }));
      }
      invalidate();
      return true;
    }

ColorPickerView2 if update
ColorPiverView onTouchEvent2
ColorPickerView update:true
ColorPickerView if update
ColorPickerView2 if update
ColorPiverView onTouchEvent2
ColorPickerView update:true
ColorPickerView if update
ColorPickerView2 if update
ColorPiverView onTouchEvent1
ColorPickerView update:false
ColorPiverView onTouchEvent0
ColorPickerView update:false
ColorPickerDialog OnTouchListener onPickerTouchListener
ColorPickerDialog OnTouchListener onPickerTouchListener

Why is TouchEvent 0 or 1 and then update = false?

RickorDD avatar Jun 17 '20 19:06 RickorDD

this is the problem

2020-06-17 21:44:42.479 28762-28762/de.reikodd.prototyping I/Reiko: ColorPickererView onTouchEvent1 2020-06-17 21:44:42.479 28762-28762/de.reikodd.prototyping I/Reiko: ACTION_UP false 2020-06-17 21:44:42.479 28762-28762/de.reikodd.prototyping I/Reiko: ColorPickerView update:false 2020-06-17 21:44:43.055 28762-28762/de.reikodd.prototyping I/Reiko: ColorPickererView onTouchEvent0 2020-06-17 21:44:43.055 28762-28762/de.reikodd.prototyping I/Reiko: ACTION_DOWN true 2020-06-17 21:44:43.055 28762-28762/de.reikodd.prototyping I/Reiko: ColorPickerView update:true

2020-06-17 21:44:46.967 28762-28762/de.reikodd.prototyping I/Reiko: ColorPickererView onTouchEvent1 2020-06-17 21:44:46.968 28762-28762/de.reikodd.prototyping I/Reiko: ACTION_UP false 2020-06-17 21:44:46.968 28762-28762/de.reikodd.prototyping I/Reiko: ColorPickerView update:false 2020-06-17 21:44:47.453 28762-28762/de.reikodd.prototyping I/Reiko: ColorPickererView onTouchEvent0 2020-06-17 21:44:47.453 28762-28762/de.reikodd.prototyping I/Reiko: ACTION_DOWN false 2020-06-17 21:44:47.453 28762-28762/de.reikodd.prototyping I/Reiko: ColorPickerView update:false 2020-06-17 21:44:47.453 28762-28762/de.reikodd.prototyping I/Reiko: ColorPickerDialog OnTouchListener onPickerTouchListener MotionEvent

RickorDD avatar Jun 17 '20 19:06 RickorDD

Okay I will try the solution ,Thanks thought @RickorDD

richanshah avatar Jun 18 '20 08:06 richanshah

Where do i have to put this method?

richanshah avatar Jun 18 '20 08:06 richanshah

that is not the solution but the cause. I'm going to open another issue.

RickorDD avatar Jun 18 '20 13:06 RickorDD

Okay Richa Shah Android Developer | Smart Sense phone: 9016804343 <09016804343> email: [email protected]

On Thu, Jun 18, 2020 at 7:10 PM Reiko [email protected] wrote:

that is not the solution but the cause. I'm going to open another issue.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jaredrummler/ColorPicker/issues/90#issuecomment-646023717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEA54EZPYX4RCQHME42QEDLRXIKMJANCNFSM4NQPYXUA .

richanshah avatar Jun 18 '20 13:06 richanshah

again for understanding. Is it this bug? https://youtu.be/XdgR-6jNwek

This is my debugging.

Bildschirmfoto 2020-06-18 um 15 54 50

Logcat

ok Bildschirmfoto 2020-06-18 um 16 04 10

error Bildschirmfoto 2020-06-18 um 15 55 43

ACTION_DOWN and ACTION_UP follow too quickly? There are some solutions to this, but it is not my area.

Does anyone have a solution?

RickorDD avatar Jun 18 '20 13:06 RickorDD

ViewPager + AlphaSlider: when trying to slide seekbar, viewPager changes fragment. any solution?

lucky108 avatar Aug 05 '23 20:08 lucky108