Dear Sir
I am trying to display the markup textview whenever I move on the curves (LineData
The refreshContent is fired and I get the x coord that I use to compute the data, but no Textview appears
thank u for your help
Lotfi
CustomMarkerView mv = new CustomMarkerView( getActivity().getApplicationContext(), R.layout.custom_marker_view_layout);
chart.setHighlightPerTapEnabled(true);
chart.setDrawMarkerViews(true);
chart.setMarkerView(mv);
these 2 last line are marked as depracated why ?
//---------------------------------------------------------------------------------------------
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 e, Highlight highlight) {
tvContent.setText("" + e.getX()+" " + e.getY()); // set the entry-value as the display text
setiResult(e.getX());
resultsfragment.UpdateResults();
}
//@Override
public int getXOffset(float xpos) {
// this will center the marker-view horizontally
return -(getWidth() / 2);
}
//@Override
public int getYOffset(float ypos) {
// this will cause the marker-view to be above the selected value
return -getHeight();
}
}
Dear Sir
I am trying to display the markup textview whenever I move on the curves (LineData
The refreshContent is fired and I get the x coord that I use to compute the data, but no Textview appears
thank u for your help
Lotfi
CustomMarkerView mv = new CustomMarkerView( getActivity().getApplicationContext(), R.layout.custom_marker_view_layout);
chart.setHighlightPerTapEnabled(true);
chart.setDrawMarkerViews(true);
chart.setMarkerView(mv);
these 2 last line are marked as depracated why ?
//---------------------------------------------------------------------------------------------
public class CustomMarkerView extends MarkerView {