像android中的速度计这样的简单仪表视图? [英] Simple gauge view like speedmeter in android?

查看:18
本文介绍了像android中的速度计这样的简单仪表视图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要一个简单的仪表视图,我将在其中定义起始值和结束值,并有一个指针来显示给定的变量值.

I want to have a simple gauge view where i will define the start value and the end value and have a pointer to show given variable value.

所以我可以显示一个给定的值,比如速度计.例如,如果我的 textView 的值是 1300,那么在 textview 旁边我希望有这样的自定义仪表视图动画!

So i can show a given value like speedmeter. For example if my the value of a textView is 1300, then next to the textview i want to have this custom meter view animation like this!

有可能吗?任何现有的示例代码?

It is possible? Any existing example code?

推荐答案

我在 Evelina Vrabie 的博客,使用了它,效果很好!

Another one i found at Evelina Vrabie's blog, used it and worked perfect!

查看 Evelina Vrabie 的 GitHub.它有一个仪表库和一些可以与之交互的样本.

Look at Evelina Vrabie's GitHub. It has a gauge library and some samples to interact with.

非常感谢店主 Evelina Vrabie!

Big thanks to the owner Evelina Vrabie!

<小时>

但是它不适用于 XHDPI/少数版本的 android 设备(4 以上).问题是仪表视图中的文本.

However it is not working on XHDPI/Few versions of android devices (above 4). Problem is the text in gauge view.

这篇关于像android中的速度计这样的简单仪表视图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆