/** * Highlights upon dragging, generates callbacks for the selection-listener. * * @param e */ private void performHighlightDrag(MotionEvent e) { Highlight h = mChart.getHighlightByTouchPoint(e.getX(), e.getY()); if (h != null && !h.equalTo(mLastHighlighted)) { mLastHighlighted = h; mChart.highlightTouch(h); } }
/** * Perform a highlight operation. * * @param e */ private void performHighlight(MotionEvent e) { Highlight h = mChart.getHighlightByTouchPoint(e.getX(), e.getY()); if (h == null || h.equalTo(mLastHighlighted)) { mChart.highlightTouch(null); mLastHighlighted = null; } else { mLastHighlighted = h; mChart.highlightTouch(h); } }