Showing popup on clicking a point in graph AChartE

2019-08-01 01:34发布

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条回答
兄弟一词,经得起流年.
2楼-- · 2019-08-01 02:04

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.

查看更多
登录 后发表回答