From cfac2387d0293acc4a985098447138319832855b Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Sat, 18 Feb 2017 21:39:04 +0300 Subject: [PATCH] Added possibility to move gpx files between folders. Added gpx info database. --- .../src/net/osmand/util/Algorithms.java | 7 + OsmAnd/res/layout/current_gpx_item.xml | 302 ++++++++---------- OsmAnd/res/values/strings.xml | 3 + .../src/net/osmand/plus/ContextMenuItem.java | 22 +- OsmAnd/src/net/osmand/plus/GPXDatabase.java | 226 +++++++++++++ .../plus/myplaces/AvailableGPXFragment.java | 68 +++- 6 files changed, 460 insertions(+), 168 deletions(-) create mode 100644 OsmAnd/src/net/osmand/plus/GPXDatabase.java diff --git a/OsmAnd-java/src/net/osmand/util/Algorithms.java b/OsmAnd-java/src/net/osmand/util/Algorithms.java index 97dd1bdd16..4d3637bf98 100644 --- a/OsmAnd-java/src/net/osmand/util/Algorithms.java +++ b/OsmAnd-java/src/net/osmand/util/Algorithms.java @@ -225,6 +225,13 @@ public class Algorithms { } } + public static String capitalizeFirstLetter(String s) { + if (s != null && s.length() > 0) { + return Character.toUpperCase(s.charAt(0)) + (s.length() > 1 ? s.substring(1) : ""); + } else { + return s; + } + } public static boolean objectEquals(Object a, Object b) { if (a == null) { diff --git a/OsmAnd/res/layout/current_gpx_item.xml b/OsmAnd/res/layout/current_gpx_item.xml index 4927254a26..9e13ded31b 100644 --- a/OsmAnd/res/layout/current_gpx_item.xml +++ b/OsmAnd/res/layout/current_gpx_item.xml @@ -7,200 +7,178 @@ android:minHeight="@dimen/list_item_height" android:orientation="vertical"> - - - - - - - - - + android:orientation="horizontal"> + + + + + - - - - - + android:paddingTop="12dp" + android:layout_marginLeft="@dimen/subHeaderMarginLeft" + android:layout_marginRight="@dimen/showAllButtonMarginRight" + android:gravity="center_vertical" + android:orientation="vertical"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:orientation="horizontal"> + + + android:textSize="@dimen/default_list_text_size" + android:text=" • "/> + + - + - + -