1

I am setting an onTouchListener to the XYPlot like in the AndroidPlot example application.

I want to know when the user touches the x domain title, y domain title, or the general title. There is no getRect() function for the class TextLabelWidget, but there is one for the XYGraphWidget. Should I edit the android plot project and push it? Or did I misread the code and is there already this functionality?

Epic
  • 113
  • 1
  • 12
ginsengtang
  • 751
  • 1
  • 7
  • 17

1 Answers1

0

It turns out I did overlook the functionality. I was looking for something like this:

plot.getTitleWidget().getGridRect().contains(point.x, point.y))

But it turns out that there is a function for the widget itself and I would not have to get the RectF android object. The below works fine:

plot.getTitleWidget().contains(PointFObj) 
ginsengtang
  • 751
  • 1
  • 7
  • 17