commit
d3a3d51a24
2 changed files with 8 additions and 2 deletions
|
@ -6,6 +6,7 @@ import android.database.sqlite.SQLiteOpenHelper;
|
|||
import android.text.format.DateFormat;
|
||||
import net.osmand.PlatformUtil;
|
||||
import net.osmand.data.LatLon;
|
||||
import net.osmand.plus.GPXDatabase.GpxDataItem;
|
||||
import net.osmand.plus.GPXUtilities;
|
||||
import net.osmand.plus.GPXUtilities.GPXFile;
|
||||
import net.osmand.plus.GPXUtilities.GPXTrackAnalysis;
|
||||
|
@ -226,6 +227,11 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
|
|||
warnings.add(warn);
|
||||
return warnings;
|
||||
}
|
||||
|
||||
GPXFile gpx = data.get(f);
|
||||
GPXTrackAnalysis analysis = gpx.getAnalysis(fout.lastModified());
|
||||
GpxDataItem item = new GpxDataItem(fout, analysis);
|
||||
ctx.getGpxDatabase().add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -467,7 +467,7 @@ public class GpxUiHelper {
|
|||
|
||||
final ContextMenuItem item = adapter.getItem(position);
|
||||
GPXInfo info = list.get(position);
|
||||
udpateGpxInfoView(v, item, info, getDataItem(info), showCurrentGpx && position == 0, app);
|
||||
updateGpxInfoView(v, item, info, getDataItem(info), showCurrentGpx && position == 0, app);
|
||||
|
||||
if (item.getSelected() == null) {
|
||||
v.findViewById(R.id.check_item).setVisibility(View.GONE);
|
||||
|
@ -704,7 +704,7 @@ public class GpxUiHelper {
|
|||
return dlg;
|
||||
}
|
||||
|
||||
public static void udpateGpxInfoView(View v, ContextMenuItem item, GPXInfo info, GpxDataItem dataItem, boolean currentlyRecordingTrack, OsmandApplication app) {
|
||||
public static void updateGpxInfoView(View v, ContextMenuItem item, GPXInfo info, GpxDataItem dataItem, boolean currentlyRecordingTrack, OsmandApplication app) {
|
||||
TextView viewName = ((TextView) v.findViewById(R.id.name));
|
||||
viewName.setText(item.getTitle().replace("/", " • ").trim());
|
||||
ImageView icon = (ImageView) v.findViewById(R.id.icon);
|
||||
|
|
Loading…
Reference in a new issue