From e069d66b66e521a4974f4ff9e514fc257a0996bf Mon Sep 17 00:00:00 2001 From: PaulStets Date: Fri, 26 Jan 2018 16:49:52 +0200 Subject: [PATCH] Fixed #4873 --- .../MeasurementToolFragment.java | 3 +-- .../adapter/MeasurementToolAdapter.java | 18 +++++++++++------- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java index 0245c0ce75..5e3dd47ac4 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/MeasurementToolFragment.java @@ -705,9 +705,8 @@ public class MeasurementToolFragment extends BaseOsmAndFragment { } @Override - public void onItemClick(View view) { + public void onItemClick(int position) { if (mapActivity != null && measurementLayer != null) { - int position = pointsRv.indexOfChild(view); if (pointsListOpened) { hidePointsList(); } diff --git a/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java b/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java index effb5e6442..caa20b9106 100644 --- a/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java +++ b/OsmAnd/src/net/osmand/plus/measurementtool/adapter/MeasurementToolAdapter.java @@ -8,8 +8,10 @@ import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; +import android.widget.FrameLayout; import android.widget.ImageButton; import android.widget.ImageView; +import android.widget.RelativeLayout; import android.widget.TextView; import net.osmand.plus.GPXUtilities.WptPt; @@ -52,12 +54,6 @@ public class MeasurementToolAdapter extends RecyclerView.Adapter