GUI、小部件、UI:我将如何创建针规?
好的,简要回顾一下,被要求创建一个用于记录数据特定数据并在完成后将其显示到屏幕上的工作应用程序。所以它会像这样运行。
press start > press stop > display results.
然而,我公司的 IT 总监刚刚告诉我,他想要以针形图显示信息(重力、平均速度、最高速度),并且还想要一种华丽的方式来显示其他信息(所用时间、行驶距离) )
我最初的想法是这样的:
创建一个像这样的针规 ,但比例较小并显示数字值在图表下方或旁边,然后显示以闹钟样式数字显示的行驶距离和花费时间。这一切都将在屏幕的左侧以细列的形式运行,然后显示一张地图,显示起始位置和结束位置以及旅程所采取的路线,
基本上我希望它看起来像这样 (对于绘图的粗糙性表示歉意) 沿着这些思路的东西将是完美的!
我想我可以计算出地图业务以及时间和距离读数的数字,但我从来没有做过任何真正花哨的 UI 东西。
我该如何开始制作针规?
我想尝试一下单杠量规吧?万一我无法让针规工作。
另外,我只有到周二的时间! :S
OK, Brief recap, Was asked to create an app for work that records data specific data and display it to the screen when finished. So it would function like so.
press start > press stop > display results.
However, I have just been told by the IT director of my company that he wants to display information in needle graphs (g-force, average speed, top speed) and also wants a flashy way of displaying the others (time taken, distance traveled)
My initial idea is this:
create a needle gauge like this, but on a smaller scale and have the digit value display below or beside the graph and to just display the distance traveled and time taken displayed as alarm clock style digits. This would all run down the left hand side of the screen in a thin column and then hava a map displaying the starting location and end location with the route taken for the journey
basically I would like it to look like this (sorry for the crudeness of the drawing)
Something along these lines would be perfect!
I think I could work out the map business and the digits for the time and distance readouts but I have never done any really fancy UI stuff.
How would I get started making the needle gauge?
I was thinking of trying a horizontal bar gauge forst maybe? Incase I cant get the needle gauge to work.
Also, I only have a til tuesday! :S
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
想象以下非常基本的想法:
我们有带有背景图像的自定义视图,它是没有针的仪表!
因此,我们首先使用扩展
View
的类来实现此功能。现在让我们添加一个针
为了使它更好
drawLine
绘制针,而是将其做成一个形状带有尺寸
invision the following very basic idea:
We have our Custom View with a background image which is the gauge without the needle!
So we first implement this using a class that extends
View
Now lets add a needle
To make it better
drawLine
but rather make it a shapewith dimensions