Merge branch 'gpx_improvements' into sasha_pasha_branch
This commit is contained in:
commit
a796efc5c3
1 changed files with 106 additions and 94 deletions
|
@ -139,6 +139,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
private RotatedTileBox rotatedTileBox;
|
||||
private Bitmap mapBitmap;
|
||||
private Bitmap mapTrackBitmap;
|
||||
private boolean chartClicked;
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
|
@ -1073,6 +1074,7 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
@Override
|
||||
public Object instantiateItem(ViewGroup container, int position) {
|
||||
|
||||
chartClicked = false;
|
||||
GPXTabItemType tabType = tabTypes[position];
|
||||
View view = null;
|
||||
switch (tabType) {
|
||||
|
@ -1091,6 +1093,13 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
if (gpxItem != null) {
|
||||
GPXTrackAnalysis analysis = gpxItem.analysis;
|
||||
final LineChart chart = (LineChart) view.findViewById(R.id.chart);
|
||||
chart.setHighlightPerDragEnabled(false);
|
||||
chart.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
if (!chartClicked) {
|
||||
chartClicked = true;
|
||||
chart.setHighlightPerDragEnabled(true);
|
||||
chart.setOnTouchListener(new View.OnTouchListener() {
|
||||
@Override
|
||||
public boolean onTouch(View v, MotionEvent event) {
|
||||
|
@ -1190,6 +1199,9 @@ public class TrackSegmentFragment extends OsmAndListFragment {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
IconsCache ic = app.getIconsCache();
|
||||
switch (tabType) {
|
||||
|
|
Loading…
Reference in a new issue