Comments (3)
哪个seekBar?
from xui.
所有seekbar XSeekBar XRangeSlider 都是这样的情况,放在滚动界面就不好用了。放在边缘滑动时还会触动手势返回,我通过继承 然后在滑动超过10个单位时候调用 parent.requestDisallowInterceptTouchEvent(true) 可以解决问题:
class MyXRangeSlider @jvmoverloads constructor(
context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = 0
) : XRangeSlider(context, attrs, defStyleAttr) {
private var downX = 0f
private var isDispatch = false
@SuppressLint("ClickableViewAccessibility")
override fun onTouchEvent(event: MotionEvent): Boolean {
when (event.action) {
MotionEvent.ACTION_DOWN -> {
downX = event.x
isDispatch = false
}
MotionEvent.ACTION_MOVE -> {
if (abs(downX - event.x) > 10f) {
isDispatch = true
}
}
MotionEvent.ACTION_UP -> {
isDispatch = false
}
}
return super.onTouchEvent(event)
}
override fun dispatchTouchEvent(event: MotionEvent?): Boolean {
if (event?.action == MotionEvent.ACTION_MOVE) {
parent.requestDisallowInterceptTouchEvent(isDispatch)
} else {
parent.requestDisallowInterceptTouchEvent(false)
}
return super.dispatchTouchEvent(event)
}
}
from xui.
已修复
05d9eda
from xui.
Related Issues (20)
- 带圆角的图片轮播 RadiusImageBanner 右边的圓角未能正常显示 HOT 2
- 请教下编辑框的焦点事件问题怎么解决 HOT 1
- SwitchButton的style不生效 HOT 4
- 希望增加一个树形控件。 HOT 1
- 如何用java 动态创建ButtonView 呢? HOT 1
- SuperTextView 支持 setDividerLineColor HOT 1
- XUICommonListItemView 无法修改背景色(实现暗黑模式) HOT 1
- 编译不通过 HOT 2
- 1.1.0版本无法下载依赖 HOT 1
- MaterialDialog自定义view有输入框时无法自动隐藏键盘问题 HOT 1
- 使用RoundButton时无发正常预览 HOT 1
- toast
- 标题栏使用无效的问题 HOT 1
- 新建的项目引入主题报错。 HOT 2
- SuperTextView的sShapeCornersRadius属性失效 HOT 1
- 如何让界面最下面的组件,工具,拓展三个Tab选项一直显示 HOT 1
- 混淆打release包,“shrinkResources true ” 报错:Unable to locate resourceFile : xui_default_flow_tag_bg_rect_round.xml HOT 3
- 动态生成XRangeSlider实例并添加至Linearlayout时触发空指针 HOT 1
- 为什么你的app的拓展部分的代码,很难找呢? HOT 1
- 运行sample,发现在个人中心这个返回按键,一直按不了,触屏无效。最后只能通过手机的返回按钮来返回。 HOT 1
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 xui.