双柄滑块android

我想知道是否有人有一些代码,或者知道有没有创建双柄滑块的代码的地方.示例:

I was wondering if anyone had some code, or knew of a place that has code for creating a double handled slider. Example :

我正在寻找类似的方法,使用双滑块在时间数组上搜索年龄范围,就像在照片中一样

I am looking to do something similar using a double slider to search for a range of ages on a time array , like in the photo

提前致谢

推荐答案

我设法自己构建了它......我遵循的想法与上面的答案不同.我创建了一些可以用手指在屏幕上拖动的项目,并且我固定了 Y 位置,使其只能从左到右移动.之后,我生成了表示进度的矩形(在旋钮之间和旋钮之外).这种技术的好处是您可以轻松地将滑块自定义为垂直或水平,或者如果您想在背景中放置自定义图片.来源在下面的链接中,如果有人有任何问题,请提出.链接:eclipse 项目

I managed to build it myself... the idea I followed was different from the answers above. I created some items that can be dragged on the screen with the finger, and I fixed the Y position so it can only move from left to right. After that, I generated rectangles that signify the progress (between knobs and outside them). The good thing about this technique is that you can easily customize the slider to be vertical or horizontal, or if you want to put a custom picture in the background. The source is in the link below, and if anyone has any questions please ask. link: eclipse project

相关文章