Merge pull request #10273 from osmandapp/sorting-follow-track
Sorting follow track
This commit is contained in:
commit
39996723dc
2 changed files with 3 additions and 1 deletions
|
@ -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
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue