Fix divider

This commit is contained in:
PavelRatushny 2017-09-14 14:13:58 +03:00
parent 82b0a08ff4
commit f2492c4923
3 changed files with 8 additions and 0 deletions

View file

@ -57,4 +57,8 @@ public class MapMarkerItemViewHolder extends RecyclerView.ViewHolder {
leftPointSpace.setVisibility(visibility); leftPointSpace.setVisibility(visibility);
rightPointSpace.setVisibility(visibility); rightPointSpace.setVisibility(visibility);
} }
public void setDividerVisibility(int visibility) {
divider.setVisibility(visibility);
}
} }

View file

@ -115,8 +115,10 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
} }
if (pos == getItemCount() - 1) { if (pos == getItemCount() - 1) {
holder.setBottomShadowVisibility(View.VISIBLE); holder.setBottomShadowVisibility(View.VISIBLE);
holder.setDividerVisibility(View.GONE);
} else { } else {
holder.setBottomShadowVisibility(View.GONE); holder.setBottomShadowVisibility(View.GONE);
holder.setDividerVisibility(View.VISIBLE);
} }
holder.iconReorder.setOnTouchListener(new View.OnTouchListener() { holder.iconReorder.setOnTouchListener(new View.OnTouchListener() {

View file

@ -136,8 +136,10 @@ public class MapMarkersHistoryAdapter extends RecyclerView.Adapter<RecyclerView.
itemViewHolder.setPointSpaceVisibility(View.GONE); itemViewHolder.setPointSpaceVisibility(View.GONE);
if (position == getItemCount() - 1) { if (position == getItemCount() - 1) {
((MapMarkerItemViewHolder) holder).setBottomShadowVisibility(View.VISIBLE); ((MapMarkerItemViewHolder) holder).setBottomShadowVisibility(View.VISIBLE);
((MapMarkerItemViewHolder) holder).setDividerVisibility(View.GONE);
} else { } else {
((MapMarkerItemViewHolder) holder).setBottomShadowVisibility(View.GONE); ((MapMarkerItemViewHolder) holder).setBottomShadowVisibility(View.GONE);
((MapMarkerItemViewHolder) holder).setDividerVisibility(View.VISIBLE);
} }
} else if (holder instanceof MapMarkerDateViewHolder) { } else if (holder instanceof MapMarkerDateViewHolder) {
final MapMarkerDateViewHolder dateViewHolder = (MapMarkerDateViewHolder) holder; final MapMarkerDateViewHolder dateViewHolder = (MapMarkerDateViewHolder) holder;