From 92753fcdbc537a00b744707eee14f421fb60867c Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Wed, 25 Nov 2020 19:14:27 +0200 Subject: [PATCH 1/3] UI: Add sorting to Add to Track dialog / Follow Remove the sort button when track is selected Remove shadow below the title bar Shadow above buttons --- OsmAnd/res/layout/follow_track_options.xml | 1 - .../osmand/plus/routepreparationmenu/FollowTrackFragment.java | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/OsmAnd/res/layout/follow_track_options.xml b/OsmAnd/res/layout/follow_track_options.xml index 0877fcc307..4523599e6c 100644 --- a/OsmAnd/res/layout/follow_track_options.xml +++ b/OsmAnd/res/layout/follow_track_options.xml @@ -75,7 +75,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:background="?attr/route_info_bg" - android:foreground="@drawable/bg_contextmenu_shadow" android:foregroundGravity="top|fill_horizontal"> points = gpxFile.getRoutePoints(); From fa2bb207bb3f5d1b9dc1a45e9e406890c1bf8db6 Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Thu, 26 Nov 2020 00:11:45 +0200 Subject: [PATCH 2/3] Remove the sort button when track is selected. --- .../osmand/plus/routepreparationmenu/FollowTrackFragment.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java index 0a78a631c1..2214e2052d 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java @@ -156,6 +156,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca if (view != null) { ImageButton closeButton = view.findViewById(R.id.close_button); buttonsShadow = view.findViewById(R.id.buttons_shadow); + sortButton = view.findViewById(R.id.sort_button); closeButton.setImageDrawable(getContentIcon(AndroidUtils.getNavigationIconResId(app))); closeButton.setOnClickListener(new View.OnClickListener() { @Override @@ -219,6 +220,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca if (Algorithms.isEmpty(fileName)) { fileName = app.getString(R.string.shared_string_gpx_track); } + sortButton.setVisibility(View.GONE); GPXInfo gpxInfo = new GPXInfo(fileName, file != null ? file.lastModified() : 0, file != null ? file.length() : 0); TrackEditCard importTrackCard = new TrackEditCard(mapActivity, gpxInfo); importTrackCard.setListener(this); @@ -268,6 +270,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca tracksCard = new TracksToFollowCard(mapActivity, list, defaultCategory); tracksCard.setListener(FollowTrackFragment.this); getCardsContainer().addView(tracksCard.build(mapActivity)); + sortButton.setVisibility(View.VISIBLE); } } } From c951837c34c2dcede622bdc9e7e2af1b9700c7f9 Mon Sep 17 00:00:00 2001 From: androiddevkkotlin Date: Thu, 26 Nov 2020 00:35:53 +0200 Subject: [PATCH 3/3] Remove unnecessary visible --- .../osmand/plus/routepreparationmenu/FollowTrackFragment.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java index 2214e2052d..7730010808 100644 --- a/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java +++ b/OsmAnd/src/net/osmand/plus/routepreparationmenu/FollowTrackFragment.java @@ -508,8 +508,6 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca private void selectTrackToFollow(GPXFile gpxFile) { MapActivity mapActivity = getMapActivity(); - final ImageButton sortButton = getView().findViewById(R.id.sort_button); - sortButton.setVisibility(View.GONE); if (mapActivity != null) { this.gpxFile = gpxFile; List points = gpxFile.getRoutePoints();