Git Product home page Git Product logo

Comments (8)

RickorDD avatar RickorDD commented on August 26, 2024

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?

from colorpicker.

RickorDD avatar RickorDD commented on August 26, 2024

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

from colorpicker.

richanshah avatar richanshah commented on August 26, 2024

Okay I will try the solution ,Thanks thought @RickorDD

from colorpicker.

richanshah avatar richanshah commented on August 26, 2024

Where do i have to put this method?

from colorpicker.

RickorDD avatar RickorDD commented on August 26, 2024

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

from colorpicker.

richanshah avatar richanshah commented on August 26, 2024

from colorpicker.

RickorDD avatar RickorDD commented on August 26, 2024

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?

from colorpicker.

lucky108 avatar lucky108 commented on August 26, 2024

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

from colorpicker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.