Merge pull request #10273 from osmandapp/sorting-follow-track

Sorting follow track
This commit is contained in:
Vitaliy 2020-11-26 14:21:08 +00:00 committed by GitHub
commit 39996723dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -75,7 +75,6 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="?attr/route_info_bg" android:background="?attr/route_info_bg"
android:foreground="@drawable/bg_contextmenu_shadow"
android:foregroundGravity="top|fill_horizontal"> android:foregroundGravity="top|fill_horizontal">
<androidx.core.widget.NestedScrollView <androidx.core.widget.NestedScrollView

View file

@ -156,6 +156,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
if (view != null) { if (view != null) {
ImageButton closeButton = view.findViewById(R.id.close_button); ImageButton closeButton = view.findViewById(R.id.close_button);
buttonsShadow = view.findViewById(R.id.buttons_shadow); buttonsShadow = view.findViewById(R.id.buttons_shadow);
sortButton = view.findViewById(R.id.sort_button);
closeButton.setImageDrawable(getContentIcon(AndroidUtils.getNavigationIconResId(app))); closeButton.setImageDrawable(getContentIcon(AndroidUtils.getNavigationIconResId(app)));
closeButton.setOnClickListener(new View.OnClickListener() { closeButton.setOnClickListener(new View.OnClickListener() {
@Override @Override
@ -219,6 +220,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
if (Algorithms.isEmpty(fileName)) { if (Algorithms.isEmpty(fileName)) {
fileName = app.getString(R.string.shared_string_gpx_track); 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); GPXInfo gpxInfo = new GPXInfo(fileName, file != null ? file.lastModified() : 0, file != null ? file.length() : 0);
TrackEditCard importTrackCard = new TrackEditCard(mapActivity, gpxInfo); TrackEditCard importTrackCard = new TrackEditCard(mapActivity, gpxInfo);
importTrackCard.setListener(this); importTrackCard.setListener(this);
@ -268,6 +270,7 @@ public class FollowTrackFragment extends ContextMenuScrollFragment implements Ca
tracksCard = new TracksToFollowCard(mapActivity, list, defaultCategory); tracksCard = new TracksToFollowCard(mapActivity, list, defaultCategory);
tracksCard.setListener(FollowTrackFragment.this); tracksCard.setListener(FollowTrackFragment.this);
getCardsContainer().addView(tracksCard.build(mapActivity)); getCardsContainer().addView(tracksCard.build(mapActivity));
sortButton.setVisibility(View.VISIBLE);
} }
} }
} }