Comments (8)
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.
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.
Okay I will try the solution ,Thanks thought @RickorDD
from colorpicker.
Where do i have to put this method?
from colorpicker.
that is not the solution but the cause. I'm going to open another issue.
from colorpicker.
from colorpicker.
again for understanding. Is it this bug?
https://youtu.be/XdgR-6jNwek
This is my debugging.
Logcat
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.
ViewPager + AlphaSlider: when trying to slide seekbar, viewPager changes fragment. any solution?
from colorpicker.
Related Issues (20)
- NullPointerException in onDraw() once alpha channel enabled
- How do I set an OnClickListener for the "select" button?
- how to change font of title text?
- How to cancel dialog?
- java.lang.NullPointerException: Attempt to invoke virtual method 'void android.graphics.Matrix.set(android.graphics.Matrix)' on a null object reference
- java.lang.NumberFormatException: Invalid int: "te"
- Add Gradient Color Picker options
- Add support for TV controller
- Bug: when using the dependency from Jitpack, the translations are gone HOT 2
- Can I change the transparency text?
- Thank you guys.
- Duplicate class com.google.android.flexbox.AlignContent
- ColorPickerDialog.newBuilder() creates a DialogFragment instead of a Dialog, encouraging memory leaks
- Scrolling through ViewPager2 and selecting colors can be a bit challenging.
- need the background round corner!
- setAlphaSliderVisible() not working properly
- Tagging Releases
- NumberFormatException HOT 2
- Library does not allow setting preference as not persistent
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colorpicker.