类似于电表的视图-Android [英] Electricity meter-like view - Android

查看:129
本文介绍了类似于电表的视图-Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的Android应用中包括一个显示数字的小部件/视图,并且当数字递增时,新数字会滑入视图,就像每个数字都在滚动拨盘上一样.在英国(至少),电表以这种方式工作.例如:

I am trying to include a widget / view in my Android app that displays a number and when the number is incremented, the new number slides into view as if each digit was on a rolling dial. In the UK (at least), electricity meters work in this way. Examples would be:

查看 https://play的应用图片.google.com/store/apps/details?id = ie.esb.app.android

查看 http://的屏幕截图www.appszoom.com/android_applications/lifestyle/using-the-power-meter-in-tokyo_vvfi.html

通过Google图片搜索"Android电表视图",也会产生类似的结果.

A Google image search for "android electricity meter view" also brings up some similar results.

在iOS上,Nike + FuelBand应用程序在同一刻度盘上显示其加油点:

On iOS, the Nike+ FuelBand app shows their fuel points on the same dial:

我什至不确定我该怎么称呼那些东西.有人告诉我它们最初被称为数字时钟",但是显然这并不是一件好事. Android代码已经存在某个地方了吗?

I'm not even sure I know what to call those things. I am told that they were originally called a "Digital Clock", but that is obviously not a good thing to search for. Does Android code exist for one somewhere already?

否则,我想我可以通过将Fragments滑入和滑出视图来创建一个,也许可以使用ViewPager.这是解决这个问题的好方法吗?

Otherwise I think I could create one by sliding Fragments in and out of view, perhaps using a ViewPager. Would this be a good way to go about this problem?

推荐答案

实际上,我称它为 DigitalView ,并以ScrollView作为每一位来实现幻灯片效果.

Actually, I call it DigitalView, using ScrollView as every bit to implement slide effect.

这篇关于类似于电表的视图-Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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