Showing popup on clicking a point in graph AChartE

2019-08-01 01:36发布

问题:

I want to show a little popup containing the information of the point clicked in a graph which uses AchartEngine for drawing graphs. I am currently showing the point information in a toast but the requirement is to show it near the point in the graph. Is there any such feature in the API or any suggestions how I can accomplish this task ? Thanks in advance.

回答1:

The toast sounds like a good way to display information. Toast takes the x and y co-ordinate for it's placement which is kinda neat and what you need. The x/y co-ords are in pixels units in relation to the your screen's width/height px dimens.

You don't need a dialog popup, i believe. Unless you really need user confirmations like OK/Done or Cancel/Dismiss action buttons.

You can also look at fragments to use for your needs.

But i think toast is ideal for your needs. Your choice.