From e89785f5e483a5ce54473bb3cf41a0039795030d Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 14 Mar 2017 16:56:17 +0300 Subject: [PATCH] Fix - open current track --- OsmAnd/res/layout/current_gpx_item.xml | 10 ++++++++++ .../net/osmand/plus/myplaces/AvailableGPXFragment.java | 9 +++++++++ 2 files changed, 19 insertions(+) diff --git a/OsmAnd/res/layout/current_gpx_item.xml b/OsmAnd/res/layout/current_gpx_item.xml index 7ad4a285dc..01f60537b6 100644 --- a/OsmAnd/res/layout/current_gpx_item.xml +++ b/OsmAnd/res/layout/current_gpx_item.xml @@ -14,8 +14,11 @@ android:background="?attr/bg_color"> + + diff --git a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java index 60cc5956c7..433c5e00b3 100644 --- a/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java +++ b/OsmAnd/src/net/osmand/plus/myplaces/AvailableGPXFragment.java @@ -271,6 +271,15 @@ public class AvailableGPXFragment extends OsmandExpandableListFragment { if (OsmandPlugin.getEnabledPlugin(OsmandMonitoringPlugin.class) != null) { currentGpxView = inflater.inflate(R.layout.current_gpx_item, null, false); createCurrentTrackView(); + currentGpxView.findViewById(R.id.current_track_info).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + Intent newIntent = new Intent(getActivity(), getMyApplication().getAppCustomization().getTrackActivity()); + newIntent.putExtra(TrackActivity.CURRENT_RECORDING, true); + newIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); + startActivity(newIntent); + } + }); listView.addHeaderView(currentGpxView); /* currentTrackView.setOnClickListener(new View.OnClickListener() {