Fix space before second row
This commit is contained in:
parent
3a70579de7
commit
82b0a08ff4
3 changed files with 21 additions and 4 deletions
|
@ -80,12 +80,15 @@
|
|||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="4dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:maxLines="1"
|
||||
android:textSize="@dimen/default_desc_text_size"
|
||||
tools:text="213 m"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/map_marker_left_point_space"
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/map_marker_point_text_view"
|
||||
android:layout_width="wrap_content"
|
||||
|
@ -97,13 +100,16 @@
|
|||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<View
|
||||
android:id="@+id/map_marker_right_point_space"
|
||||
android:layout_width="4dp"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<android.support.v7.widget.AppCompatTextView
|
||||
android:id="@+id/map_marker_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginLeft="4dp"
|
||||
android:layout_marginRight="4dp"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:textColor="?android:textColorSecondary"
|
||||
|
|
|
@ -16,7 +16,9 @@ public class MapMarkerItemViewHolder extends RecyclerView.ViewHolder {
|
|||
final ImageView icon;
|
||||
final TextView title;
|
||||
final TextView distance;
|
||||
final View leftPointSpace;
|
||||
final TextView point;
|
||||
final View rightPointSpace;
|
||||
final TextView description;
|
||||
final ImageButton optionsBtn;
|
||||
final View divider;
|
||||
|
@ -30,7 +32,9 @@ public class MapMarkerItemViewHolder extends RecyclerView.ViewHolder {
|
|||
icon = (ImageView) view.findViewById(R.id.map_marker_icon);
|
||||
title = (TextView) view.findViewById(R.id.map_marker_title);
|
||||
distance = (TextView) view.findViewById(R.id.map_marker_distance);
|
||||
leftPointSpace = view.findViewById(R.id.map_marker_left_point_space);
|
||||
point = (TextView) view.findViewById(R.id.map_marker_point_text_view);
|
||||
rightPointSpace = view.findViewById(R.id.map_marker_right_point_space);
|
||||
description = (TextView) view.findViewById(R.id.map_marker_description);
|
||||
optionsBtn = (ImageButton) view.findViewById(R.id.map_marker_options_button);
|
||||
divider = view.findViewById(R.id.divider);
|
||||
|
@ -48,4 +52,9 @@ public class MapMarkerItemViewHolder extends RecyclerView.ViewHolder {
|
|||
public void setBottomShadowVisibility(int visibility) {
|
||||
bottomShadow.setVisibility(visibility);
|
||||
}
|
||||
|
||||
public void setPointSpaceVisibility(int visibility) {
|
||||
leftPointSpace.setVisibility(visibility);
|
||||
rightPointSpace.setVisibility(visibility);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,6 +132,8 @@ public class MapMarkersHistoryAdapter extends RecyclerView.Adapter<RecyclerView.
|
|||
notifyItemRemoved(position);
|
||||
}
|
||||
});
|
||||
itemViewHolder.setIconDirectionVisibility(View.GONE);
|
||||
itemViewHolder.setPointSpaceVisibility(View.GONE);
|
||||
if (position == getItemCount() - 1) {
|
||||
((MapMarkerItemViewHolder) holder).setBottomShadowVisibility(View.VISIBLE);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue