From: Damyan Ivanov Date: Mon, 18 Feb 2019 21:16:53 +0000 (+0200) Subject: migrate to AndroidX X-Git-Tag: v0.7~65 X-Git-Url: https://git.ktnx.net/?a=commitdiff_plain;h=09e26d2279484b4dfe0de218b05f075362fff4b5;p=mobile-ledger.git migrate to AndroidX --- diff --git a/app/build.gradle b/app/build.gradle index a303f043..b7935865 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -25,7 +25,7 @@ android { targetSdkVersion 28 versionCode 16 versionName '0.6' - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" } buildTypes { release { @@ -49,14 +49,14 @@ android { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'com.android.support:appcompat-v7:28.0.0' - implementation 'com.android.support:support-v4:28.0.0' - implementation 'com.android.support:design:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'android.arch.lifecycle:extensions:1.1.1' - implementation 'com.android.support:recyclerview-v7:28.0.0' + implementation 'androidx.appcompat:appcompat:1.0.0-beta01' + implementation 'androidx.legacy:legacy-support-v4:1.0.0-beta01' + implementation 'com.google.android.material:material:1.0.0-beta01' + implementation 'androidx.constraintlayout:constraintlayout:1.1.2' + implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0-beta01' + implementation 'androidx.recyclerview:recyclerview:1.0.0-beta01' testImplementation 'junit:junit:4.12' - androidTestImplementation 'com.android.support.test:runner:1.0.2' - androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' + androidTestImplementation 'androidx.test:runner:1.1.0-alpha4' + androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4' implementation 'org.jetbrains:annotations:15.0' } diff --git a/app/src/androidTest/java/net/ktnx/mobileledger/ExampleInstrumentedTest.java b/app/src/androidTest/java/net/ktnx/mobileledger/ExampleInstrumentedTest.java index 5d36047a..5ee66ee9 100644 --- a/app/src/androidTest/java/net/ktnx/mobileledger/ExampleInstrumentedTest.java +++ b/app/src/androidTest/java/net/ktnx/mobileledger/ExampleInstrumentedTest.java @@ -18,12 +18,13 @@ package net.ktnx.mobileledger; import android.content.Context; -import android.support.test.InstrumentationRegistry; -import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; +import androidx.test.InstrumentationRegistry; +import androidx.test.runner.AndroidJUnit4; + import static org.junit.Assert.assertEquals; /** diff --git a/app/src/main/java/net/ktnx/mobileledger/model/LedgerAccount.java b/app/src/main/java/net/ktnx/mobileledger/model/LedgerAccount.java index 51fdd04e..6f3b21ac 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/LedgerAccount.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/LedgerAccount.java @@ -17,13 +17,13 @@ package net.ktnx.mobileledger.model; -import android.support.annotation.NonNull; - import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; +import androidx.annotation.NonNull; + public class LedgerAccount { private String name; private String shortName; diff --git a/app/src/main/java/net/ktnx/mobileledger/model/LedgerAmount.java b/app/src/main/java/net/ktnx/mobileledger/model/LedgerAmount.java index 8b2d9e7a..c7f1318c 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/LedgerAmount.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/LedgerAmount.java @@ -18,7 +18,7 @@ package net.ktnx.mobileledger.model; import android.annotation.SuppressLint; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; public class LedgerAmount { private String currency; diff --git a/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java b/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java index 83b349e2..2e5e9c49 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/LedgerTransactionAccount.java @@ -17,7 +17,7 @@ package net.ktnx.mobileledger.model; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; public class LedgerTransactionAccount { private String accountName; diff --git a/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java b/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java index ca777f66..75cae3be 100644 --- a/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java +++ b/app/src/main/java/net/ktnx/mobileledger/model/TransactionListItem.java @@ -17,10 +17,10 @@ package net.ktnx.mobileledger.model; -import android.support.annotation.NonNull; - import java.util.Date; +import androidx.annotation.NonNull; + public class TransactionListItem { private Type type; private Date date; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/CrashReportDialogFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/CrashReportDialogFragment.java index 08756261..cc426863 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/CrashReportDialogFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/CrashReportDialogFragment.java @@ -5,9 +5,9 @@ import android.app.Dialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; import android.view.LayoutInflater; import android.view.View; import android.widget.ScrollView; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java index a59d6481..abec8d6d 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/DatePickerFragment.java @@ -19,8 +19,8 @@ package net.ktnx.mobileledger.ui; import android.app.Dialog; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v7.app.AppCompatDialogFragment; +import androidx.annotation.NonNull; +import androidx.appcompat.app.AppCompatDialogFragment; import android.widget.CalendarView; import android.widget.TextView; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/MobileLedgerListFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/MobileLedgerListFragment.java index 6cfa52b5..85593a21 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/MobileLedgerListFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/MobileLedgerListFragment.java @@ -17,9 +17,9 @@ package net.ktnx.mobileledger.ui; -import android.support.v4.app.Fragment; -import android.support.v4.widget.SwipeRefreshLayout; -import android.support.v7.widget.RecyclerView; +import androidx.fragment.app.Fragment; +import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; +import androidx.recyclerview.widget.RecyclerView; import net.ktnx.mobileledger.ui.activity.MainActivity; import net.ktnx.mobileledger.ui.transaction_list.TransactionListAdapter; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/RecyclerItemListener.java b/app/src/main/java/net/ktnx/mobileledger/ui/RecyclerItemListener.java index 32afa3fe..e83cf3dc 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/RecyclerItemListener.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/RecyclerItemListener.java @@ -18,9 +18,9 @@ package net.ktnx.mobileledger.ui; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.RecyclerView.OnItemTouchListener; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView.OnItemTouchListener; import android.view.GestureDetector; import android.view.MotionEvent; import android.view.View; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java index 52b27229..086f0cb1 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryAdapter.java @@ -20,8 +20,6 @@ package net.ktnx.mobileledger.ui.account_summary; import android.content.Context; import android.content.res.Resources; import android.graphics.Typeface; -import android.support.annotation.NonNull; -import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -36,6 +34,9 @@ import net.ktnx.mobileledger.utils.Colors; import java.util.List; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + class AccountSummaryAdapter extends RecyclerView.Adapter { private boolean selectionActive; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java index 04cde356..dd4e4d49 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryFragment.java @@ -21,11 +21,6 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; @@ -34,6 +29,8 @@ import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; +import com.google.android.material.floatingactionbutton.FloatingActionButton; + import net.ktnx.mobileledger.R; import net.ktnx.mobileledger.model.Data; import net.ktnx.mobileledger.model.LedgerAccount; @@ -45,6 +42,11 @@ import net.ktnx.mobileledger.utils.Colors; import java.util.List; import java.util.Observer; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + import static net.ktnx.mobileledger.ui.activity.SettingsActivity.PREF_KEY_SHOW_ONLY_STARRED_ACCOUNTS; public class AccountSummaryFragment extends MobileLedgerListFragment { @@ -101,7 +103,7 @@ public class AccountSummaryFragment extends MobileLedgerListFragment { root = mActivity.findViewById(R.id.account_root); LinearLayoutManager llm = new LinearLayoutManager(mActivity); - llm.setOrientation(LinearLayoutManager.VERTICAL); + llm.setOrientation(RecyclerView.VERTICAL); root.setLayoutManager(llm); root.setAdapter(modelAdapter); diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java index 904b6747..ad250f97 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/account_summary/AccountSummaryViewModel.java @@ -17,7 +17,7 @@ package net.ktnx.mobileledger.ui.account_summary; -import android.arch.lifecycle.ViewModel; +import androidx.lifecycle.ViewModel; import android.content.Context; import android.util.Log; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/AppCompatPreferenceActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/AppCompatPreferenceActivity.java index 65274dfb..ef1a5027 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/AppCompatPreferenceActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/AppCompatPreferenceActivity.java @@ -20,12 +20,12 @@ package net.ktnx.mobileledger.ui.activity; import android.content.res.Configuration; import android.os.Bundle; import android.preference.PreferenceActivity; -import android.support.annotation.LayoutRes; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v7.app.ActionBar; -import android.support.v7.app.AppCompatDelegate; -import android.support.v7.widget.Toolbar; +import androidx.annotation.LayoutRes; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.app.AppCompatDelegate; +import androidx.appcompat.widget.Toolbar; import android.view.MenuInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/CrashReportingActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/CrashReportingActivity.java index 72dec223..911d2cec 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/CrashReportingActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/CrashReportingActivity.java @@ -1,8 +1,8 @@ package net.ktnx.mobileledger.ui.activity; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; import android.util.Log; import net.ktnx.mobileledger.ui.CrashReportDialogFragment; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java index 9cb045d7..15e4bef5 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/MainActivity.java @@ -23,15 +23,15 @@ import android.content.res.ColorStateList; import android.graphics.Color; import android.os.Build; import android.os.Bundle; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; -import android.support.v4.view.GravityCompat; -import android.support.v4.view.ViewPager; -import android.support.v4.widget.DrawerLayout; -import android.support.v7.app.ActionBarDrawerToggle; -import android.support.v7.widget.Toolbar; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; +import androidx.core.view.GravityCompat; +import androidx.viewpager.widget.ViewPager; +import androidx.drawerlayout.widget.DrawerLayout; +import androidx.appcompat.app.ActionBarDrawerToggle; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.View; import android.widget.LinearLayout; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java index 66c66da1..79475329 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/NewTransactionActivity.java @@ -21,11 +21,11 @@ import android.annotation.SuppressLint; import android.database.Cursor; import android.os.AsyncTask; import android.os.Bundle; -import android.support.design.widget.BaseTransientBottomBar; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.v4.app.DialogFragment; -import android.support.v7.widget.Toolbar; +import com.google.android.material.snackbar.BaseTransientBottomBar; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.InputType; import android.text.TextWatcher; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileDetailActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileDetailActivity.java index ccdad2c7..fa55b878 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileDetailActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileDetailActivity.java @@ -19,10 +19,10 @@ package net.ktnx.mobileledger.ui.activity; import android.content.Intent; import android.os.Bundle; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.Snackbar; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.Toolbar; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.snackbar.Snackbar; +import androidx.appcompat.app.ActionBar; +import androidx.appcompat.widget.Toolbar; import android.util.Log; import android.view.Menu; import android.view.MenuItem; @@ -31,8 +31,6 @@ import android.view.View; import net.ktnx.mobileledger.R; import net.ktnx.mobileledger.model.Data; import net.ktnx.mobileledger.model.MobileLedgerProfile; -import net.ktnx.mobileledger.ui.activity.CrashReportingActivity; -import net.ktnx.mobileledger.ui.activity.ProfileListActivity; import net.ktnx.mobileledger.ui.profiles.ProfileDetailFragment; /** diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileListActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileListActivity.java index 3d5fef80..2fde3640 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileListActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/ProfileListActivity.java @@ -21,12 +21,12 @@ import android.content.Context; import android.content.Intent; import android.graphics.Color; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v7.app.ActionBar; -import android.support.v7.widget.DividerItemDecoration; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.Toolbar; -import android.support.v7.widget.helper.ItemTouchHelper; +import androidx.annotation.NonNull; +import androidx.appcompat.app.ActionBar; +import androidx.recyclerview.widget.DividerItemDecoration; +import androidx.recyclerview.widget.RecyclerView; +import androidx.appcompat.widget.Toolbar; +import androidx.recyclerview.widget.ItemTouchHelper; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/activity/SettingsActivity.java b/app/src/main/java/net/ktnx/mobileledger/ui/activity/SettingsActivity.java index 3d50a606..914e161a 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/activity/SettingsActivity.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/activity/SettingsActivity.java @@ -32,8 +32,8 @@ import android.preference.PreferenceActivity; import android.preference.PreferenceFragment; import android.preference.PreferenceManager; import android.preference.RingtonePreference; -import android.support.v4.app.NavUtils; -import android.support.v7.app.ActionBar; +import androidx.core.app.NavUtils; +import androidx.appcompat.app.ActionBar; import android.text.TextUtils; import android.view.MenuItem; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java index a4dd025c..6d26e4ba 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/profiles/ProfileDetailFragment.java @@ -21,13 +21,13 @@ import android.app.Activity; import android.content.Context; import android.os.Build; import android.os.Bundle; -import android.support.annotation.ColorInt; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.CollapsingToolbarLayout; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.TextInputLayout; -import android.support.v4.app.Fragment; +import androidx.annotation.ColorInt; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.appbar.CollapsingToolbarLayout; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.textfield.TextInputLayout; +import androidx.fragment.app.Fragment; import android.text.Editable; import android.text.TextWatcher; import android.util.Log; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java index 361458e4..4f91dd61 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListAdapter.java @@ -21,9 +21,9 @@ import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.graphics.Typeface; import android.os.AsyncTask; -import android.support.annotation.NonNull; -import android.support.v7.widget.AppCompatTextView; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.appcompat.widget.AppCompatTextView; +import androidx.recyclerview.widget.RecyclerView; import android.text.Spannable; import android.text.SpannableString; import android.text.style.StyleSpan; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListFragment.java b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListFragment.java index 62c4496c..82082a90 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListFragment.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListFragment.java @@ -20,11 +20,11 @@ package net.ktnx.mobileledger.ui.transaction_list; import android.content.Context; import android.database.MatrixCursor; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.Menu; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListViewModel.java b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListViewModel.java index 6896facb..7bc1a866 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListViewModel.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionListViewModel.java @@ -17,7 +17,7 @@ package net.ktnx.mobileledger.ui.transaction_list; -import android.arch.lifecycle.ViewModel; +import androidx.lifecycle.ViewModel; import android.os.AsyncTask; import net.ktnx.mobileledger.async.UpdateTransactionsTask; diff --git a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java index 9249276f..c6331a09 100644 --- a/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java +++ b/app/src/main/java/net/ktnx/mobileledger/ui/transaction_list/TransactionRowHolder.java @@ -17,10 +17,10 @@ package net.ktnx.mobileledger.ui.transaction_list; -import android.support.annotation.NonNull; -import android.support.constraint.ConstraintLayout; -import android.support.v7.widget.CardView; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.constraintlayout.widget.ConstraintLayout; +import androidx.cardview.widget.CardView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.LinearLayout; import android.widget.TextView; diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java b/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java index 40e953b1..7b8352ef 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/Colors.java @@ -2,8 +2,8 @@ package net.ktnx.mobileledger.utils; import android.app.Activity; import android.content.res.Resources; -import android.support.annotation.ColorInt; -import android.support.annotation.ColorLong; +import androidx.annotation.ColorInt; +import androidx.annotation.ColorLong; import android.util.Log; import android.util.TypedValue; diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/ObservableAtomicInteger.java b/app/src/main/java/net/ktnx/mobileledger/utils/ObservableAtomicInteger.java index 7dd94e15..4da29297 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/ObservableAtomicInteger.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/ObservableAtomicInteger.java @@ -18,13 +18,14 @@ package net.ktnx.mobileledger.utils; import android.os.Build; -import android.support.annotation.RequiresApi; import java.util.Observable; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.IntBinaryOperator; import java.util.function.IntUnaryOperator; +import androidx.annotation.RequiresApi; + public class ObservableAtomicInteger extends Observable { private AtomicInteger holder; ObservableAtomicInteger() { diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/ObservableList.java b/app/src/main/java/net/ktnx/mobileledger/utils/ObservableList.java index 111c0e38..e74271af 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/ObservableList.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/ObservableList.java @@ -18,9 +18,9 @@ package net.ktnx.mobileledger.utils; import android.os.Build; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; import android.util.Log; import java.util.Collection; diff --git a/app/src/main/java/net/ktnx/mobileledger/utils/UrlEncodedFormData.java b/app/src/main/java/net/ktnx/mobileledger/utils/UrlEncodedFormData.java index f89c536f..f010e4c1 100644 --- a/app/src/main/java/net/ktnx/mobileledger/utils/UrlEncodedFormData.java +++ b/app/src/main/java/net/ktnx/mobileledger/utils/UrlEncodedFormData.java @@ -17,7 +17,7 @@ package net.ktnx.mobileledger.utils; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.io.UnsupportedEncodingException; import java.net.URLEncoder; diff --git a/app/src/main/res/layout-w900dp/profile_list.xml b/app/src/main/res/layout-w900dp/profile_list.xml index d92b8cb0..3701f3ad 100644 --- a/app/src/main/res/layout-w900dp/profile_list.xml +++ b/app/src/main/res/layout-w900dp/profile_list.xml @@ -35,7 +35,7 @@ --> - - - - - - - + + + \ No newline at end of file diff --git a/app/src/main/res/layout/account_summary_row.xml b/app/src/main/res/layout/account_summary_row.xml index 3b2525b9..ff5a5ec1 100644 --- a/app/src/main/res/layout/account_summary_row.xml +++ b/app/src/main/res/layout/account_summary_row.xml @@ -18,7 +18,7 @@ ~ along with MoLe. If not, see . --> - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 9c0fb62b..8a380b0e 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -23,29 +23,29 @@ android:theme="@style/AppTheme.AppBarOverlay" tools:context=".ui.activity.MainActivity"> - - - - - - - + - + - + - - - + - + - + diff --git a/app/src/main/res/layout/activity_new_transaction.xml b/app/src/main/res/layout/activity_new_transaction.xml index b17bc1f7..51437cc4 100644 --- a/app/src/main/res/layout/activity_new_transaction.xml +++ b/app/src/main/res/layout/activity_new_transaction.xml @@ -15,30 +15,30 @@ ~ along with MoLe. If not, see . --> - - - - + - @@ -52,7 +52,7 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" /> - - + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_profile_detail.xml b/app/src/main/res/layout/activity_profile_detail.xml index bc5bf973..79ab8227 100644 --- a/app/src/main/res/layout/activity_profile_detail.xml +++ b/app/src/main/res/layout/activity_profile_detail.xml @@ -16,7 +16,7 @@ ~ along with MoLe. If not, see . --> - - - - - + - + - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/activity_profile_list.xml b/app/src/main/res/layout/activity_profile_list.xml index d0f0d700..599f59bf 100644 --- a/app/src/main/res/layout/activity_profile_list.xml +++ b/app/src/main/res/layout/activity_profile_list.xml @@ -15,7 +15,7 @@ ~ along with MoLe. If not, see . --> - - - - - + - + - - + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/content_new_transaction.xml b/app/src/main/res/layout/content_new_transaction.xml index 028ddcd3..51efd199 100644 --- a/app/src/main/res/layout/content_new_transaction.xml +++ b/app/src/main/res/layout/content_new_transaction.xml @@ -16,7 +16,7 @@ ~ along with MoLe. If not, see . --> - - @@ -83,7 +83,7 @@ app:layout_constraintHorizontal_weight="30" app:layout_constraintStart_toEndOf="@+id/new_transaction_date" app:layout_constraintTop_toTopOf="parent" /> - + - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/no_profiles.xml b/app/src/main/res/layout/no_profiles.xml index ddced2ec..97b47726 100644 --- a/app/src/main/res/layout/no_profiles.xml +++ b/app/src/main/res/layout/no_profiles.xml @@ -15,7 +15,7 @@ ~ along with MoLe. If not, see . --> - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/profile_detail.xml b/app/src/main/res/layout/profile_detail.xml index b69e518a..0538f3f5 100644 --- a/app/src/main/res/layout/profile_detail.xml +++ b/app/src/main/res/layout/profile_detail.xml @@ -26,29 +26,29 @@ android:textIsSelectable="true" tools:context=".ui.profiles.ProfileDetailFragment"> - - - + - - - + - - - + - - - + . --> -. --> - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/transaction_list_fragment.xml b/app/src/main/res/layout/transaction_list_fragment.xml index 84c29bcf..37e98b6e 100644 --- a/app/src/main/res/layout/transaction_list_fragment.xml +++ b/app/src/main/res/layout/transaction_list_fragment.xml @@ -15,7 +15,7 @@ ~ along with MoLe. If not, see . --> - - - - + - + diff --git a/app/src/main/res/layout/transaction_list_row.xml b/app/src/main/res/layout/transaction_list_row.xml index 05128852..6fd70e34 100644 --- a/app/src/main/res/layout/transaction_list_row.xml +++ b/app/src/main/res/layout/transaction_list_row.xml @@ -17,13 +17,13 @@ ~ along with MoLe. If not, see . --> - - - - - + + - - + - \ No newline at end of file + \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index d5d94194..048e816e 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,4 +28,6 @@ org.gradle.jvmargs=-Xmx1536m # 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 -android.debug.obsoleteApi=true \ No newline at end of file +android.debug.obsoleteApi=true +android.useAndroidX=true +android.enableJetifier=true \ No newline at end of file