Comments (2)
在原来MotionEvent.ACTION_DOWN 添加 一个新的变量赋值
mTime = System.currentTimeMillis();
将原来MotionEvent.ACTION_UP 中改为
if(System.currentTimeMillis() -mTime <300 &&x == event.getX()){
isLongPress = true;
onLongPress(event);
invalidate();
}else{
if (x == event.getX()) {
if (isLongPress) {
isLongPress = false;
}
}
touch = false;
invalidate();
}
from klinechart.
还是有点问题
第一行应该改成:
if(System.currentTimeMillis() -mTime < 300*1000 && Math.abs(event.getX() - x) < 50){
时间应该从毫秒算起,所以需要乘以1000,手指点击的时候从down到up多多少少会带一点偏移直,接x == event.getX() 限制的太死了,会导致误判,所以我判断移动区间小于50个像素。
from klinechart.
Related Issues (20)
- 请问,添加一条新的数据,需要重新计算指标吗? HOT 1
- ios版本哪里有?
- Convert to java file
- 发现一个问题,时间轴不是等差的,请问下怎么解决
- 请问如何隐藏下方柱状图的均线?
- Kline数据量少的时候,第一次进入看不到数据,需拖动才能看到,请问怎么解决
- 不能嵌套ScrollView
- 负数确定能计算?
- 在Frgament中不能滑动不能缩放 HOT 1
- 怎么在ScrollView里面使用k线图显示不出现 HOT 1
- 当下跌超过一定程度的k线问题
- 如何更改右侧Y轴数据的小数位 HOT 1
- 实时刷新数据怎么做到? HOT 2
- VOL成交量这一栏偶尔会出现最顶部的一格数据不存在。
- 设置展示的时间格式 HOT 1
- 怎样获取主图坐标轴数值
- 向尾部添加数据后 k线图里面的蜡烛怎么和火币那样画出来最新的呢 HOT 1
- error HOT 2
- 蜡烛没有点击事件,点击后没有显示相对应的数据
- 请教关于RSI WR图数据计算问题
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 klinechart.