added icon to drawable

This commit is contained in:
Sem van der Hoeven
2021-01-06 15:32:25 +01:00
parent 05c8951f2c
commit 15608bed2b
2 changed files with 8 additions and 3 deletions

View File

@@ -105,6 +105,7 @@ public class HomeFragment extends Fragment implements LocationListener {
* stops the current route
*/
private void stopRoute() {
Log.e(TAG, "stopRoute: STOPPING ROUTE" );
RouteHandler.INSTANCE.finishRoute();
stopButton.setVisibility(View.GONE);
Toast.makeText(requireContext(), getResources().getString(R.string.route_stop_toast), Toast.LENGTH_SHORT).show();
@@ -337,12 +338,16 @@ public class HomeFragment extends Fragment implements LocationListener {
//new thread because we don't want the main thread to hang, this method gets called a lot
Thread t = new Thread(() -> {
List<com.a1.nextlocation.data.Location> locs = RouteHandler.INSTANCE.getCurrentRoute().getLocations();
com.a1.nextlocation.data.Location last = locs.get(locs.size()-1);
com.a1.nextlocation.data.Location last = null;
if (RouteHandler.INSTANCE.isFollowingRoute()) {
List<com.a1.nextlocation.data.Location> locs = RouteHandler.INSTANCE.getCurrentRoute().getLocations();
last = locs.get(locs.size()-1);
}
for (com.a1.nextlocation.data.Location l : LocationListManager.INSTANCE.getLocationList()) {
if (com.a1.nextlocation.data.Location.getDistance(currentLocation.getLatitude(), currentLocation.getLongitude(), l.getLat(), l.getLong()) < 10) {
if (l.equals(last)) stopRoute();
StaticData.INSTANCE.visitLocation(l);
if (l.equals(last)) stopRoute();
}
}
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB