Use itemView
This commit is contained in:
parent
939ba0558a
commit
bffea36c30
1 changed files with 1 additions and 4 deletions
|
@ -8,7 +8,6 @@ import android.view.LayoutInflater;
|
||||||
import android.view.MotionEvent;
|
import android.view.MotionEvent;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.FrameLayout;
|
|
||||||
import android.widget.ImageButton;
|
import android.widget.ImageButton;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
@ -124,7 +123,7 @@ public class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementTool
|
||||||
listener.onRemoveClick(holder.getAdapterPosition());
|
listener.onRemoveClick(holder.getAdapterPosition());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
holder.holderLayout.setOnClickListener(new View.OnClickListener() {
|
holder.itemView.setOnClickListener(new View.OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View view) {
|
public void onClick(View view) {
|
||||||
listener.onItemClick(holder.getAdapterPosition());
|
listener.onItemClick(holder.getAdapterPosition());
|
||||||
|
@ -151,7 +150,6 @@ public class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementTool
|
||||||
|
|
||||||
static class MeasureToolItemVH extends RecyclerView.ViewHolder {
|
static class MeasureToolItemVH extends RecyclerView.ViewHolder {
|
||||||
|
|
||||||
final FrameLayout holderLayout;
|
|
||||||
final ImageView iconReorder;
|
final ImageView iconReorder;
|
||||||
final ImageView icon;
|
final ImageView icon;
|
||||||
final TextView title;
|
final TextView title;
|
||||||
|
@ -162,7 +160,6 @@ public class MeasurementToolAdapter extends RecyclerView.Adapter<MeasurementTool
|
||||||
|
|
||||||
MeasureToolItemVH(View view) {
|
MeasureToolItemVH(View view) {
|
||||||
super(view);
|
super(view);
|
||||||
holderLayout = (FrameLayout) view;
|
|
||||||
iconReorder = (ImageView) view.findViewById(R.id.measure_point_reorder_icon);
|
iconReorder = (ImageView) view.findViewById(R.id.measure_point_reorder_icon);
|
||||||
icon = (ImageView) view.findViewById(R.id.measure_point_icon);
|
icon = (ImageView) view.findViewById(R.id.measure_point_icon);
|
||||||
title = (TextView) view.findViewById(R.id.measure_point_title);
|
title = (TextView) view.findViewById(R.id.measure_point_title);
|
||||||
|
|
Loading…
Reference in a new issue