From a69fc0610a7c40d20f9b8c60c5dda38bb1e4f61b Mon Sep 17 00:00:00 2001 From: Alkisum Date: Tue, 12 Feb 2019 06:14:46 +0100 Subject: [PATCH] Closes #48: - Dependencies updated - Migrated to AndroidX - Switched to Java 8 - Latest Material DateTime Picker library supported --- app/build.gradle | 28 +++++++++++-------- .../cloudrun/activities/AboutActivity.java | 5 ++-- .../activities/AddSessionActivity.java | 10 +++---- .../cloudrun/activities/HistoryActivity.java | 10 +++---- .../cloudrun/activities/MapActivity.java | 10 +++---- .../cloudrun/activities/MonitorActivity.java | 20 ++++++------- .../cloudrun/activities/RouteActivity.java | 10 +++---- .../activities/RouteListActivity.java | 10 +++---- .../cloudrun/activities/SessionActivity.java | 8 +++--- .../cloudrun/activities/SettingsActivity.java | 7 +++-- .../cloudrun/adapters/HistoryListAdapter.java | 6 ++-- .../cloudrun/adapters/RoutesListAdapter.java | 2 +- .../cloudrun/dialogs/AddMarkerDialog.java | 3 +- .../cloudrun/dialogs/AddRouteDialog.java | 3 +- .../cloudrun/dialogs/DistanceDialog.java | 5 ++-- .../cloudrun/dialogs/DurationDialog.java | 5 ++-- .../cloudrun/dialogs/EditMarkerDialog.java | 3 +- .../cloudrun/dialogs/EditRouteDialog.java | 3 +- .../cloudrun/location/LocationHelper.java | 7 +++-- .../location/LocationUpdatesService.java | 5 ++-- .../cloudrun/location/MarkerNotifier.java | 2 +- app/src/main/res/layout/activity_about.xml | 2 +- .../main/res/layout/activity_add_session.xml | 2 +- app/src/main/res/layout/activity_history.xml | 12 ++++---- app/src/main/res/layout/activity_map.xml | 2 +- app/src/main/res/layout/activity_monitor.xml | 10 +++---- app/src/main/res/layout/activity_route.xml | 2 +- .../main/res/layout/activity_route_list.xml | 12 ++++---- app/src/main/res/layout/activity_session.xml | 2 +- app/src/main/res/layout/activity_settings.xml | 2 +- app/src/main/res/layout/content_history.xml | 10 +++---- app/src/main/res/layout/content_routes.xml | 10 +++---- app/src/main/res/layout/list_item_history.xml | 2 +- app/src/main/res/layout/list_item_routes.xml | 2 +- 34 files changed, 123 insertions(+), 109 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 9a8423e..39df16b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -22,6 +22,10 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } greendao { @@ -30,22 +34,22 @@ greendao { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support:support-v13:28.0.0' - implementation 'com.android.support:design:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.google.android.gms:play-services-basement:16.1.0' + implementation 'androidx.appcompat:appcompat:1.1.0-alpha02' + implementation 'androidx.legacy:legacy-support-v13:1.0.0' + implementation 'com.google.android.material:material:1.1.0-alpha03' + implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3' + implementation 'com.google.android.gms:play-services-basement:16.2.0' implementation 'com.google.android.gms:play-services-location:16.0.0' implementation 'org.greenrobot:eventbus:3.1.1' implementation 'org.greenrobot:greendao:3.2.2' - implementation 'com.jakewharton:butterknife:8.8.1' - annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1' - debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2' - releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2' - testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2' + implementation 'com.jakewharton:butterknife:10.0.0' + annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.3' + releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3' + testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.3' implementation 'org.osmdroid:osmdroid-android:6.0.3' - implementation 'com.wdullaer:materialdatetimepicker:3.6.4' + implementation 'com.wdullaer:materialdatetimepicker:4.1.2' implementation 'com.google.code.gson:gson:2.8.5' - implementation 'com.github.nextcloud:android-library:1.2.1' + implementation 'com.github.nextcloud:android-library:1.3.2' implementation project(path: ':cloudlib') } diff --git a/app/src/main/java/com/alkisum/android/cloudrun/activities/AboutActivity.java b/app/src/main/java/com/alkisum/android/cloudrun/activities/AboutActivity.java index 1bb08e0..9cd8800 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/activities/AboutActivity.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/activities/AboutActivity.java @@ -5,8 +5,6 @@ import android.os.Bundle; import android.preference.Preference; import android.preference.PreferenceFragment; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import com.alkisum.android.cloudrun.BuildConfig; import com.alkisum.android.cloudrun.R; @@ -15,6 +13,9 @@ import java.util.Date; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + /** * Activity listing information about the application. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/activities/AddSessionActivity.java b/app/src/main/java/com/alkisum/android/cloudrun/activities/AddSessionActivity.java index ce3401c..7f3ff57 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/activities/AddSessionActivity.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/activities/AddSessionActivity.java @@ -1,8 +1,6 @@ package com.alkisum.android.cloudrun.activities; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -11,10 +9,10 @@ import android.widget.ListView; import com.alkisum.android.cloudrun.R; +import com.alkisum.android.cloudrun.adapters.AddSessionListAdapter; import com.alkisum.android.cloudrun.database.Db; import com.alkisum.android.cloudrun.dialogs.DistanceDialog; import com.alkisum.android.cloudrun.dialogs.DurationDialog; -import com.alkisum.android.cloudrun.adapters.AddSessionListAdapter; import com.alkisum.android.cloudrun.model.Session; import com.alkisum.android.cloudrun.model.SessionDao; import com.alkisum.android.cloudrun.utils.Format; @@ -23,6 +21,8 @@ import java.util.Calendar; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import butterknife.BindView; import butterknife.ButterKnife; @@ -159,7 +159,7 @@ private void showDatePickerDialog() { dateCalendar.get(Calendar.DAY_OF_MONTH) ); dpd.setThemeDark(true); - dpd.show(getFragmentManager(), TAG_DATE_PICKER_DIALOG); + dpd.show(getSupportFragmentManager(), TAG_DATE_PICKER_DIALOG); } /** @@ -175,7 +175,7 @@ private void showTimePickerDialog() { true ); tpd.setThemeDark(true); - tpd.show(getFragmentManager(), TAG_TIME_PICKER_DIALOG); + tpd.show(getSupportFragmentManager(), TAG_TIME_PICKER_DIALOG); } /** diff --git a/app/src/main/java/com/alkisum/android/cloudrun/activities/HistoryActivity.java b/app/src/main/java/com/alkisum/android/cloudrun/activities/HistoryActivity.java index 6cb6448..e6a016c 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/activities/HistoryActivity.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/activities/HistoryActivity.java @@ -3,11 +3,6 @@ import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -38,6 +33,8 @@ import com.alkisum.android.cloudrun.tasks.Restorer; import com.alkisum.android.cloudrun.utils.Deletables; import com.alkisum.android.cloudrun.utils.Sessions; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; import com.google.gson.Gson; import org.greenrobot.eventbus.EventBus; @@ -47,6 +44,9 @@ import java.util.List; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; diff --git a/app/src/main/java/com/alkisum/android/cloudrun/activities/MapActivity.java b/app/src/main/java/com/alkisum/android/cloudrun/activities/MapActivity.java index 3ce3d49..3f4a98a 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/activities/MapActivity.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/activities/MapActivity.java @@ -3,9 +3,6 @@ import android.annotation.SuppressLint; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.MotionEvent; @@ -13,8 +10,6 @@ import com.alkisum.android.cloudrun.BuildConfig; import com.alkisum.android.cloudrun.R; -import com.alkisum.android.cloudrun.utils.Markers; -import com.alkisum.android.cloudrun.utils.Sessions; import com.alkisum.android.cloudrun.events.CoordinateEvent; import com.alkisum.android.cloudrun.events.GpsStatusEvent; import com.alkisum.android.cloudrun.location.Coordinate; @@ -22,6 +17,8 @@ import com.alkisum.android.cloudrun.model.Marker; import com.alkisum.android.cloudrun.model.Session; import com.alkisum.android.cloudrun.ui.GpsStatus; +import com.alkisum.android.cloudrun.utils.Markers; +import com.alkisum.android.cloudrun.utils.Sessions; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; @@ -38,6 +35,9 @@ import java.util.ArrayList; import java.util.List; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/main/java/com/alkisum/android/cloudrun/activities/MonitorActivity.java b/app/src/main/java/com/alkisum/android/cloudrun/activities/MonitorActivity.java index 8c6c9b8..6b1f3cb 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/activities/MonitorActivity.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/activities/MonitorActivity.java @@ -9,15 +9,6 @@ import android.os.Bundle; import android.os.Handler; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.design.widget.NavigationView; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.GravityCompat; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.ActionBarDrawerToggle; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -26,7 +17,6 @@ import android.widget.TextView; import com.alkisum.android.cloudrun.R; -import com.alkisum.android.cloudrun.tasks.SessionRecorder; import com.alkisum.android.cloudrun.dialogs.ActivateRoutesDialog; import com.alkisum.android.cloudrun.dialogs.ErrorDialog; import com.alkisum.android.cloudrun.events.CoordinateEvent; @@ -38,10 +28,13 @@ import com.alkisum.android.cloudrun.location.Coordinate; import com.alkisum.android.cloudrun.location.LocationHelper; import com.alkisum.android.cloudrun.location.LocationUtils; +import com.alkisum.android.cloudrun.tasks.SessionRecorder; import com.alkisum.android.cloudrun.ui.GpsStatus; import com.alkisum.android.cloudrun.ui.Tile; import com.alkisum.android.cloudrun.utils.Format; import com.alkisum.android.cloudrun.utils.Pref; +import com.google.android.material.navigation.NavigationView; +import com.google.android.material.snackbar.Snackbar; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; @@ -49,6 +42,13 @@ import java.util.ArrayList; import java.util.List; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBarDrawerToggle; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; +import androidx.core.view.GravityCompat; +import androidx.drawerlayout.widget.DrawerLayout; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; diff --git a/app/src/main/java/com/alkisum/android/cloudrun/activities/RouteActivity.java b/app/src/main/java/com/alkisum/android/cloudrun/activities/RouteActivity.java index 1b0e71a..3726c23 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/activities/RouteActivity.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/activities/RouteActivity.java @@ -6,11 +6,6 @@ import android.graphics.drawable.Drawable; import android.location.Location; import android.os.Bundle; -import android.support.design.widget.Snackbar; -import android.support.v4.app.ActivityCompat; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -46,6 +41,7 @@ import com.google.android.gms.location.FusedLocationProviderClient; import com.google.android.gms.location.LocationServices; import com.google.android.gms.tasks.OnSuccessListener; +import com.google.android.material.snackbar.Snackbar; import com.google.gson.Gson; import org.greenrobot.eventbus.EventBus; @@ -67,6 +63,10 @@ import java.util.ArrayList; import java.util.List; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/main/java/com/alkisum/android/cloudrun/activities/RouteListActivity.java b/app/src/main/java/com/alkisum/android/cloudrun/activities/RouteListActivity.java index bd1b4e7..7223b28 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/activities/RouteListActivity.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/activities/RouteListActivity.java @@ -3,11 +3,6 @@ import android.annotation.SuppressLint; import android.content.Intent; import android.os.Bundle; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -40,6 +35,8 @@ import com.alkisum.android.cloudrun.tasks.Restorer; import com.alkisum.android.cloudrun.utils.Deletables; import com.alkisum.android.cloudrun.utils.Routes; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; import com.google.gson.Gson; import org.greenrobot.eventbus.EventBus; @@ -49,6 +46,9 @@ import java.util.List; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; diff --git a/app/src/main/java/com/alkisum/android/cloudrun/activities/SessionActivity.java b/app/src/main/java/com/alkisum/android/cloudrun/activities/SessionActivity.java index 03be62b..b6a1adf 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/activities/SessionActivity.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/activities/SessionActivity.java @@ -2,10 +2,6 @@ import android.content.Intent; import android.os.Bundle; -import android.support.design.widget.Snackbar; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import android.view.Menu; import android.view.MenuInflater; import android.view.MenuItem; @@ -31,6 +27,7 @@ import com.alkisum.android.cloudrun.tasks.Deleter; import com.alkisum.android.cloudrun.utils.Format; import com.alkisum.android.cloudrun.utils.Sessions; +import com.google.android.material.snackbar.Snackbar; import com.google.gson.ExclusionStrategy; import com.google.gson.FieldAttributes; import com.google.gson.Gson; @@ -52,6 +49,9 @@ import java.util.ArrayList; import java.util.List; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; +import androidx.core.content.ContextCompat; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/main/java/com/alkisum/android/cloudrun/activities/SettingsActivity.java b/app/src/main/java/com/alkisum/android/cloudrun/activities/SettingsActivity.java index eb6a631..1e730f6 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/activities/SettingsActivity.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/activities/SettingsActivity.java @@ -6,16 +6,17 @@ import android.preference.EditTextPreference; import android.preference.Preference; import android.preference.PreferenceFragment; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; import com.alkisum.android.cloudlib.utils.CloudPref; import com.alkisum.android.cloudrun.R; -import com.alkisum.android.cloudrun.utils.Markers; import com.alkisum.android.cloudrun.location.LocationHelper; import com.alkisum.android.cloudrun.ui.NumberPickerPreference; +import com.alkisum.android.cloudrun.utils.Markers; import com.alkisum.android.cloudrun.utils.Pref; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + /** * Activity showing the application settings. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/adapters/HistoryListAdapter.java b/app/src/main/java/com/alkisum/android/cloudrun/adapters/HistoryListAdapter.java index b0ffa19..796cf53 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/adapters/HistoryListAdapter.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/adapters/HistoryListAdapter.java @@ -2,9 +2,6 @@ import android.content.Context; import android.content.res.ColorStateList; -import android.support.v4.content.ContextCompat; -import android.support.v4.widget.CompoundButtonCompat; -import android.support.v7.widget.AppCompatCheckBox; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -19,6 +16,9 @@ import java.util.Date; import java.util.List; +import androidx.appcompat.widget.AppCompatCheckBox; +import androidx.core.content.ContextCompat; +import androidx.core.widget.CompoundButtonCompat; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/main/java/com/alkisum/android/cloudrun/adapters/RoutesListAdapter.java b/app/src/main/java/com/alkisum/android/cloudrun/adapters/RoutesListAdapter.java index 3755403..2daddc6 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/adapters/RoutesListAdapter.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/adapters/RoutesListAdapter.java @@ -1,7 +1,6 @@ package com.alkisum.android.cloudrun.adapters; import android.content.Context; -import android.support.v7.widget.AppCompatCheckBox; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -13,6 +12,7 @@ import java.util.List; +import androidx.appcompat.widget.AppCompatCheckBox; import butterknife.BindView; import butterknife.ButterKnife; diff --git a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/AddMarkerDialog.java b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/AddMarkerDialog.java index 94723ed..d977455 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/AddMarkerDialog.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/AddMarkerDialog.java @@ -2,7 +2,6 @@ import android.content.Context; import android.content.DialogInterface; -import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.EditText; @@ -12,6 +11,8 @@ import org.greenrobot.eventbus.EventBus; +import androidx.appcompat.app.AlertDialog; + /** * Dialog to add a new marker. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/AddRouteDialog.java b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/AddRouteDialog.java index 9d6691d..5821b30 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/AddRouteDialog.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/AddRouteDialog.java @@ -2,7 +2,6 @@ import android.content.Context; import android.content.DialogInterface; -import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.EditText; @@ -12,6 +11,8 @@ import org.greenrobot.eventbus.EventBus; +import androidx.appcompat.app.AlertDialog; + /** * Dialog to add a new route. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/DistanceDialog.java b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/DistanceDialog.java index 1670dac..ab2d9e1 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/DistanceDialog.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/DistanceDialog.java @@ -5,13 +5,14 @@ import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; import android.view.View; import android.widget.NumberPicker; import com.alkisum.android.cloudrun.R; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; + /** * Dialog to set the distance. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/DurationDialog.java b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/DurationDialog.java index 1290bd3..d56cf1c 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/DurationDialog.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/DurationDialog.java @@ -5,13 +5,14 @@ import android.content.Context; import android.content.DialogInterface; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; import android.view.View; import android.widget.NumberPicker; import com.alkisum.android.cloudrun.R; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; + /** * Dialog to set the duration. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/EditMarkerDialog.java b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/EditMarkerDialog.java index d211515..1a01866 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/EditMarkerDialog.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/EditMarkerDialog.java @@ -2,7 +2,6 @@ import android.content.Context; import android.content.DialogInterface; -import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.EditText; @@ -13,6 +12,8 @@ import org.greenrobot.eventbus.EventBus; +import androidx.appcompat.app.AlertDialog; + /** * Dialog to edit an existing marker. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/EditRouteDialog.java b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/EditRouteDialog.java index 5c9b4fc..ac9a364 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/dialogs/EditRouteDialog.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/dialogs/EditRouteDialog.java @@ -2,7 +2,6 @@ import android.content.Context; import android.content.DialogInterface; -import android.support.v7.app.AlertDialog; import android.view.View; import android.widget.EditText; @@ -13,6 +12,8 @@ import org.greenrobot.eventbus.EventBus; +import androidx.appcompat.app.AlertDialog; + /** * Dialog to edit an existing route. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/location/LocationHelper.java b/app/src/main/java/com/alkisum/android/cloudrun/location/LocationHelper.java index 0b9fb0a..142388d 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/location/LocationHelper.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/location/LocationHelper.java @@ -14,12 +14,9 @@ import android.os.Looper; import android.preference.PreferenceManager; import android.provider.Settings; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; import android.util.Log; import com.alkisum.android.cloudrun.R; -import com.alkisum.android.cloudrun.utils.Markers; import com.alkisum.android.cloudrun.dialogs.ErrorDialog; import com.alkisum.android.cloudrun.events.CoordinateEvent; import com.alkisum.android.cloudrun.events.DistanceEvent; @@ -27,6 +24,7 @@ import com.alkisum.android.cloudrun.events.PaceEvent; import com.alkisum.android.cloudrun.events.SpeedEvent; import com.alkisum.android.cloudrun.model.Marker; +import com.alkisum.android.cloudrun.utils.Markers; import com.alkisum.android.cloudrun.utils.Pref; import com.google.android.gms.common.api.ApiException; import com.google.android.gms.common.api.ResolvableApiException; @@ -50,6 +48,9 @@ import java.util.Queue; import java.util.Set; +import androidx.annotation.NonNull; +import androidx.core.app.ActivityCompat; + /** * Helper class for location operations. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/location/LocationUpdatesService.java b/app/src/main/java/com/alkisum/android/cloudrun/location/LocationUpdatesService.java index b50b378..9785710 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/location/LocationUpdatesService.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/location/LocationUpdatesService.java @@ -14,18 +14,19 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.IBinder; -import android.support.v4.app.NotificationCompat; import com.alkisum.android.cloudrun.R; import com.alkisum.android.cloudrun.activities.MonitorActivity; -import com.alkisum.android.cloudrun.utils.Sessions; import com.alkisum.android.cloudrun.events.SessionActionEvent; import com.alkisum.android.cloudrun.model.Session; import com.alkisum.android.cloudrun.utils.Format; +import com.alkisum.android.cloudrun.utils.Sessions; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; +import androidx.core.app.NotificationCompat; + /** * Bound and started service that can be promoted to a foreground service. * diff --git a/app/src/main/java/com/alkisum/android/cloudrun/location/MarkerNotifier.java b/app/src/main/java/com/alkisum/android/cloudrun/location/MarkerNotifier.java index a26fd84..3a85f93 100644 --- a/app/src/main/java/com/alkisum/android/cloudrun/location/MarkerNotifier.java +++ b/app/src/main/java/com/alkisum/android/cloudrun/location/MarkerNotifier.java @@ -7,7 +7,7 @@ import android.content.Context; import android.content.Intent; import android.os.Build; -import android.support.v4.app.NotificationCompat; +import androidx.core.app.NotificationCompat; import com.alkisum.android.cloudrun.R; import com.alkisum.android.cloudrun.activities.MapActivity; diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 370f9c0..fd16ccd 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -6,7 +6,7 @@ android:orientation="vertical" tools:context=".activities.AboutActivity"> - diff --git a/app/src/main/res/layout/activity_add_session.xml b/app/src/main/res/layout/activity_add_session.xml index de959fe..291f94e 100644 --- a/app/src/main/res/layout/activity_add_session.xml +++ b/app/src/main/res/layout/activity_add_session.xml @@ -5,7 +5,7 @@ android:layout_height="match_parent" tools:context=".activities.AddSessionActivity"> - diff --git a/app/src/main/res/layout/activity_history.xml b/app/src/main/res/layout/activity_history.xml index dfe5421..81aa153 100644 --- a/app/src/main/res/layout/activity_history.xml +++ b/app/src/main/res/layout/activity_history.xml @@ -7,25 +7,25 @@ xmlns:app="http://schemas.android.com/apk/res-auto" tools:context=".activities.HistoryActivity"> - - - - + - - + diff --git a/app/src/main/res/layout/activity_map.xml b/app/src/main/res/layout/activity_map.xml index 43cbf83..5ddf684 100644 --- a/app/src/main/res/layout/activity_map.xml +++ b/app/src/main/res/layout/activity_map.xml @@ -12,7 +12,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"/> - diff --git a/app/src/main/res/layout/activity_monitor.xml b/app/src/main/res/layout/activity_monitor.xml index 2e32bcf..79a5ae7 100644 --- a/app/src/main/res/layout/activity_monitor.xml +++ b/app/src/main/res/layout/activity_monitor.xml @@ -1,5 +1,5 @@ - - @@ -22,7 +22,7 @@ android:layout_height="wrap_content" android:layout_gravity="end"/> - + - - + diff --git a/app/src/main/res/layout/activity_route.xml b/app/src/main/res/layout/activity_route.xml index c442e6b..b4463e7 100644 --- a/app/src/main/res/layout/activity_route.xml +++ b/app/src/main/res/layout/activity_route.xml @@ -12,7 +12,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"/> - diff --git a/app/src/main/res/layout/activity_route_list.xml b/app/src/main/res/layout/activity_route_list.xml index 2aa1012..d9c270b 100644 --- a/app/src/main/res/layout/activity_route_list.xml +++ b/app/src/main/res/layout/activity_route_list.xml @@ -7,25 +7,25 @@ android:layout_height="match_parent" tools:context=".activities.RouteListActivity"> - - - - + - - + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_session.xml b/app/src/main/res/layout/activity_session.xml index 990e76a..295bcd1 100644 --- a/app/src/main/res/layout/activity_session.xml +++ b/app/src/main/res/layout/activity_session.xml @@ -8,7 +8,7 @@ android:background="@color/bgOut" tools:context=".activities.SessionActivity"> - diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index c8effc4..5c03d9f 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -6,7 +6,7 @@ android:orientation="vertical" tools:context=".activities.SettingsActivity"> - diff --git a/app/src/main/res/layout/content_history.xml b/app/src/main/res/layout/content_history.xml index 08b93ac..8326acf 100644 --- a/app/src/main/res/layout/content_history.xml +++ b/app/src/main/res/layout/content_history.xml @@ -1,5 +1,5 @@ - - - - + - + diff --git a/app/src/main/res/layout/content_routes.xml b/app/src/main/res/layout/content_routes.xml index 2859fb9..be2df55 100644 --- a/app/src/main/res/layout/content_routes.xml +++ b/app/src/main/res/layout/content_routes.xml @@ -1,5 +1,5 @@ - - - - + - + diff --git a/app/src/main/res/layout/list_item_history.xml b/app/src/main/res/layout/list_item_history.xml index 4d74536..db6ff22 100644 --- a/app/src/main/res/layout/list_item_history.xml +++ b/app/src/main/res/layout/list_item_history.xml @@ -22,7 +22,7 @@ android:textColor="@color/accent" android:textStyle="bold"/> - -