Android的:如何绘制简单的线条,并在小部件显示呢? [英] android: how to draw a simple line and display it in a widget?

查看:161
本文介绍了Android的:如何绘制简单的线条,并在小部件显示呢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过绘制一些行用小部件可视化的东西。让刚刚说我得到两个坐标(x,y)的每n秒,然后要更新相应的部件。这工作就好了现在,但现在我想实际绘制这两点之间的直线。

i want to visualize stuff with a widget by drawing some lines. lets just say i get two coordinates (x,y) every n seconds and then want to update the widget accordingly. this works just fine by now, but now i want to actually DRAW a line between those two points.

我用Google搜索了一圈,发现很多东西,但没有解释的图像上绘图的基本原理。因为我有显卡没有经验,我想这些东西以某种方式工作像在LaTeX的tikzpicture绘制的图形。

i googled around and found many things, but nothing explaining the fundamentals of drawing on an image. since i have NO experience with graphics, i imagine these things to work somehow like graphics drawn with tikzpicture in LaTeX.

可有人请向我解释如何这所有的工作 - 或者至少指向我一个例子从一开始就解释这个?这将是非常美联社preciated!

can someone please explain to me the how this all works - or at least point me to an example explaining this from the start? it would be highly appreciated!

谢谢!

推荐答案

http://www.droidnova.com/playing-with-graphics-in-android-part-i,147.html

可以帮助一个开始。不幸的是,这仍然让我无能如何实际在小部件布局DRAW ...

may help for a start. unfortunately, this still leaves me clueless how to actually DRAW on a widgets layout...

...和我自己回答这个问题:<一href=\"http://stackoverflow.com/questions/9359267/android-how-to-add-a-customized-image-to-widgets\">android:如何自定义图像添加到小部件?

... and to answer this by myself: android: how to add a customized image to widgets?

这篇关于Android的:如何绘制简单的线条,并在小部件显示呢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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