Android 自定义视图:旋转轮、“spinner”控制
Android 是否有任何现有的旋转轮、旋转器(不是实际的 Android 旋转器)控件的实现?
示例:
Are there any existing implementations of rotating wheel, spinner like (not the actual android spinner) controls for Android?
Example:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有一些类似的东西您应该能够根据您的需要进行修改。
正如评论中提到的,您可以使用注意机器人模拟旋钮,边缘有点粗糙,但您可以将其用作底座。
还有创建 的分步演练旋转拨号器,这又不完全是您所追求的,但可以进一步修改。
最后一个可能是最有希望的,它是 Rotary Knob Widget,作者指出该实现可用作音量控制,与您的原始图片非常相似。
There are a couple of things that are similar that you should be able to modify to your needs.
As mentioned in the comments, you can use the Mind The Robot Analog Rotary Knob, which is a bit rough around the edges but you could use it as a base.
There's also a step-by-step walkthrough for creating a Rotating Dialer, which again isn't exactly what you're after but could be modified further.
The last one might be the most promising, which is a Rotary Knob Widget, the author states that the implementation could be useful as a volume control, which closely resembles your original picture.
这是一个非常棒的 Android 拨号控件 https://bitbucket.org/warwick/hgdialrepo
它经过充分测试并且非常稳定。
以下是 YouTube 演示:https://youtu.be/h_7VxrZ2W-g
该库附带一个演示应用程序和源代码。
使用画布
希望这有帮助。
Here is a totally awesome dial control for android https://bitbucket.org/warwick/hgdialrepo
It's well tested and very stable.
Here is the youtube demonstration: https://youtu.be/h_7VxrZ2W-g
The library comes is a demo app and source code.
Uses Canvas
Hope this helps.