Fix small issues

This commit is contained in:
Alexander Sytnyk 2017-09-08 16:12:59 +03:00
parent c5a0536057
commit a1b9e6791e
4 changed files with 8 additions and 4 deletions

View file

@ -9,8 +9,8 @@
android:orientation="vertical">
<LinearLayout
android:layout_height="56dp"
android:layout_width="match_parent"
android:layout_height="56dp"
android:background="?attr/selectableItemBackground">
<android.support.v7.widget.AppCompatImageView
@ -45,6 +45,8 @@
android:id="@+id/map_marker_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:maxLines="2"
android:textColor="?android:textColorPrimary"
android:textSize="@dimen/default_list_text_size"
tools:text="Van Gogh Museum"/>

View file

@ -355,7 +355,7 @@ public class MapMarkersHelper {
}
if (colorIndex == -1) {
if (mapMarkers.size() > 0) {
colorIndex = (mapMarkers.get(0).colorIndex + 1) % MAP_MARKERS_COLORS_COUNT;
colorIndex = (mapMarkers.get(mapMarkers.size() - 1).colorIndex + 1) % MAP_MARKERS_COLORS_COUNT;
} else {
colorIndex = 0;
}

View file

@ -269,7 +269,7 @@ public class MapMarkersDbHelper {
boolean active = query.getInt(4) == 1;
long added = query.getLong(5);
long visited = query.getLong(6);
long groupKey = query.getInt(7);
long groupKey = query.getLong(7);
int colorIndex = query.getInt(8);
long nextKey = query.getLong(9);

View file

@ -89,7 +89,9 @@ public class MapMarkersActiveAdapter extends RecyclerView.Adapter<MapMarkerItemV
holder.title.setText(marker.getName(mapActivity));
holder.description.setText(marker.creationDate + "");
holder.description.setText(marker.groupKey == -1
? marker.creationDate + ""
: mapActivity.getMyApplication().getMapMarkersHelper().getGroupName(marker.groupKey));
holder.optionsBtn.setImageDrawable(iconsCache.getThemedIcon(R.drawable.ic_action_marker_passed));
holder.optionsBtn.setOnClickListener(new View.OnClickListener() {