I'm trying to create my CustomMarkerView class. But when I override the refreshContent, it shows that method does not override from its superclass and that "highlight" parameter is never used.
CustomMarkerView.java sample code
public class CustomMarkerView extends MarkerView {
private TextView tvContent;
public CustomMarkerView (Context context, int layoutResource) {
super(context, layoutResource);
// this markerview only displays a textview
tvContent = (TextView) findViewById(R.id.tvContent);
}
// callbacks everytime the MarkerView is redrawn, can be used to update the
// content (user-interface)
@Override
public void refreshContent(Entry entries, Highlight highlight) {
tvContent.setText("" + entries.getVal());
// set the entry-value as the display text
}
@Override
public int getXOffset() {
// this will center the marker-view horizontally
return -(getWidth() / 2);
}
@Override
public int getYOffset() {
// this will cause the marker-view to be above the selected value
return -getHeight();
}
}
I've directly coped the code from
https://github.com/PhilJay/MPAndroidChart/wiki/MarkerView
What am I missing?