commit
d662b44c19
2 changed files with 8 additions and 9 deletions
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -52,12 +52,6 @@ public class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementTool
|
|||
final int backgroundColor = ContextCompat.getColor(mapActivity,
|
||||
nightMode ? R.color.ctx_menu_info_view_bg_dark : R.color.ctx_menu_info_view_bg_light);
|
||||
view.setBackgroundColor(backgroundColor);
|
||||
view.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
listener.onItemClick(view);
|
||||
}
|
||||
});
|
||||
return new MeasureToolItemVH(view);
|
||||
}
|
||||
|
||||
|
@ -129,6 +123,12 @@ public class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementTool
|
|||
listener.onRemoveClick(holder.getAdapterPosition());
|
||||
}
|
||||
});
|
||||
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View view) {
|
||||
listener.onItemClick(holder.getAdapterPosition());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -174,7 +174,7 @@ public class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementTool
|
|||
|
||||
void onRemoveClick(int position);
|
||||
|
||||
void onItemClick(View view);
|
||||
void onItemClick(int position);
|
||||
|
||||
void onDragStarted(RecyclerView.ViewHolder holder);
|
||||
|
||||
|
|
Loading…
Reference in a new issue