dropping waypoints that are (1) not current (older than two minutes) and that are (2) not accurate (probably more than 50 meters off)
This commit is contained in:
parent
4f34172a9f
commit
b448bb7f2d
25 changed files with 136 additions and 98 deletions
|
@ -30,10 +30,13 @@ android {
|
|||
|
||||
dependencies {
|
||||
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
||||
implementation 'com.android.support:appcompat-v7:' + supportLibraryVersion
|
||||
implementation 'com.android.support:design:' + supportLibraryVersion
|
||||
implementation 'com.android.support:cardview-v7:' + supportLibraryVersion
|
||||
implementation 'com.android.support.constraint:constraint-layout:' + constraintLayoutVersion
|
||||
|
||||
implementation "androidx.appcompat:appcompat:$appcompatVersion"
|
||||
implementation "androidx.constraintlayout:constraintlayout:$constraintlayoutVersion"
|
||||
implementation "androidx.cardview:cardview:$cardviewVersion"
|
||||
|
||||
implementation "com.google.android.material:material:$materialVersion"
|
||||
|
||||
implementation 'org.osmdroid:osmdroid-android:' + osmdroidVersion
|
||||
implementation 'com.google.code.gson:gson:' + gsonVersion
|
||||
}
|
||||
|
|
|
@ -34,19 +34,6 @@ import android.os.Environment;
|
|||
import android.os.IBinder;
|
||||
import android.os.Vibrator;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.design.widget.BottomNavigationView;
|
||||
import android.support.design.widget.FloatingActionButton;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentManager;
|
||||
import android.support.v4.app.FragmentStatePagerAdapter;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.support.v7.app.AppCompatActivity;
|
||||
import android.support.v7.widget.CardView;
|
||||
import android.util.SparseArray;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
@ -54,6 +41,10 @@ import android.view.ViewGroup;
|
|||
import android.widget.Button;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.bottomnavigation.BottomNavigationView;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import org.osmdroid.config.Configuration;
|
||||
import org.y20k.trackbook.helpers.DialogHelper;
|
||||
import org.y20k.trackbook.helpers.ExportHelper;
|
||||
|
@ -68,6 +59,17 @@ import java.util.HashMap;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.cardview.widget.CardView;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentStatePagerAdapter;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
|
||||
/**
|
||||
* MainActivity class
|
||||
|
|
|
@ -31,15 +31,13 @@ import android.os.Bundle;
|
|||
import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import org.osmdroid.api.IMapController;
|
||||
import org.osmdroid.tileprovider.tilesource.TileSourceFactory;
|
||||
import org.osmdroid.util.GeoPoint;
|
||||
|
@ -56,6 +54,10 @@ import org.y20k.trackbook.helpers.TrackbookKeys;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
|
||||
/**
|
||||
* MainActivityMapFragment class
|
||||
|
@ -124,7 +126,7 @@ public class MainActivityMapFragment extends Fragment implements TrackbookKeys {
|
|||
if (savedInstanceState != null) {
|
||||
Location savedLocation = savedInstanceState.getParcelable(INSTANCE_CURRENT_LOCATION);
|
||||
// check if saved location is still current
|
||||
if (LocationHelper.isNewLocation(savedLocation)) {
|
||||
if (LocationHelper.isCurrent(savedLocation)) {
|
||||
mCurrentBestLocation = savedLocation;
|
||||
} else {
|
||||
mCurrentBestLocation = null;
|
||||
|
@ -207,7 +209,7 @@ public class MainActivityMapFragment extends Fragment implements TrackbookKeys {
|
|||
|
||||
// mark user's location on map
|
||||
if (mCurrentBestLocation != null && !mTrackerServiceRunning) {
|
||||
mMyLocationOverlay = MapHelper.createMyLocationOverlay(mActivity, mCurrentBestLocation, LocationHelper.isNewLocation(mCurrentBestLocation));
|
||||
mMyLocationOverlay = MapHelper.createMyLocationOverlay(mActivity, mCurrentBestLocation, LocationHelper.isCurrent(mCurrentBestLocation));
|
||||
mMapView.getOverlays().add(mMyLocationOverlay);
|
||||
}
|
||||
|
||||
|
@ -508,7 +510,7 @@ public class MainActivityMapFragment extends Fragment implements TrackbookKeys {
|
|||
mMapView.getOverlays().remove(mMyLocationOverlay);
|
||||
// only update while not tracking
|
||||
if (!mTrackerServiceRunning) {
|
||||
mMyLocationOverlay = MapHelper.createMyLocationOverlay(mActivity, mCurrentBestLocation, LocationHelper.isNewLocation(mCurrentBestLocation));
|
||||
mMyLocationOverlay = MapHelper.createMyLocationOverlay(mActivity, mCurrentBestLocation, LocationHelper.isCurrent(mCurrentBestLocation));
|
||||
mMapView.getOverlays().add(mMyLocationOverlay);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,16 +24,6 @@ import android.content.IntentFilter;
|
|||
import android.location.Location;
|
||||
import android.os.AsyncTask;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.constraint.ConstraintLayout;
|
||||
import android.support.constraint.Group;
|
||||
import android.support.design.widget.BottomSheetBehavior;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
import android.support.v4.app.Fragment;
|
||||
import android.support.v4.app.FragmentActivity;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
@ -45,6 +35,8 @@ import android.widget.Spinner;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.android.material.bottomsheet.BottomSheetBehavior;
|
||||
|
||||
import org.osmdroid.api.IMapController;
|
||||
import org.osmdroid.tileprovider.tilesource.TileSourceFactory;
|
||||
import org.osmdroid.util.GeoPoint;
|
||||
|
@ -67,6 +59,16 @@ import java.io.File;
|
|||
import java.text.DateFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
import androidx.constraintlayout.widget.Group;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentActivity;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
|
||||
/**
|
||||
* MainActivityTrackFragment class
|
||||
|
|
|
@ -18,11 +18,12 @@ package org.y20k.trackbook;
|
|||
|
||||
import android.app.Application;
|
||||
import android.os.Build;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
|
||||
import org.y20k.trackbook.helpers.LogHelper;
|
||||
import org.y20k.trackbook.helpers.NightModeHelper;
|
||||
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
|
||||
|
||||
/**
|
||||
* Trackbook.class
|
||||
|
|
|
@ -37,8 +37,6 @@ import android.os.CountDownTimer;
|
|||
import android.os.Handler;
|
||||
import android.os.IBinder;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v4.content.LocalBroadcastManager;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.y20k.trackbook.core.Track;
|
||||
|
@ -50,6 +48,9 @@ import org.y20k.trackbook.helpers.TrackbookKeys;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
|
||||
|
||||
import static android.hardware.Sensor.TYPE_STEP_COUNTER;
|
||||
|
||||
|
||||
|
@ -397,9 +398,11 @@ public class TrackerService extends Service implements TrackbookKeys, SensorEven
|
|||
int trackSize = mTrack.getWayPoints().size();
|
||||
|
||||
if (trackSize == 0) {
|
||||
// add first location to track
|
||||
success = mTrack.addWayPoint(previousLocation, mCurrentBestLocation);
|
||||
|
||||
// if accurate AND current
|
||||
if (LocationHelper.isAccurate(mCurrentBestLocation) && LocationHelper.isCurrent(mCurrentBestLocation)) {
|
||||
// add first location to track
|
||||
success = mTrack.addWayPoint(previousLocation, mCurrentBestLocation);
|
||||
}
|
||||
} else {
|
||||
// get location of previous WayPoint
|
||||
previousLocation = mTrack.getWayPointLocation(trackSize - 1);
|
||||
|
@ -415,8 +418,9 @@ public class TrackerService extends Service implements TrackbookKeys, SensorEven
|
|||
averageSpeed = distance / ((float) timeDifference / ONE_SECOND_IN_NANOSECOND);
|
||||
}
|
||||
|
||||
if (LocationHelper.isNewWayPoint(previousLocation, mCurrentBestLocation, averageSpeed)) {
|
||||
// if new, add current best location to track
|
||||
// if accurate AND new
|
||||
if (LocationHelper.isAccurate(mCurrentBestLocation) && LocationHelper.isNewWayPoint(previousLocation, mCurrentBestLocation, averageSpeed)) {
|
||||
// add current best location to track
|
||||
success = mTrack.addWayPoint(previousLocation, mCurrentBestLocation);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.y20k.trackbook.core;
|
|||
import android.location.Location;
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import org.y20k.trackbook.helpers.LocationHelper;
|
||||
import org.y20k.trackbook.helpers.TrackbookKeys;
|
||||
|
@ -29,6 +28,8 @@ import java.util.Date;
|
|||
import java.util.GregorianCalendar;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
|
||||
/**
|
||||
* Track class
|
||||
|
|
|
@ -21,8 +21,9 @@ import android.app.AlertDialog;
|
|||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.v4.app.DialogFragment;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,8 +20,6 @@ package org.y20k.trackbook.helpers;
|
|||
import android.app.Activity;
|
||||
import android.content.res.Resources;
|
||||
import android.database.DataSetObserver;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v7.widget.ThemedSpinnerAdapter;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
@ -35,6 +33,9 @@ import java.io.File;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.ThemedSpinnerAdapter;
|
||||
|
||||
|
||||
/**
|
||||
* DropdownHelper class
|
||||
|
|
|
@ -20,7 +20,6 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.location.Location;
|
||||
import android.os.Environment;
|
||||
import android.support.v4.content.FileProvider;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.y20k.trackbook.R;
|
||||
|
@ -37,6 +36,8 @@ import java.util.Date;
|
|||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
/**
|
||||
* ExportHelper class
|
||||
*/
|
||||
|
|
|
@ -22,12 +22,13 @@ import android.location.LocationListener;
|
|||
import android.location.LocationManager;
|
||||
import android.os.SystemClock;
|
||||
import android.provider.Settings;
|
||||
import android.support.annotation.Nullable;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
|
||||
/**
|
||||
* LocationHelper class
|
||||
|
@ -125,8 +126,14 @@ public final class LocationHelper implements TrackbookKeys {
|
|||
}
|
||||
|
||||
|
||||
/* Checks accuracy of given location */
|
||||
public static boolean isAccurate(Location location) {
|
||||
return location.getAccuracy() < FIFTY_METER_RADIUS;
|
||||
}
|
||||
|
||||
|
||||
/* Checks if given location is newer than two minutes */
|
||||
public static boolean isNewLocation(Location location) {
|
||||
public static boolean isCurrent(Location location) {
|
||||
if (location == null) {
|
||||
return false;
|
||||
} else {
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.y20k.trackbook.helpers;
|
|||
import android.content.Context;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.location.Location;
|
||||
import android.support.v4.content.ContextCompat;
|
||||
import android.widget.Toast;
|
||||
|
||||
import org.osmdroid.util.GeoPoint;
|
||||
|
@ -34,6 +33,8 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
/**
|
||||
* MapHelper class
|
||||
*/
|
||||
|
|
|
@ -22,9 +22,10 @@ import android.content.SharedPreferences;
|
|||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.support.v7.app.AppCompatDelegate;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.app.AppCompatDelegate;
|
||||
|
||||
|
||||
/**
|
||||
* NightModeHelper class
|
||||
|
|
|
@ -26,15 +26,16 @@ import android.content.res.Resources;
|
|||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
import android.os.Build;
|
||||
import android.support.graphics.drawable.VectorDrawableCompat;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.support.v4.app.TaskStackBuilder;
|
||||
|
||||
import org.y20k.trackbook.MainActivity;
|
||||
import org.y20k.trackbook.R;
|
||||
import org.y20k.trackbook.TrackerService;
|
||||
import org.y20k.trackbook.core.Track;
|
||||
|
||||
import androidx.core.app.NotificationCompat;
|
||||
import androidx.core.app.TaskStackBuilder;
|
||||
import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
|
||||
|
||||
|
||||
/**
|
||||
* NotificationHelper class
|
||||
|
|
|
@ -18,8 +18,6 @@ package org.y20k.trackbook.helpers;
|
|||
|
||||
import android.content.Context;
|
||||
import android.os.Environment;
|
||||
import android.support.annotation.Nullable;
|
||||
import android.support.v4.os.EnvironmentCompat;
|
||||
import android.widget.Toast;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
@ -42,6 +40,9 @@ import java.util.Comparator;
|
|||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.os.EnvironmentCompat;
|
||||
|
||||
|
||||
/**
|
||||
* StorageHelper class
|
||||
|
|
|
@ -92,6 +92,7 @@ public interface TrackbookKeys {
|
|||
long FIVE_MINUTES_IN_NANOSECONDS = 5L * 60000000000L; // determines a stop over
|
||||
long TWO_MINUTES_IN_NANOSECONDS = 2L * 60000000000L; // defines an old location
|
||||
int MAXIMUM_TRACK_FILES = 25;
|
||||
int FIFTY_METER_RADIUS = 50;
|
||||
|
||||
/* FILE */
|
||||
String FILE_TYPE_GPX_EXTENSION = ".gpx";
|
||||
|
|
|
@ -18,11 +18,13 @@
|
|||
package org.y20k.trackbook.layout;
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.design.widget.CoordinatorLayout;
|
||||
import android.support.design.widget.Snackbar;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.View;
|
||||
|
||||
import com.google.android.material.snackbar.Snackbar;
|
||||
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||
|
||||
|
||||
/**
|
||||
* DodgeAbleLayoutBehavior class
|
||||
|
|
|
@ -22,7 +22,6 @@ package org.y20k.trackbook.layout;
|
|||
*/
|
||||
|
||||
import android.content.Context;
|
||||
import android.support.v4.view.ViewPager;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
|
@ -32,6 +31,8 @@ import org.y20k.trackbook.helpers.LogHelper;
|
|||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
|
||||
public class NonSwipeableViewPager extends ViewPager {
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -8,14 +8,14 @@
|
|||
tools:context="org.y20k.trackbook.MainActivity">
|
||||
|
||||
|
||||
<android.support.constraint.ConstraintLayout
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
|
||||
<!-- BUTTON MY LOCATION -->
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabLocationButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
|
||||
<!-- SAVE RESUME -->
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabSubMenuButtonSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -47,7 +47,7 @@
|
|||
app:layout_constraintStart_toStartOf="@+id/fabSubMenuButtonClear"
|
||||
app:srcCompat="@drawable/ic_save_white_24dp" />
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/fabSubMenuLabelSave"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -75,11 +75,11 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="@color/fab_button_card_text"
|
||||
android:textStyle="bold" />
|
||||
</android.support.v7.widget.CardView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<!-- BUTTON CLEAR -->
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabSubMenuButtonClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -94,7 +94,7 @@
|
|||
app:layout_constraintStart_toStartOf="@+id/fabSubMenuButtonResume"
|
||||
app:srcCompat="@drawable/ic_clear_white_24dp" />
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/fabSubMenuLabelClear"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -122,11 +122,11 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="@color/fab_button_card_text"
|
||||
android:textStyle="bold" />
|
||||
</android.support.v7.widget.CardView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<!-- BUTTON RESUME -->
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabSubMenuButtonResume"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -141,7 +141,7 @@
|
|||
app:layout_constraintStart_toStartOf="@+id/fabMainButton"
|
||||
app:srcCompat="@drawable/ic_fiber_manual_record_white_24dp" />
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/fabSubMenuLabelResume"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -168,11 +168,11 @@
|
|||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
||||
android:textColor="@color/fab_button_card_text"
|
||||
android:textStyle="bold" />
|
||||
</android.support.v7.widget.CardView>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
<!-- MAIN BUTTON -->
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fabMainButton"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -189,7 +189,7 @@
|
|||
|
||||
|
||||
<!-- BOTTOM NAVIGATION -->
|
||||
<android.support.design.widget.BottomNavigationView
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/navigation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -214,9 +214,9 @@
|
|||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.design.widget.CoordinatorLayout
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
|
@ -29,7 +29,7 @@
|
|||
</RelativeLayout>
|
||||
|
||||
<!-- BOTTOM SHEET -->
|
||||
<android.support.v4.widget.NestedScrollView
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:id="@+id/statistics_sheet"
|
||||
android:layout_width="@dimen/bottom_sheet_width"
|
||||
android:layout_height="match_parent"
|
||||
|
@ -37,7 +37,7 @@
|
|||
android:background="@color/statistic_sheet_background_collapsed"
|
||||
app:behavior_hideable="false"
|
||||
app:behavior_peekHeight="54dp"
|
||||
app:layout_behavior="android.support.design.widget.BottomSheetBehavior">
|
||||
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -48,6 +48,6 @@
|
|||
|
||||
</ScrollView>
|
||||
|
||||
</android.support.v4.widget.NestedScrollView>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</android.support.design.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/track_management_layout"
|
||||
android:layout_width="@dimen/bottom_sheet_width"
|
||||
|
@ -57,4 +57,4 @@
|
|||
app:srcCompat="@drawable/ic_delete_forever_24dp" />
|
||||
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/statistics_view"
|
||||
android:layout_width="match_parent"
|
||||
|
@ -7,13 +7,13 @@
|
|||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<android.support.constraint.Group
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/elevation_data"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="statistics_p_positive_elevation, statistics_data_positive_elevation, statistics_p_negative_elevation, statistics_data_negative_elevation, statistics_p_max_altitude, statistics_data_max_altitude, statistics_p_min_altitude, statistics_data_min_altitude" />
|
||||
|
||||
<android.support.constraint.Group
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/statistics_header"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -294,4 +294,4 @@
|
|||
app:layout_constraintStart_toEndOf="@+id/statistics_p_min_altitude"
|
||||
app:layout_constraintTop_toTopOf="@+id/statistics_p_min_altitude" />
|
||||
|
||||
</android.support.constraint.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
19
build.gradle
19
build.gradle
|
@ -6,7 +6,7 @@ buildscript {
|
|||
google()
|
||||
}
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.1.3'
|
||||
classpath 'com.android.tools.build:gradle:3.3.0-alpha08'
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
// in the individual module build.gradle files
|
||||
|
@ -20,16 +20,19 @@ allprojects {
|
|||
}
|
||||
project.ext {
|
||||
applicationId = 'org.y20k.trackbook'
|
||||
versionCode = 26
|
||||
versionName = '1.1.10'
|
||||
versionCode = 27
|
||||
versionName = '1.1.11'
|
||||
minSdkVersion = 22
|
||||
compileSdkVersion = 27
|
||||
compileSdkVersion = 28
|
||||
targetSdkVersion = 27
|
||||
buildToolsVersion = '27.0.3'
|
||||
supportLibraryVersion = '27.1.1'
|
||||
constraintLayoutVersion = '1.1.0-beta6'
|
||||
buildToolsVersion = '28.0.2'
|
||||
|
||||
osmdroidVersion = '6.0.1'
|
||||
constraintlayoutVersion = '1.1.3'
|
||||
materialVersion = "1.0.0-rc01"
|
||||
appcompatVersion = '1.0.0-rc02'
|
||||
cardviewVersion = '1.0.0-rc02'
|
||||
|
||||
osmdroidVersion = '6.0.2'
|
||||
gsonVersion = '2.8.5'
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,4 +15,6 @@
|
|||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# org.gradle.parallel=true
|
||||
android.enableJetifier=true
|
||||
android.useAndroidX=true
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
|||
#Wed Apr 04 15:52:45 CEST 2018
|
||||
#Wed Sep 05 10:45:03 CEST 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.9-all.zip
|
||||
|
|
Loading…
Reference in a new issue