Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
4f0ae13604
1 changed files with 20 additions and 0 deletions
|
@ -1000,8 +1000,16 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
||||||
});
|
});
|
||||||
final View finalView = view;
|
final View finalView = view;
|
||||||
chart.setOnChartGestureListener(new OnChartGestureListener() {
|
chart.setOnChartGestureListener(new OnChartGestureListener() {
|
||||||
|
|
||||||
|
float highlightDrawX = -1;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChartGestureStart(MotionEvent me, ChartGesture lastPerformedGesture) {
|
public void onChartGestureStart(MotionEvent me, ChartGesture lastPerformedGesture) {
|
||||||
|
if (chart.getHighlighted() != null && chart.getHighlighted().length > 0) {
|
||||||
|
highlightDrawX = chart.getHighlighted()[0].getDrawX();
|
||||||
|
} else {
|
||||||
|
highlightDrawX = -1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -1043,6 +1051,18 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChartTranslate(MotionEvent me, float dX, float dY) {
|
public void onChartTranslate(MotionEvent me, float dX, float dY) {
|
||||||
|
if (highlightDrawX != -1) {
|
||||||
|
Highlight h = chart.getHighlightByTouchPoint(highlightDrawX, 0f);
|
||||||
|
if (h != null) {
|
||||||
|
chart.highlightValue(h);
|
||||||
|
WptPt wpt = getPoint(chart, h.getX());
|
||||||
|
if (wpt != null) {
|
||||||
|
selectedPointLatLon = new LatLon(wpt.lat, wpt.lon);
|
||||||
|
Bitmap bmp = drawSelectedPoint();
|
||||||
|
imageView.setImageDrawable(new BitmapDrawable(app.getResources(), bmp));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue