private void _setViewHolder(View view) { TransportCellViewHolder vh = new TransportCellViewHolder(); vh.leftIcon = (ImageView) view.findViewById(R.id.listItemSelectRouteKind); vh.leftText = (TextView) view.findViewById(R.id.listItemSelectRouteRouteName); vh.rightText = (TextView) view.findViewById(R.id.listItemSelectRouteFullName); vh.needInflate = false; view.setTag(vh); }
public void removeRoute(int position, View view) { TransportCellViewHolder vh = (TransportCellViewHolder) view.getTag(); vh.needInflate = true; remove(getItem(position)); notifyDataSetChanged(); }