Add a text on a plotted dot in android -
i developing android application.so need plot dot according xy coordinates , pop text when click on name.i plotted dot still searching way popup text on it. if can please me.
are drawing on canvas? if so
when intializing vars:
textpaint tp = new textpaint();
and in ondraw:
canvas.drawtext("you're text",dot.x,dot.y,tp);
you might change y not right on dot, , maybe color so:
tp.setcolor(color.red); canvas.drawtext("you're text",dot.x,dot.y-10,tp);
you can make "pop-up" when select "dot" using ontouch , simple booleans.
Comments
Post a Comment