aChartEngine, GraphicalView OnClickListener not working

前端 未结 2 647
遥遥无期
遥遥无期 2021-01-20 22:02

I\'m new to android and am using aChartEngine to create a bar chart. I want to capture the x and y values when a user clicks on the chart. I have looked at the demos from aC

2条回答
  •  长发绾君心
    2021-01-20 22:37

    Can you check your code for some definition of an object like XYMultipleSeriesRenderer? Maybe you forgot to set the setClickEnabled method to true?!

    Or maybe you should try:

    setOnTouchListener 
    

    with the method:

    public boolean onTouch(View v, MotionEvent event)
    

    It works for me.

提交回复
热议问题