From 37ace257bd81de8b67dd06ffbfc337cd0cd3ec8f Mon Sep 17 00:00:00 2001 From: Severiano Jaramillo Date: Thu, 29 Nov 2018 12:20:25 -0600 Subject: [PATCH] Migrate app to AndroidX and solve a bunch of conflicts. --- app/build.gradle | 41 ++-- .../RecyclerViewItemsCountAssertion.java | 6 +- .../crystalwallet/TransactionListTest.java | 11 +- .../AccountSeedSettingsActivity.java | 26 +-- .../AccountSeedsManagementActivity.java | 9 +- .../activities/AccountSettingsActivity.java | 18 +- .../activities/AccountsActivity.java | 26 +-- .../activities/BackupSeedActivity.java | 11 +- .../activities/BoardActivity.java | 18 +- .../activities/CreateContactActivity.java | 18 +- .../activities/CreateSeedActivity.kt | 2 +- .../CryptoCoinTransactionReceiptActivity.java | 8 +- .../CryptoNetAccountSettingsActivity.java | 31 ++- .../activities/CustomActivity.kt | 2 +- .../activities/GeneralSettingsActivity.java | 20 +- .../activities/ImportSeedActivity.java | 4 +- .../activities/IntroActivity.java | 6 +- .../activities/LicenseActivity.java | 7 +- .../activities/PatternRequestActivity.java | 14 +- .../activities/PinRequestActivity.java | 18 +- .../activities/PocketRequestActivity.java | 25 +-- .../ReceiveTransactionActivity.java | 8 +- .../activities/SendTransactionActivity.java | 14 +- .../activities/SettingsActivity.java | 16 +- .../application/CrystalSecurityMonitor.java | 11 +- .../crystalwallet/dao/AccountSeedDao.java | 12 +- .../crystalwallet/dao/BitcoinAddressDao.java | 12 +- .../dao/BitcoinTransactionDao.java | 10 +- .../dao/BitsharesAccountNameCacheDao.java | 11 +- .../crystalwallet/dao/BitsharesAssetDao.java | 10 +- .../agorise/crystalwallet/dao/ContactDao.java | 18 +- .../dao/CryptoCoinBalanceDao.java | 12 +- .../crystalwallet/dao/CryptoCurrencyDao.java | 10 +- .../dao/CryptoCurrencyEquivalenceDao.java | 11 +- .../dao/CryptoNetAccountDao.java | 13 +- .../crystalwallet/dao/CrystalDatabase.java | 12 +- .../crystalwallet/dao/GeneralSettingDao.java | 13 +- .../dao/GrapheneAccountInfoDao.java | 12 +- .../crystalwallet/dao/TransactionDao.java | 13 +- .../dao/converters/Converters.java | 4 +- .../fragments/AccountsFragment.java | 10 +- .../fragments/AccountsSettingsFragment.java | 2 +- .../fragments/BackupsSettingsFragment.java | 24 +-- .../fragments/BalanceFragment.java | 14 +- .../fragments/BitsharesSettingsFragment.java | 31 +-- .../fragments/ContactSelectionFragment.java | 20 +- .../fragments/ContactsFragment.java | 20 +- ...oNetAccountActivationSettingsFragment.java | 2 +- ...eneralAccountSeedCoinSettingsFragment.java | 6 +- .../fragments/GeneralAccountSeedFragment.java | 3 +- ...neralCryptoNetAccountSettingsFragment.java | 7 +- .../fragments/GeneralSettingsFragment.java | 17 +- .../ImportAccountOptionsFragment.java | 17 +- .../fragments/MerchantsFragment.java | 4 +- .../fragments/NoneSecurityFragment.java | 13 +- .../fragments/PatternSecurityFragment.java | 21 +- .../fragments/PinSecurityFragment.java | 8 +- .../fragments/ProfileSettingsFragment.java | 9 +- .../fragments/ReceiveTransactionFragment.java | 18 +- .../fragments/SecuritySettingsFragment.java | 11 +- .../fragments/SendTransactionFragment.java | 30 +-- .../fragments/TransactionsFragment.java | 20 +- .../crystalwallet/models/AccountSeed.java | 11 +- .../crystalwallet/models/BitcoinAddress.java | 8 +- .../models/BitcoinTransaction.java | 14 +- .../models/BitcoinTransactionExtended.java | 7 +- .../models/BitcoinTransactionGTxIO.java | 6 +- .../models/BitsharesAccountNameCache.java | 12 +- .../models/BitsharesAssetInfo.java | 8 +- .../agorise/crystalwallet/models/Contact.java | 15 +- .../crystalwallet/models/ContactAddress.java | 12 +- .../models/CryptoCoinBalance.java | 16 +- .../models/CryptoCoinTransaction.java | 18 +- .../models/CryptoCoinTransactionExtended.java | 14 +- .../crystalwallet/models/CryptoCurrency.java | 10 +- .../models/CryptoCurrencyEquivalence.java | 10 +- .../models/CryptoNetAccount.java | 16 +- .../models/CryptoNetBalance.java | 16 +- .../models/CryptoNetSelection.java | 4 +- .../crystalwallet/models/GeneralSetting.java | 12 +- .../models/GrapheneAccountInfo.java | 7 +- .../network/CryptoNetManager.java | 3 +- .../service/CrystalWalletService.java | 198 +++++++++--------- .../service/EquivalencesThread.java | 2 +- .../crystalwallet/util/BottomStatusBar.java | 2 +- .../util/BounceTouchListener.java | 12 +- .../crystalwallet/util/ChildViewPager.java | 2 +- .../viewmodels/AccountSeedListViewModel.java | 6 +- .../viewmodels/AccountSeedViewModel.kt | 4 +- .../viewmodels/ContactListViewModel.java | 8 +- .../viewmodels/ContactViewModel.java | 5 +- .../CryptoCoinBalanceListViewModel.java | 6 +- ...ryptoCurrencyEquivalenceListViewModel.java | 4 +- .../CryptoCurrencyEquivalenceViewModel.java | 6 +- .../viewmodels/CryptoCurrencyViewModel.java | 4 +- .../CryptoNetAccountListViewModel.java | 5 +- .../viewmodels/CryptoNetAccountViewModel.java | 7 +- .../CryptoNetBalanceListViewModel.java | 5 +- .../GeneralSettingListViewModel.java | 6 +- .../GrapheneAccountInfoViewModel.java | 6 +- .../viewmodels/TransactionListViewModel.java | 10 +- .../ContactNameValidationField.java | 4 +- .../CurrentPinValidationField.java | 13 +- .../views/AccountSeedListAdapter.java | 5 +- .../views/AccountSeedListView.java | 7 +- .../views/AccountSeedViewHolder.java | 5 +- .../views/ContactAddressListAdapter.java | 2 +- .../views/ContactAddressViewHolder.java | 8 +- .../views/ContactListAdapter.java | 2 +- .../views/ContactSelectionListAdapter.java | 2 +- .../views/ContactSelectionViewHolder.java | 2 +- .../views/ContactViewHolder.java | 4 +- .../views/CryptoCoinBalanceListAdapter.java | 2 +- .../views/CryptoCoinBalanceListView.java | 5 +- .../views/CryptoCoinBalanceViewHolder.java | 11 +- .../views/CryptoNetAccountAdapter.java | 4 - .../views/CryptoNetAccountListAdapter.java | 3 +- .../views/CryptoNetAccountListView.java | 6 +- .../views/CryptoNetAccountViewHolder.java | 4 +- .../views/CryptoNetBalanceListAdapter.java | 7 +- .../views/CryptoNetBalanceViewHolder.java | 16 +- .../views/CryptoNetSelectionListAdapter.java | 9 +- .../views/CryptoNetSelectionViewHolder.java | 11 +- .../crystalwallet/views/TimeZoneAdapter.java | 4 +- .../views/TransactionListAdapter.java | 6 +- .../views/TransactionViewHolder.java | 10 +- .../natives/CustomTextInputEditText.java | 2 +- .../layout/account_seed_activity_settings.xml | 26 +-- app/src/main/res/layout/account_seed_list.xml | 2 +- app/src/main/res/layout/activity_accounts.xml | 10 +- .../res/layout/activity_create_contact.xml | 12 +- app/src/main/res/layout/activity_intro.xml | 4 +- app/src/main/res/layout/activity_main.xml | 4 +- app/src/main/res/layout/activity_settings.xml | 18 +- app/src/main/res/layout/activity_tab.xml | 4 +- app/src/main/res/layout/board.xml | 28 +-- app/src/main/res/layout/bottom_status_bar.xml | 4 +- app/src/main/res/layout/contact_list.xml | 2 +- app/src/main/res/layout/contact_list_item.xml | 4 +- app/src/main/res/layout/create_seed.xml | 16 +- .../res/layout/crypto_coin_balance_list.xml | 2 +- .../crypto_net_account_activity_settings.xml | 24 +-- .../res/layout/crypto_net_account_list.xml | 2 +- .../main/res/layout/dialog_password_input.xml | 4 +- app/src/main/res/layout/fragment_accounts.xml | 6 +- .../res/layout/fragment_accounts_settings.xml | 4 +- .../res/layout/fragment_backups_settings.xml | 4 +- app/src/main/res/layout/fragment_balance.xml | 2 +- .../layout/fragment_bitshares_settings.xml | 4 +- app/src/main/res/layout/fragment_contacts.xml | 2 +- ...ent_general_account_seed_coin_settings.xml | 4 +- .../res/layout/fragment_general_settings.xml | 4 +- .../fragment_import_account_options.xml | 4 +- .../res/layout/fragment_profile_settings.xml | 4 +- .../res/layout/fragment_security_settings.xml | 22 +- .../main/res/layout/fragment_transactions.xml | 6 +- app/src/main/res/layout/import_seed.xml | 16 +- .../main/res/layout/receive_transaction.xml | 6 +- app/src/main/res/layout/send_transaction.xml | 10 +- .../main/res/layout/transaction_list_item.xml | 18 +- build.gradle | 13 +- gradle.properties | 2 + 162 files changed, 771 insertions(+), 1047 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 4277357..aad8879 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -14,6 +14,7 @@ kapt { repositories { mavenCentral() maven { url 'https://maven.google.com' } + maven { url "https://jitpack.io" } } android { @@ -24,7 +25,7 @@ android { targetSdkVersion 28 versionCode 5 versionName "0.5M.alpha" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { useSupportLibrary true } @@ -54,12 +55,16 @@ android { exclude 'lib/x86_64/freebsd/libscrypt.so' exclude 'lib/x86_64/linux/libscrypt.so' } + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) //androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { - androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', { + androidTestImplementation('androidx.test.espresso:espresso-core:3.1.1-alpha01', { exclude group: 'com.android.support', module: 'support-annotations' }) implementation( 'com.github.thekhaeng:pushdown-anim-click:1.1.1' ){ @@ -69,38 +74,40 @@ dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" //testCompile 'com.android.support.test:runner:1.0.1' implementation 'com.afollestad.material-dialogs:core:0.9.6.0' - 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:cardview-v7:28.0.0' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'android.arch.lifecycle:runtime:1.1.1' - implementation 'android.arch.lifecycle:extensions:1.1.1' - implementation 'android.arch.paging:runtime:1.0.1' + implementation 'androidx.appcompat:appcompat:1.0.2' + implementation 'androidx.legacy:legacy-support-v4:1.0.0' + implementation 'com.google.android.material:material:1.1.0-alpha01' + implementation 'androidx.cardview:cardview:1.0.0' + implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2' + implementation 'androidx.lifecycle:lifecycle-runtime:2.0.0' + implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0' + implementation 'androidx.paging:paging-runtime:2.1.0-beta01' implementation 'com.idescout.sql:sqlscout-server:2.0' implementation 'com.google.code.gson:gson:2.8.4' implementation 'com.squareup.retrofit2:retrofit:2.2.0' implementation 'com.squareup.retrofit2:converter-gson:2.1.0' implementation 'org.bitcoinj:bitcoinj-core:0.14.3' implementation 'com.neovisionaries:nv-websocket-client:1.30' - implementation 'com.jakewharton:butterknife:8.8.1' implementation 'com.github.bilthon:graphenej:0.4.6' implementation 'me.dm7.barcodescanner:zxing:1.9.8' - implementation 'com.github.sjaramillo10:AnimatedTabLayout:1.0.3' + // Fix errors related to AndroidX and ButterKnife incompatibility + implementation 'com.jakewharton:butterknife:9.0.0-SNAPSHOT' + kapt 'com.jakewharton:butterknife-compiler:9.0.0-SNAPSHOT' + + implementation 'com.github.sjaramillo10:AnimatedTabLayout:1.1.0' implementation 'com.squareup.okhttp3:logging-interceptor:3.5.0' implementation 'de.hdodenhof:circleimageview:2.2.0' //testCompile 'junit:junit: 4.12' testImplementation 'org.mockito:mockito-core:2.19.0' - implementation 'android.arch.persistence.room:runtime:1.1.1' + implementation 'androidx.room:room-runtime:2.1.0-alpha02' - kapt 'android.arch.persistence.room:runtime:1.1.1' - kapt 'android.arch.persistence.room:compiler:1.1.1' + kapt 'androidx.room:room-runtime:2.1.0-alpha02' + kapt 'androidx.room:room-compiler:2.1.0-alpha02' - kapt 'android.arch.lifecycle:compiler:1.1.1' - kapt 'com.jakewharton:butterknife-compiler:8.8.1' + kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0' implementation 'com.github.esafirm.android-image-picker:imagepicker:1.11.1' implementation 'id.zelory:compressor:2.1.0' diff --git a/app/src/androidTest/java/cy/agorise/crystalwallet/Assertions/RecyclerViewItemsCountAssertion.java b/app/src/androidTest/java/cy/agorise/crystalwallet/Assertions/RecyclerViewItemsCountAssertion.java index 75206fa..f4bbcbe 100644 --- a/app/src/androidTest/java/cy/agorise/crystalwallet/Assertions/RecyclerViewItemsCountAssertion.java +++ b/app/src/androidTest/java/cy/agorise/crystalwallet/Assertions/RecyclerViewItemsCountAssertion.java @@ -1,8 +1,8 @@ package cy.agorise.crystalwallet.Assertions; -import android.support.test.espresso.NoMatchingViewException; -import android.support.test.espresso.ViewAssertion; -import android.support.v7.widget.RecyclerView; +import androidx.test.espresso.NoMatchingViewException; +import androidx.test.espresso.ViewAssertion; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import static org.hamcrest.MatcherAssert.assertThat; diff --git a/app/src/androidTest/java/cy/agorise/crystalwallet/TransactionListTest.java b/app/src/androidTest/java/cy/agorise/crystalwallet/TransactionListTest.java index a4c0994..3eadea8 100644 --- a/app/src/androidTest/java/cy/agorise/crystalwallet/TransactionListTest.java +++ b/app/src/androidTest/java/cy/agorise/crystalwallet/TransactionListTest.java @@ -6,20 +6,19 @@ import org.junit.Rule; import org.junit.Test; import org.junit.runner.RunWith; -import android.support.test.InstrumentationRegistry; -import android.support.test.rule.ActivityTestRule; -import android.support.test.runner.AndroidJUnit4; +import androidx.test.InstrumentationRegistry; +import androidx.test.rule.ActivityTestRule; +import androidx.test.runner.AndroidJUnit4; import java.util.List; import cy.agorise.crystalwallet.Assertions.RecyclerViewItemsCountAssertion; import cy.agorise.crystalwallet.activities.IntroActivity; -import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.CryptoCoinTransaction; -import static android.support.test.espresso.Espresso.onView; -import static android.support.test.espresso.matcher.ViewMatchers.withId; +import static androidx.test.espresso.Espresso.onView; +import static androidx.test.espresso.matcher.ViewMatchers.withId; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSeedSettingsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSeedSettingsActivity.java index 8d7b736..a5d4bc6 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSeedSettingsActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSeedSettingsActivity.java @@ -1,17 +1,17 @@ package cy.agorise.crystalwallet.activities; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentStatePagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import com.google.android.material.tabs.TabLayout; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentStatePagerAdapter; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.widget.ImageView; import android.widget.TextView; @@ -22,14 +22,10 @@ import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.fragments.BitsharesSettingsFragment; import cy.agorise.crystalwallet.fragments.GeneralAccountSeedCoinSettingsFragment; import cy.agorise.crystalwallet.fragments.GeneralAccountSeedFragment; -import cy.agorise.crystalwallet.fragments.GeneralCryptoNetAccountSettingsFragment; import cy.agorise.crystalwallet.models.AccountSeed; -import cy.agorise.crystalwallet.models.CryptoNetAccount; import cy.agorise.crystalwallet.viewmodels.AccountSeedViewModel; -import cy.agorise.crystalwallet.viewmodels.CryptoNetAccountViewModel; /** * Created by henry varona on 10/29/18. diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSeedsManagementActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSeedsManagementActivity.java index 3a1a2af..1e7b819 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSeedsManagementActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSeedsManagementActivity.java @@ -1,11 +1,11 @@ package cy.agorise.crystalwallet.activities; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.content.Intent; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.widget.Button; import java.util.List; @@ -14,7 +14,6 @@ import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.viewmodels.AccountSeedListViewModel; import cy.agorise.crystalwallet.views.AccountSeedListView; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSettingsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSettingsActivity.java index 1848919..753e68c 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSettingsActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountSettingsActivity.java @@ -1,16 +1,14 @@ package cy.agorise.crystalwallet.activities; -import android.media.MediaPlayer; import android.os.Bundle; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentStatePagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; -import android.view.SurfaceHolder; -import android.view.SurfaceView; +import com.google.android.material.tabs.TabLayout; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentStatePagerAdapter; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + import android.widget.ImageView; import android.widget.TextView; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountsActivity.java index a7c68d6..70c88bd 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/AccountsActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/AccountsActivity.java @@ -1,34 +1,27 @@ package cy.agorise.crystalwallet.activities; -import android.app.Activity; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.content.ContextWrapper; import android.content.Intent; -import android.content.pm.ResolveInfo; import android.graphics.Bitmap; import android.graphics.BitmapFactory; -import android.net.Uri; import android.os.Bundle; import android.os.FileObserver; -import android.os.Parcelable; -import android.provider.MediaStore; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v7.app.AppCompatActivity; + +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.appcompat.app.AppCompatActivity; import android.view.View; import android.widget.TextView; import com.esafirm.imagepicker.features.ImagePicker; import com.esafirm.imagepicker.model.Image; import com.thekhaeng.pushdownanim.PushDownAnim; -//import com.nicdahlquist.pngquant.LibPngQuant; import java.io.File; -import java.io.FileOutputStream; -import java.util.ArrayList; import java.util.List; import butterknife.BindView; @@ -36,16 +29,13 @@ import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.models.AccountSeed; -import cy.agorise.crystalwallet.models.CryptoNetAccount; import cy.agorise.crystalwallet.viewmodels.AccountSeedListViewModel; -import cy.agorise.crystalwallet.viewmodels.CryptoNetAccountListViewModel; import cy.agorise.crystalwallet.views.AccountSeedListView; -import cy.agorise.crystalwallet.views.CryptoNetAccountListView; import de.hdodenhof.circleimageview.CircleImageView; import id.zelory.compressor.Compressor; /** - * Created by xd on 1/9/18. + * Created by Seven on 1/9/18. * */ diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java index f293c24..1975da0 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/BackupSeedActivity.java @@ -1,15 +1,15 @@ package cy.agorise.crystalwallet.activities; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.content.Intent; 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.view.View; import android.view.ViewGroup; import android.widget.Button; @@ -22,7 +22,6 @@ import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.fragments.BackupsSettingsFragment; import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.viewmodels.AccountSeedViewModel; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java index 08a81bb..5511a25 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/BoardActivity.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.activities; import android.app.ActivityOptions; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.content.ContextWrapper; import android.content.Intent; @@ -9,14 +9,14 @@ import android.content.res.Resources; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.Bundle; -import android.support.design.widget.FloatingActionButton; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentStatePagerAdapter; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.view.ViewPager; -import android.support.v7.widget.Toolbar; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import com.google.android.material.tabs.TabLayout; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentStatePagerAdapter; +import androidx.fragment.app.FragmentTransaction; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.widget.Toolbar; import android.util.Pair; import android.view.View; import android.view.animation.LinearInterpolator; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/CreateContactActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/CreateContactActivity.java index 373d41c..89ee2c1 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/CreateContactActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/CreateContactActivity.java @@ -1,15 +1,15 @@ package cy.agorise.crystalwallet.activities; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; -import android.support.annotation.Nullable; -import android.support.design.widget.TextInputEditText; -import android.support.design.widget.TextInputLayout; -import android.support.v7.app.AppCompatActivity; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; +import androidx.annotation.Nullable; +import com.google.android.material.textfield.TextInputEditText; +import com.google.android.material.textfield.TextInputLayout; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.Button; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/CreateSeedActivity.kt b/app/src/main/java/cy/agorise/crystalwallet/activities/CreateSeedActivity.kt index badb7ed..5b1bcb0 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/CreateSeedActivity.kt +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/CreateSeedActivity.kt @@ -3,7 +3,7 @@ package cy.agorise.crystalwallet.activities import android.content.Context import android.content.Intent import android.os.Bundle -import android.support.design.widget.TextInputEditText +import com.google.android.material.textfield.TextInputEditText import android.text.Editable import android.text.TextWatcher import android.view.inputmethod.InputMethodManager diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoCoinTransactionReceiptActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoCoinTransactionReceiptActivity.java index e4f68d5..89cac7e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoCoinTransactionReceiptActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoCoinTransactionReceiptActivity.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.activities; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; 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.widget.TextView; import java.text.SimpleDateFormat; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoNetAccountSettingsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoNetAccountSettingsActivity.java index a791019..5f47e94 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoNetAccountSettingsActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/CryptoNetAccountSettingsActivity.java @@ -1,20 +1,19 @@ package cy.agorise.crystalwallet.activities; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; -import android.media.MediaPlayer; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; + import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentStatePagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; -import android.view.SurfaceHolder; -import android.view.SurfaceView; +import androidx.annotation.Nullable; +import com.google.android.material.tabs.TabLayout; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentStatePagerAdapter; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + import android.widget.ImageView; import android.widget.TextView; @@ -25,12 +24,8 @@ import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.fragments.BackupsSettingsFragment; import cy.agorise.crystalwallet.fragments.BitsharesSettingsFragment; -import cy.agorise.crystalwallet.fragments.CryptoNetAccountActivationSettingsFragment; import cy.agorise.crystalwallet.fragments.GeneralCryptoNetAccountSettingsFragment; -import cy.agorise.crystalwallet.fragments.GeneralSettingsFragment; -import cy.agorise.crystalwallet.fragments.SecuritySettingsFragment; import cy.agorise.crystalwallet.models.CryptoNetAccount; import cy.agorise.crystalwallet.viewmodels.CryptoNetAccountViewModel; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/CustomActivity.kt b/app/src/main/java/cy/agorise/crystalwallet/activities/CustomActivity.kt index 5d9a8ae..9e563a8 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/CustomActivity.kt +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/CustomActivity.kt @@ -2,7 +2,7 @@ package cy.agorise.crystalwallet.activities import android.app.Activity import android.os.Bundle -import android.support.v7.app.AppCompatActivity +import androidx.appcompat.app.AppCompatActivity import cy.agorise.crystalwallet.util.FieldsValidator /* diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/GeneralSettingsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/GeneralSettingsActivity.java index 771ac7d..5af5c29 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/GeneralSettingsActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/GeneralSettingsActivity.java @@ -1,17 +1,13 @@ package cy.agorise.crystalwallet.activities; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; 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.widget.ArrayAdapter; import android.widget.Spinner; -import android.widget.TextView; - -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; import java.util.ArrayList; import java.util.Collections; @@ -24,14 +20,8 @@ import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnItemSelected; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.dao.CrystalDatabase; -import cy.agorise.crystalwallet.models.CryptoCoinBalance; -import cy.agorise.crystalwallet.models.CryptoCurrency; -import cy.agorise.crystalwallet.models.CryptoNetAccount; import cy.agorise.crystalwallet.models.GeneralSetting; -import cy.agorise.crystalwallet.models.GrapheneAccount; import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel; -import cy.agorise.crystalwallet.views.CryptoCurrencyAdapter; public class GeneralSettingsActivity extends AppCompatActivity { diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/ImportSeedActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/ImportSeedActivity.java index fa3cd44..fe5032e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/ImportSeedActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/ImportSeedActivity.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.activities; import android.app.Activity; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.ViewModelProviders; import android.content.Intent; import android.os.Bundle; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.text.Editable; import android.text.TextWatcher; import android.view.View; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java index 704354f..99b28d7 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/IntroActivity.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.activities; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.ViewModelProviders; import android.content.Intent; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; import android.view.View; import android.widget.Button; import android.widget.ImageView; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java index 2c2d26b..00dbede 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/LicenseActivity.java @@ -2,8 +2,8 @@ package cy.agorise.crystalwallet.activities; import android.content.Intent; 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.view.View; import android.webkit.WebView; import android.widget.Button; @@ -14,11 +14,8 @@ import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.application.CrystalApplication; import cy.agorise.crystalwallet.dao.CrystalDatabase; -import cy.agorise.crystalwallet.enums.CryptoNet; import cy.agorise.crystalwallet.models.GeneralSetting; -import cy.agorise.crystalwallet.network.CryptoNetManager; public class LicenseActivity extends AppCompatActivity { diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/PatternRequestActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/PatternRequestActivity.java index f9378bf..5a49e0b 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/PatternRequestActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/PatternRequestActivity.java @@ -1,16 +1,15 @@ package cy.agorise.crystalwallet.activities; import android.app.Activity; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.graphics.Color; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v7.app.AppCompatActivity; -import android.text.Editable; +import androidx.annotation.Nullable; +import androidx.appcompat.app.AppCompatActivity; + import android.view.View; -import android.widget.EditText; import android.widget.TextView; import com.andrognito.patternlockview.PatternLockView; @@ -22,7 +21,6 @@ import java.util.TimerTask; import butterknife.BindView; import butterknife.ButterKnife; -import butterknife.OnTextChanged; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.application.CrystalSecurityMonitor; //import cy.agorise.crystalwallet.interfaces.OnResponse; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/PinRequestActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/PinRequestActivity.java index 1f6d546..a29c73b 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/PinRequestActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/PinRequestActivity.java @@ -1,21 +1,18 @@ package cy.agorise.crystalwallet.activities; import android.app.Activity; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.graphics.Color; 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.text.Editable; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; -import android.widget.Toast; - -import org.jetbrains.annotations.NotNull; import java.util.List; import java.util.Timer; @@ -27,12 +24,7 @@ import butterknife.OnClick; import butterknife.OnTextChanged; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.application.CrystalSecurityMonitor; -import cy.agorise.crystalwallet.dialogs.material.DialogMaterial; -import cy.agorise.crystalwallet.dialogs.material.NegativeResponse; -import cy.agorise.crystalwallet.dialogs.material.PositiveResponse; -import cy.agorise.crystalwallet.dialogs.material.QuestionDialog; import cy.agorise.crystalwallet.interfaces.OnResponse; -import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.models.GeneralSetting; import cy.agorise.crystalwallet.util.PasswordManager; import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/PocketRequestActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/PocketRequestActivity.java index 687f810..485e183 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/PocketRequestActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/PocketRequestActivity.java @@ -1,9 +1,9 @@ package cy.agorise.crystalwallet.activities; import android.app.PendingIntent; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.content.Intent; import android.content.IntentFilter; import android.nfc.NfcAdapter; @@ -12,35 +12,20 @@ import android.nfc.tech.IsoDep; import android.nfc.tech.MifareClassic; import android.nfc.tech.NdefFormatable; import android.nfc.tech.NfcA; -import android.nfc.tech.NfcF; -import android.nfc.tech.NfcV; 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 android.widget.Toast; -import com.andrognito.patternlockview.PatternLockView; -import com.andrognito.patternlockview.listener.PatternLockViewListener; - -import org.apache.commons.codec.binary.Base32; - import java.io.IOException; -import java.math.BigInteger; import java.nio.ByteBuffer; -import java.util.List; -import butterknife.BindView; import butterknife.ButterKnife; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.application.CrystalSecurityMonitor; -import cy.agorise.crystalwallet.models.GeneralSetting; import cy.agorise.crystalwallet.util.PasswordManager; -import cy.agorise.crystalwallet.util.yubikey.Algorithm; -import cy.agorise.crystalwallet.util.yubikey.OathType; -import cy.agorise.crystalwallet.util.yubikey.TOTP; import cy.agorise.crystalwallet.util.yubikey.YkOathApi; -import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel; public class PocketRequestActivity extends AppCompatActivity { diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/ReceiveTransactionActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/ReceiveTransactionActivity.java index f8bd04b..6b70e77 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/ReceiveTransactionActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/ReceiveTransactionActivity.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.activities; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; 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.widget.TextView; import java.util.ArrayList; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/SendTransactionActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/SendTransactionActivity.java index e82e88a..bb07ef0 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/SendTransactionActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/SendTransactionActivity.java @@ -1,20 +1,16 @@ package cy.agorise.crystalwallet.activities; -import android.app.Activity; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.appcompat.app.AppCompatActivity; import android.text.Editable; import android.widget.Button; import android.widget.EditText; import android.widget.Spinner; import android.widget.TextView; -import android.widget.Toast; - -import com.jaredrummler.materialspinner.MaterialSpinner; import java.util.ArrayList; import java.util.List; diff --git a/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java b/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java index 1c0e253..2f3e78a 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java +++ b/app/src/main/java/cy/agorise/crystalwallet/activities/SettingsActivity.java @@ -1,16 +1,14 @@ package cy.agorise.crystalwallet.activities; import android.content.Intent; -import android.media.MediaPlayer; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentStatePagerAdapter; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; -import android.view.SurfaceHolder; -import android.view.SurfaceView; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentStatePagerAdapter; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; + import android.widget.ImageView; import android.widget.TextView; diff --git a/app/src/main/java/cy/agorise/crystalwallet/application/CrystalSecurityMonitor.java b/app/src/main/java/cy/agorise/crystalwallet/application/CrystalSecurityMonitor.java index b0fa597..301646a 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/application/CrystalSecurityMonitor.java +++ b/app/src/main/java/cy/agorise/crystalwallet/application/CrystalSecurityMonitor.java @@ -3,23 +3,16 @@ package cy.agorise.crystalwallet.application; import android.app.Activity; import android.app.Application; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.ViewModelProviders; import android.content.Intent; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.FragmentActivity; - -import java.util.List; +import androidx.fragment.app.FragmentActivity; import cy.agorise.crystalwallet.activities.PatternRequestActivity; import cy.agorise.crystalwallet.activities.PinRequestActivity; import cy.agorise.crystalwallet.activities.PocketRequestActivity; -import cy.agorise.crystalwallet.fragments.PatternSecurityFragment; import cy.agorise.crystalwallet.interfaces.OnResponse; import cy.agorise.crystalwallet.models.GeneralSetting; -import cy.agorise.crystalwallet.notifiers.CrystalWalletNotifier; import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/AccountSeedDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/AccountSeedDao.java index c808d90..5d207ca 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/AccountSeedDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/AccountSeedDao.java @@ -1,16 +1,14 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.MutableLiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; import cy.agorise.crystalwallet.models.AccountSeed; -import cy.agorise.crystalwallet.models.CryptoNetBalance; /** * Created by Henry Varona on 10/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/BitcoinAddressDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/BitcoinAddressDao.java index 357fba4..0d35872 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/BitcoinAddressDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/BitcoinAddressDao.java @@ -1,14 +1,12 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import cy.agorise.crystalwallet.models.BitcoinAddress; -import cy.agorise.crystalwallet.models.BitcoinTransaction; -import cy.agorise.crystalwallet.models.BitcoinTransactionExtended; /** * Created by Henry Varona on 10/17/2018. diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/BitcoinTransactionDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/BitcoinTransactionDao.java index 347efd1..87a4111 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/BitcoinTransactionDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/BitcoinTransactionDao.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/BitsharesAccountNameCacheDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/BitsharesAccountNameCacheDao.java index f674095..ce63ccb 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/BitsharesAccountNameCacheDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/BitsharesAccountNameCacheDao.java @@ -1,15 +1,14 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; import cy.agorise.crystalwallet.models.BitsharesAccountNameCache; -import cy.agorise.crystalwallet.models.GrapheneAccountInfo; /** * Created by Henry Varona on 6/15/2018. diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/BitsharesAssetDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/BitsharesAssetDao.java index 8e8d3c4..5e6ea92 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/BitsharesAssetDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/BitsharesAssetDao.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/ContactDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/ContactDao.java index 48726d6..b13a142 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/ContactDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/ContactDao.java @@ -1,20 +1,18 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.paging.DataSource; -import android.arch.paging.LivePagedListProvider; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Delete; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; -import android.arch.persistence.room.Update; +import androidx.lifecycle.LiveData; +import androidx.paging.DataSource; +import androidx.room.Dao; +import androidx.room.Delete; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; +import androidx.room.Update; import java.util.List; import cy.agorise.crystalwallet.models.Contact; import cy.agorise.crystalwallet.models.ContactAddress; -import cy.agorise.crystalwallet.models.CryptoCoinTransaction; /** * Created by Henry Varona on 1/17/2018. diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCoinBalanceDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCoinBalanceDao.java index 731adfb..748ba55 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCoinBalanceDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCoinBalanceDao.java @@ -1,17 +1,15 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; import cy.agorise.crystalwallet.models.CryptoCoinBalance; -import cy.agorise.crystalwallet.models.CryptoNetAccount; import cy.agorise.crystalwallet.models.CryptoNetBalance; -import cy.agorise.crystalwallet.enums.CryptoNet; /** * Created by Henry Varona on 10/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCurrencyDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCurrencyDao.java index 08823d2..8fd35d6 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCurrencyDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCurrencyDao.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCurrencyEquivalenceDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCurrencyEquivalenceDao.java index c1a24ec..048aec8 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCurrencyEquivalenceDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoCurrencyEquivalenceDao.java @@ -1,14 +1,13 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; -import cy.agorise.crystalwallet.models.CryptoCurrency; import cy.agorise.crystalwallet.models.CryptoCurrencyEquivalence; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoNetAccountDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoNetAccountDao.java index 638075d..4f6c897 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoNetAccountDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/CryptoNetAccountDao.java @@ -1,17 +1,14 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; -import cy.agorise.crystalwallet.models.AccountSeed; -import cy.agorise.crystalwallet.models.CryptoCoinBalance; import cy.agorise.crystalwallet.models.CryptoNetAccount; -import cy.agorise.crystalwallet.models.CryptoNetBalance; /** * Created by Henry Varona on 10/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/CrystalDatabase.java b/app/src/main/java/cy/agorise/crystalwallet/dao/CrystalDatabase.java index b9e47cf..2d736da 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/CrystalDatabase.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/CrystalDatabase.java @@ -1,11 +1,11 @@ package cy.agorise.crystalwallet.dao; -import android.arch.persistence.db.SupportSQLiteDatabase; -import android.arch.persistence.room.Database; -import android.arch.persistence.room.Room; -import android.arch.persistence.room.RoomDatabase; -import android.arch.persistence.room.TypeConverters; -import android.arch.persistence.room.migration.Migration; +import androidx.sqlite.db.SupportSQLiteDatabase; +import androidx.room.Database; +import androidx.room.Room; +import androidx.room.RoomDatabase; +import androidx.room.TypeConverters; +import androidx.room.migration.Migration; import android.content.Context; import cy.agorise.crystalwallet.dao.converters.Converters; diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/GeneralSettingDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/GeneralSettingDao.java index d8a9357..48e832c 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/GeneralSettingDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/GeneralSettingDao.java @@ -1,15 +1,14 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Delete; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Delete; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; -import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.models.GeneralSetting; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/GrapheneAccountInfoDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/GrapheneAccountInfoDao.java index 915f437..38aa595 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/GrapheneAccountInfoDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/GrapheneAccountInfoDao.java @@ -1,15 +1,13 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.List; -import cy.agorise.crystalwallet.models.CryptoNetAccount; -import cy.agorise.crystalwallet.models.GrapheneAccount; import cy.agorise.crystalwallet.models.GrapheneAccountInfo; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/TransactionDao.java b/app/src/main/java/cy/agorise/crystalwallet/dao/TransactionDao.java index 7e66ad9..587b03b 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/TransactionDao.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/TransactionDao.java @@ -1,12 +1,11 @@ package cy.agorise.crystalwallet.dao; -import android.arch.lifecycle.LiveData; -import android.arch.paging.DataSource; -import android.arch.paging.LivePagedListProvider; -import android.arch.persistence.room.Dao; -import android.arch.persistence.room.Insert; -import android.arch.persistence.room.OnConflictStrategy; -import android.arch.persistence.room.Query; +import androidx.lifecycle.LiveData; +import androidx.paging.DataSource; +import androidx.room.Dao; +import androidx.room.Insert; +import androidx.room.OnConflictStrategy; +import androidx.room.Query; import java.util.Date; import java.util.List; diff --git a/app/src/main/java/cy/agorise/crystalwallet/dao/converters/Converters.java b/app/src/main/java/cy/agorise/crystalwallet/dao/converters/Converters.java index 1f63087..3f4b7a0 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/dao/converters/Converters.java +++ b/app/src/main/java/cy/agorise/crystalwallet/dao/converters/Converters.java @@ -1,6 +1,6 @@ package cy.agorise.crystalwallet.dao.converters; -import android.arch.persistence.room.TypeConverter; +import androidx.room.TypeConverter; import java.util.Date; @@ -10,8 +10,6 @@ import cy.agorise.crystalwallet.enums.SeedType; import cy.agorise.crystalwallet.models.BitsharesAsset; import cy.agorise.crystalwallet.models.CryptoNetAccount; -import static cy.agorise.crystalwallet.R.string.account; - /** * Created by Henry Varona on 13/9/2017. */ diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/AccountsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/AccountsFragment.java index 130cb2f..a1f041d 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/AccountsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/AccountsFragment.java @@ -2,24 +2,20 @@ package cy.agorise.crystalwallet.fragments; import android.app.Dialog; import android.content.Intent; -import android.graphics.Color; -import android.graphics.drawable.ColorDrawable; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.app.AlertDialog; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.view.Window; -import android.widget.ImageView; import android.widget.TextView; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.activities.GeneralSettingsActivity; import cy.agorise.crystalwallet.activities.SettingsActivity; public class AccountsFragment extends DialogFragment { diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/AccountsSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/AccountsSettingsFragment.java index a28f5e6..18f3b0a 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/AccountsSettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/AccountsSettingsFragment.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.fragments; import android.os.Bundle; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.view.LayoutInflater; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/BackupsSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/BackupsSettingsFragment.java index 0255eb8..8afc1ab 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/BackupsSettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/BackupsSettingsFragment.java @@ -1,18 +1,17 @@ package cy.agorise.crystalwallet.fragments; -import android.Manifest; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; import android.content.Intent; import android.content.pm.PackageManager; import android.os.Build; import android.os.Bundle; import android.os.Environment; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.ActivityCompat; -import android.support.v4.app.Fragment; -import android.support.v4.content.ContextCompat; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.core.app.ActivityCompat; +import androidx.fragment.app.Fragment; +import androidx.core.content.ContextCompat; import android.text.Spannable; import android.text.SpannableStringBuilder; import android.util.Log; @@ -25,26 +24,19 @@ import android.widget.Toast; import com.thekhaeng.pushdownanim.PushDownAnim; -import java.io.File; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.Date; - import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.activities.BackupSeedActivity; -import cy.agorise.crystalwallet.activities.IntroActivity; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.GeneralSetting; import cy.agorise.crystalwallet.requestmanagers.CreateBackupRequest; -import cy.agorise.crystalwallet.requestmanagers.FileServiceRequest; import cy.agorise.crystalwallet.requestmanagers.FileServiceRequestListener; import cy.agorise.crystalwallet.requestmanagers.FileServiceRequests; /** - * Created by xd on 1/11/18. + * Created by Seven on 1/11/18. */ public class BackupsSettingsFragment extends Fragment{ diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/BalanceFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/BalanceFragment.java index a716892..e51eb0b 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/BalanceFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/BalanceFragment.java @@ -1,13 +1,13 @@ package cy.agorise.crystalwallet.fragments; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/BitsharesSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/BitsharesSettingsFragment.java index 7b26a41..c6a6839 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/BitsharesSettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/BitsharesSettingsFragment.java @@ -1,45 +1,26 @@ package cy.agorise.crystalwallet.fragments; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; -import android.content.Intent; -import android.content.res.Configuration; -import android.content.res.Resources; +import androidx.lifecycle.LiveData; + import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.util.DisplayMetrics; +import androidx.fragment.app.Fragment; + import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.ArrayAdapter; import android.widget.Button; -import android.widget.Spinner; import android.widget.TextView; import android.widget.Toast; import com.thekhaeng.pushdownanim.PushDownAnim; -import com.vincent.filepicker.Constant; -import com.vincent.filepicker.activity.AudioPickActivity; -import com.vincent.filepicker.filter.entity.AudioFile; -import java.io.File; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Currency; -import java.util.HashMap; import java.util.List; -import java.util.Locale; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; -import butterknife.OnItemSelected; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.dao.CrystalDatabase; -import cy.agorise.crystalwallet.enums.Language; -import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.models.CryptoNetAccount; import cy.agorise.crystalwallet.models.GeneralSetting; import cy.agorise.crystalwallet.models.GrapheneAccount; @@ -48,10 +29,6 @@ import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequestListener; import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequests; import cy.agorise.crystalwallet.requestmanagers.ValidateBitsharesLTMUpgradeRequest; import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel; -import cy.agorise.crystalwallet.views.TimeZoneAdapter; - -import static android.app.Activity.RESULT_OK; -import static com.vincent.filepicker.activity.AudioPickActivity.IS_NEED_RECORDER; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/ContactSelectionFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/ContactSelectionFragment.java index d3763ad..fccf45e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/ContactSelectionFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/ContactSelectionFragment.java @@ -1,18 +1,18 @@ package cy.agorise.crystalwallet.fragments; import android.app.Dialog; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; -import android.arch.paging.PagedList; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; +import androidx.paging.PagedList; 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 android.support.v7.app.AlertDialog; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/ContactsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/ContactsFragment.java index 3962380..cad9d53 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/ContactsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/ContactsFragment.java @@ -1,16 +1,16 @@ package cy.agorise.crystalwallet.fragments; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; -import android.arch.paging.PagedList; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; +import androidx.paging.PagedList; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.Fragment; -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.fragment.app.Fragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/CryptoNetAccountActivationSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/CryptoNetAccountActivationSettingsFragment.java index 9ac3dcf..570f00f 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/CryptoNetAccountActivationSettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/CryptoNetAccountActivationSettingsFragment.java @@ -5,7 +5,7 @@ import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.os.Bundle; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralAccountSeedCoinSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralAccountSeedCoinSettingsFragment.java index 630f5e7..265790f 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralAccountSeedCoinSettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralAccountSeedCoinSettingsFragment.java @@ -1,9 +1,9 @@ package cy.agorise.crystalwallet.fragments; import android.os.Bundle; -import android.support.v4.app.Fragment; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralAccountSeedFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralAccountSeedFragment.java index 12cfa66..bfd6985 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralAccountSeedFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralAccountSeedFragment.java @@ -5,7 +5,7 @@ import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.os.Bundle; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -21,7 +21,6 @@ import butterknife.OnClick; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.AccountSeed; -import cy.agorise.crystalwallet.models.CryptoNetAccount; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralCryptoNetAccountSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralCryptoNetAccountSettingsFragment.java index f7fad03..2b791de 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralCryptoNetAccountSettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralCryptoNetAccountSettingsFragment.java @@ -1,12 +1,11 @@ package cy.agorise.crystalwallet.fragments; import android.app.Activity; -import android.arch.lifecycle.LiveData; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; import android.os.Bundle; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -16,8 +15,6 @@ import android.widget.Toast; import com.thekhaeng.pushdownanim.PushDownAnim; -import java.util.List; - import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; @@ -25,8 +22,6 @@ import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.models.CryptoNetAccount; -import cy.agorise.crystalwallet.models.GeneralSetting; -import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralSettingsFragment.java index b4514ab..2cf1f05 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralSettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/GeneralSettingsFragment.java @@ -1,22 +1,20 @@ package cy.agorise.crystalwallet.fragments; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.content.Intent; import android.content.res.Configuration; import android.content.res.Resources; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v7.widget.ThemedSpinnerAdapter; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import android.util.DisplayMetrics; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.Button; -import android.widget.EditText; import android.widget.Spinner; import android.widget.TextView; @@ -27,28 +25,23 @@ import com.vincent.filepicker.filter.entity.AudioFile; import java.io.File; import java.util.ArrayList; -import java.util.Calendar; import java.util.Collections; import java.util.Currency; import java.util.HashMap; import java.util.List; import java.util.Locale; -import java.util.TimeZone; -import java.util.concurrent.TimeUnit; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import butterknife.OnItemSelected; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.enums.Language; import cy.agorise.crystalwallet.models.GeneralSetting; import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel; import cy.agorise.crystalwallet.views.TimeZoneAdapter; import static android.app.Activity.RESULT_OK; -import static android.content.Context.CONSUMER_IR_SERVICE; import static com.vincent.filepicker.activity.AudioPickActivity.IS_NEED_RECORDER; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/ImportAccountOptionsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/ImportAccountOptionsFragment.java index 5266c46..b1e44f2 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/ImportAccountOptionsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/ImportAccountOptionsFragment.java @@ -2,23 +2,21 @@ package cy.agorise.crystalwallet.fragments; import android.app.Activity; import android.app.Dialog; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.ViewModelProviders; import android.content.DialogInterface; import android.content.Intent; import android.content.pm.PackageManager; -import android.graphics.PorterDuff; import android.net.Uri; import android.os.Build; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.ActivityCompat; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.FragmentActivity; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.core.app.ActivityCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.FragmentActivity; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AlertDialog; import android.util.Log; import android.view.LayoutInflater; -import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.Window; @@ -34,7 +32,6 @@ import java.net.URISyntaxException; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; -import butterknife.OnTouch; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.activities.BoardActivity; import cy.agorise.crystalwallet.activities.ImportSeedActivity; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/MerchantsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/MerchantsFragment.java index 91b6d6e..7fd6b6a 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/MerchantsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/MerchantsFragment.java @@ -1,8 +1,8 @@ package cy.agorise.crystalwallet.fragments; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/NoneSecurityFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/NoneSecurityFragment.java index bee1286..eb8e30b 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/NoneSecurityFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/NoneSecurityFragment.java @@ -1,12 +1,7 @@ package cy.agorise.crystalwallet.fragments; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; -import android.content.Intent; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -15,21 +10,15 @@ import android.widget.Toast; import org.jetbrains.annotations.NotNull; -import java.util.List; - import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.activities.BoardActivity; import cy.agorise.crystalwallet.application.CrystalSecurityMonitor; import cy.agorise.crystalwallet.dialogs.material.DialogMaterial; import cy.agorise.crystalwallet.dialogs.material.NegativeResponse; import cy.agorise.crystalwallet.dialogs.material.PositiveResponse; import cy.agorise.crystalwallet.dialogs.material.QuestionDialog; -import cy.agorise.crystalwallet.models.GeneralSetting; -import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel; -import cy.agorise.crystalwallet.viewmodels.validators.PinSecurityValidator; /** * Created by xd on 1/18/18. diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/PatternSecurityFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/PatternSecurityFragment.java index 9fa4865..970569e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/PatternSecurityFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/PatternSecurityFragment.java @@ -1,21 +1,13 @@ package cy.agorise.crystalwallet.fragments; -import android.app.Activity; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; import android.graphics.Color; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.text.Editable; -import android.util.Log; +import androidx.fragment.app.Fragment; + import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; -import android.widget.EditText; import android.widget.TextView; -import android.widget.Toast; import com.andrognito.patternlockview.PatternLockView; import com.andrognito.patternlockview.listener.PatternLockViewListener; @@ -26,19 +18,10 @@ import java.util.TimerTask; import butterknife.BindView; import butterknife.ButterKnife; -import butterknife.OnTextChanged; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.application.CrystalSecurityMonitor; -import cy.agorise.crystalwallet.dialogs.material.CrystalDialog; -import cy.agorise.crystalwallet.interfaces.OnResponse; -import cy.agorise.crystalwallet.models.GeneralSetting; -import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequests; import cy.agorise.crystalwallet.util.ChildViewPager; import cy.agorise.crystalwallet.util.PasswordManager; -import cy.agorise.crystalwallet.viewmodels.GeneralSettingListViewModel; -import cy.agorise.crystalwallet.viewmodels.validators.PinSecurityValidator; -import cy.agorise.crystalwallet.viewmodels.validators.UIValidatorListener; -import cy.agorise.crystalwallet.viewmodels.validators.validationfields.ValidationField; /** * Created by xd on 1/18/18. diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/PinSecurityFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/PinSecurityFragment.java index 1a76695..7af2411 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/PinSecurityFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/PinSecurityFragment.java @@ -1,12 +1,10 @@ package cy.agorise.crystalwallet.fragments; -import android.app.Activity; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.ViewModelProviders; import android.os.Bundle; -import android.support.v4.app.Fragment; +import androidx.fragment.app.Fragment; import android.text.Editable; -import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/ProfileSettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/ProfileSettingsFragment.java index f6ae661..d2d26f8 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/ProfileSettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/ProfileSettingsFragment.java @@ -1,10 +1,9 @@ package cy.agorise.crystalwallet.fragments; import android.os.Bundle; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; + +import androidx.fragment.app.Fragment; + import android.text.Editable; import android.view.LayoutInflater; import android.view.View; @@ -13,10 +12,8 @@ import android.widget.EditText; import butterknife.BindView; import butterknife.ButterKnife; -import butterknife.OnClick; import butterknife.OnTextChanged; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.util.ChildViewPager; /** * Created by henry varona on 4/17/18. diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java index 4a0c493..537664f 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/ReceiveTransactionFragment.java @@ -1,9 +1,9 @@ package cy.agorise.crystalwallet.fragments; import android.app.Dialog; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.content.ContextWrapper; import android.content.DialogInterface; @@ -12,11 +12,11 @@ import android.graphics.BitmapFactory; import android.os.AsyncTask; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.DialogFragment; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.fragment.app.DialogFragment; +import androidx.appcompat.app.AlertDialog; import android.text.Editable; import android.util.Log; import android.view.LayoutInflater; @@ -30,7 +30,6 @@ import android.widget.ImageView; import android.widget.ProgressBar; import android.widget.Spinner; import android.widget.TextView; -import android.widget.Toast; import com.google.zxing.BarcodeFormat; import com.google.zxing.MultiFormatWriter; @@ -44,7 +43,6 @@ import cy.agorise.crystalwallet.enums.CryptoNet; import cy.agorise.crystalwallet.requestmanagers.CalculateBitcoinUriRequest; import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequestListener; import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequests; -import cy.agorise.crystalwallet.requestmanagers.NextBitcoinAccountAddressRequest; import cy.agorise.crystalwallet.util.CircularImageView; import cy.agorise.crystalwallet.viewmodels.CryptoNetAccountListViewModel; import cy.agorise.crystalwallet.views.CryptoNetAccountAdapter; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/SecuritySettingsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/SecuritySettingsFragment.java index d3ed69a..da99979 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/SecuritySettingsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/SecuritySettingsFragment.java @@ -6,14 +6,11 @@ import android.content.IntentFilter; import android.nfc.NfcAdapter; import android.nfc.Tag; import android.nfc.tech.IsoDep; -import android.nfc.tech.MifareClassic; -import android.nfc.tech.NdefFormatable; -import android.nfc.tech.NfcA; import android.os.Bundle; -import android.support.design.widget.TabLayout; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; +import com.google.android.material.tabs.TabLayout; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java index 018c77b..c96fb78 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/SendTransactionFragment.java @@ -3,9 +3,9 @@ package cy.agorise.crystalwallet.fragments; import android.Manifest; import android.app.Activity; import android.app.Dialog; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.content.ContextWrapper; import android.content.Intent; @@ -15,15 +15,15 @@ import android.graphics.BitmapFactory; import android.os.Build; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.ActivityCompat; -import android.support.v4.app.DialogFragment; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentTransaction; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AlertDialog; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import com.google.android.material.floatingactionbutton.FloatingActionButton; +import androidx.core.app.ActivityCompat; +import androidx.fragment.app.DialogFragment; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentTransaction; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AlertDialog; import android.text.Editable; import android.util.Log; import android.view.LayoutInflater; @@ -45,6 +45,8 @@ import java.math.RoundingMode; import java.text.DecimalFormat; import java.text.DecimalFormatSymbols; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; import java.util.List; import java.util.Locale; @@ -83,8 +85,6 @@ import cy.agorise.graphenej.Invoice; import cy.agorise.graphenej.LineItem; import me.dm7.barcodescanner.zxing.ZXingScannerView; -import static butterknife.internal.Utils.listOf; - public class SendTransactionFragment extends DialogFragment implements UIValidatorListener, ZXingScannerView.ResultHandler { private final String TAG = getClass().getName(); @@ -617,7 +617,7 @@ public class SendTransactionFragment extends DialogFragment implements UIValidat public void beginScanQrCode(){ //mScannerView = new ZXingScannerView(getContext()); - mScannerView.setFormats(listOf(BarcodeFormat.QR_CODE)); + mScannerView.setFormats(Collections.singletonList(BarcodeFormat.QR_CODE)); mScannerView.setAspectTolerance(0.5f); mScannerView.setAutoFocus(true); mScannerView.setLaserColor(R.color.colorAccent); diff --git a/app/src/main/java/cy/agorise/crystalwallet/fragments/TransactionsFragment.java b/app/src/main/java/cy/agorise/crystalwallet/fragments/TransactionsFragment.java index 5291761..e59c9cd 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/fragments/TransactionsFragment.java +++ b/app/src/main/java/cy/agorise/crystalwallet/fragments/TransactionsFragment.java @@ -1,16 +1,16 @@ package cy.agorise.crystalwallet.fragments; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; -import android.arch.paging.PagedList; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; +import androidx.paging.PagedList; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.design.widget.FloatingActionButton; -import android.support.v4.app.Fragment; -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.fragment.app.Fragment; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.text.Editable; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/AccountSeed.java b/app/src/main/java/cy/agorise/crystalwallet/models/AccountSeed.java index 326e167..abfd023 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/AccountSeed.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/AccountSeed.java @@ -1,13 +1,12 @@ package cy.agorise.crystalwallet.models; -import android.accounts.Account; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.PrimaryKey; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.PrimaryKey; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; import org.bitcoinj.core.Base58; import org.bitcoinj.core.ECKey; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinAddress.java b/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinAddress.java index f8ca2bd..961ece6 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinAddress.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinAddress.java @@ -1,9 +1,9 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.support.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.annotation.NonNull; /** * Represents a Bitcoin derivated address diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransaction.java b/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransaction.java index 3ba5f08..0fc652a 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransaction.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransaction.java @@ -1,15 +1,9 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; - -import java.util.Date; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.annotation.NonNull; /** * Represents a Bitcoin alike Transaction diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransactionExtended.java b/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransactionExtended.java index c2202bc..cc5bbee 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransactionExtended.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransactionExtended.java @@ -1,10 +1,7 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Embedded; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Relation; +import androidx.room.Embedded; +import androidx.room.Relation; import java.util.List; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransactionGTxIO.java b/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransactionGTxIO.java index 105f8de..506c103 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransactionGTxIO.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/BitcoinTransactionGTxIO.java @@ -1,8 +1,8 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; /** * Represents a Bitcoin alike Transaction Inputs and Outputs diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/BitsharesAccountNameCache.java b/app/src/main/java/cy/agorise/crystalwallet/models/BitsharesAccountNameCache.java index c6fdb73..95ffeb1 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/BitsharesAccountNameCache.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/BitsharesAccountNameCache.java @@ -1,12 +1,12 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Ignore; +import androidx.room.Index; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; /** * Represents a cache of a Bitshares Account name diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/BitsharesAssetInfo.java b/app/src/main/java/cy/agorise/crystalwallet/models/BitsharesAssetInfo.java index 1318ef2..86bfd6f 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/BitsharesAssetInfo.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/BitsharesAssetInfo.java @@ -1,9 +1,9 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.TypeConverters; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.room.TypeConverters; import cy.agorise.crystalwallet.dao.converters.Converters; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/Contact.java b/app/src/main/java/cy/agorise/crystalwallet/models/Contact.java index 0bc16a6..43728ad 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/Contact.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/Contact.java @@ -1,14 +1,13 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Ignore; +import androidx.room.Index; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; import java.util.ArrayList; import java.util.List; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/ContactAddress.java b/app/src/main/java/cy/agorise/crystalwallet/models/ContactAddress.java index 83d1f2d..19b3aab 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/ContactAddress.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/ContactAddress.java @@ -1,12 +1,12 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Index; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; import cy.agorise.crystalwallet.enums.CryptoNet; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinBalance.java b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinBalance.java index 025e6df..ea120d7 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinBalance.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinBalance.java @@ -1,15 +1,13 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; - -import cy.agorise.crystalwallet.enums.CryptoCoin; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.room.Index; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; /** * Represents a balance of a specific asset from a CryptoNet diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinTransaction.java b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinTransaction.java index 3259d75..291ee82 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinTransaction.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinTransaction.java @@ -1,18 +1,16 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.room.Ignore; +import androidx.room.Index; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; import java.util.Date; -import cy.agorise.crystalwallet.enums.CryptoCoin; - /** * Represents a generic CryptoNet Transaction * diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinTransactionExtended.java b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinTransactionExtended.java index b319e15..5962223 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinTransactionExtended.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCoinTransactionExtended.java @@ -1,14 +1,10 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Embedded; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; +import androidx.room.ColumnInfo; +import androidx.room.Embedded; +import androidx.room.Entity; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; import java.util.Date; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCurrency.java b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCurrency.java index eaf72ee..788e8c3 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCurrency.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCurrency.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.arch.persistence.room.TypeConverters; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.Index; +import androidx.room.PrimaryKey; +import androidx.room.TypeConverters; import cy.agorise.crystalwallet.dao.converters.Converters; import cy.agorise.crystalwallet.enums.CryptoNet; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCurrencyEquivalence.java b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCurrencyEquivalence.java index 2428ce9..197ce12 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCurrencyEquivalence.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoCurrencyEquivalence.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.room.Index; +import androidx.room.PrimaryKey; import java.util.Date; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetAccount.java b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetAccount.java index 1b3bd0c..669243c 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetAccount.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetAccount.java @@ -1,14 +1,14 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; +import androidx.room.Ignore; +import androidx.room.Index; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; import cy.agorise.crystalwallet.enums.CryptoNet; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetBalance.java b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetBalance.java index d90d6be..7e2cd52 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetBalance.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetBalance.java @@ -1,21 +1,13 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Ignore; -import android.arch.persistence.room.Index; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; - -import cy.agorise.crystalwallet.enums.CryptoCoin; import cy.agorise.crystalwallet.enums.CryptoNet; -import static android.arch.persistence.room.ColumnInfo.INTEGER; - /** * Created by Henry Varona on 6/9/2017. * diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetSelection.java b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetSelection.java index 515c20d..5b51131 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetSelection.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/CryptoNetSelection.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.models; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; import cy.agorise.crystalwallet.enums.CryptoNet; diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/GeneralSetting.java b/app/src/main/java/cy/agorise/crystalwallet/models/GeneralSetting.java index b452337..7a4bbc1 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/GeneralSetting.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/GeneralSetting.java @@ -1,13 +1,11 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.PrimaryKey; -import android.support.annotation.NonNull; -import android.support.v7.util.DiffUtil; - -import cy.agorise.crystalwallet.enums.SeedType; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.PrimaryKey; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.DiffUtil; /** * Created by Henry Varona on 6/11/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/models/GrapheneAccountInfo.java b/app/src/main/java/cy/agorise/crystalwallet/models/GrapheneAccountInfo.java index 3b755e5..26b9f9c 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/models/GrapheneAccountInfo.java +++ b/app/src/main/java/cy/agorise/crystalwallet/models/GrapheneAccountInfo.java @@ -1,9 +1,8 @@ package cy.agorise.crystalwallet.models; -import android.arch.persistence.room.ColumnInfo; -import android.arch.persistence.room.Entity; -import android.arch.persistence.room.ForeignKey; -import android.arch.persistence.room.Index; +import androidx.room.ColumnInfo; +import androidx.room.Entity; +import androidx.room.ForeignKey; /** * This represents the additional info of a bitshares account diff --git a/app/src/main/java/cy/agorise/crystalwallet/network/CryptoNetManager.java b/app/src/main/java/cy/agorise/crystalwallet/network/CryptoNetManager.java index 544d1fb..ed4af98 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/network/CryptoNetManager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/network/CryptoNetManager.java @@ -1,9 +1,8 @@ package cy.agorise.crystalwallet.network; -import android.support.annotation.NonNull; +import androidx.annotation.NonNull; import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; diff --git a/app/src/main/java/cy/agorise/crystalwallet/service/CrystalWalletService.java b/app/src/main/java/cy/agorise/crystalwallet/service/CrystalWalletService.java index 8d3b05c..e23e626 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/service/CrystalWalletService.java +++ b/app/src/main/java/cy/agorise/crystalwallet/service/CrystalWalletService.java @@ -1,21 +1,20 @@ package cy.agorise.crystalwallet.service; -import android.arch.lifecycle.LifecycleService; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; +import androidx.lifecycle.LifecycleService; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; import android.content.Intent; import android.os.Handler; import android.os.IBinder; import android.os.Looper; import android.os.Message; -import android.support.annotation.Nullable; +import androidx.annotation.Nullable; import android.util.Log; import java.util.ArrayList; import java.util.List; -import cy.agorise.crystalwallet.apigenerator.GrapheneApiGenerator; import cy.agorise.crystalwallet.enums.CryptoCoin; import cy.agorise.crystalwallet.manager.FileBackupManager; import cy.agorise.crystalwallet.manager.GeneralAccountManager; @@ -31,7 +30,6 @@ import cy.agorise.crystalwallet.models.CryptoNetAccount; import cy.agorise.crystalwallet.models.GeneralSetting; import cy.agorise.crystalwallet.models.GrapheneAccount; import cy.agorise.crystalwallet.models.GrapheneAccountInfo; -import cy.agorise.crystalwallet.requestmanagers.FileServiceRequest; import cy.agorise.crystalwallet.requestmanagers.FileServiceRequests; import cy.agorise.crystalwallet.requestmanagers.GetBitsharesAccountNameCacheRequest; @@ -71,80 +69,81 @@ public class CrystalWalletService extends LifecycleService { } } + // TODO Uncomment public void loadBitsharesAccountNames(){ - final LifecycleService service = this; - final LiveData> uncachedBitsharesAccountNames = - CrystalDatabase.getAppDatabase(service).bitsharesAccountNameCacheDao().getUncachedBitsharesAccountName(); - - uncachedBitsharesAccountNames.observe(service, new Observer>() { - @Override - public void onChanged(@Nullable List bitsharesAccountNameCacheList) { - for (BitsharesAccountNameCache nextAccountId : bitsharesAccountNameCacheList){ - GetBitsharesAccountNameCacheRequest request = new GetBitsharesAccountNameCacheRequest(service, nextAccountId.getAccountId()); - - CryptoNetInfoRequests.getInstance().addRequest(request); - } - } - }); +// final LifecycleService service = this; +// final LiveData> uncachedBitsharesAccountNames = +// CrystalDatabase.getAppDatabase(service).bitsharesAccountNameCacheDao().getUncachedBitsharesAccountName(); +// +// uncachedBitsharesAccountNames.observe(service, new Observer>() { +// @Override +// public void onChanged(@Nullable List bitsharesAccountNameCacheList) { +// for (BitsharesAccountNameCache nextAccountId : bitsharesAccountNameCacheList){ +// GetBitsharesAccountNameCacheRequest request = new GetBitsharesAccountNameCacheRequest(service, nextAccountId.getAccountId()); +// +// CryptoNetInfoRequests.getInstance().addRequest(request); +// } +// } +// }); } public void loadEquivalentsValues(){ this.keepLoadingEquivalences = true; final LifecycleService service = this; - //getting the preferred currency of the user - final LiveData preferredCurrencySetting = - CrystalDatabase.getAppDatabase(service).generalSettingDao().getByName(GeneralSetting.SETTING_NAME_PREFERRED_CURRENCY); - - preferredCurrencySetting.observe(service, new Observer() { - @Override - public void onChanged(final @Nullable GeneralSetting generalSetting) { - if (generalSetting != null) { - CryptoCurrency preferredCurrency = CrystalDatabase.getAppDatabase(service).cryptoCurrencyDao().getByNameAndCryptoNet("EUR", CryptoNet.BITSHARES.name()); - - if (preferredCurrency != null) { - BitsharesAssetInfo preferredCurrencyBitsharesInfo = CrystalDatabase.getAppDatabase(service).bitsharesAssetDao().getBitsharesAssetInfoFromCurrencyId(preferredCurrency.getId()); - - if (preferredCurrencyBitsharesInfo != null) { - final BitsharesAsset preferredCurrencyBitshareAsset = new BitsharesAsset(preferredCurrency); - preferredCurrencyBitshareAsset.loadInfo(preferredCurrencyBitsharesInfo); - - //Loading "from" currencies - final LiveData> bitsharesAssetInfo = - CrystalDatabase.getAppDatabase(service).bitsharesAssetDao().getAll(); - - bitsharesAssetInfo.observe(service, new Observer>() { - @Override - public void onChanged(@Nullable List bitsharesAssetInfos) { - List bitsharesAssets = new ArrayList(); - List currenciesIds = new ArrayList(); - for (BitsharesAssetInfo bitsharesAssetInfo : bitsharesAssetInfos) { - currenciesIds.add(bitsharesAssetInfo.getCryptoCurrencyId()); - } - ; - List bitsharesCurrencies = CrystalDatabase.getAppDatabase(service).cryptoCurrencyDao().getByIds(currenciesIds); - - BitsharesAsset nextAsset; - for (int i = 0; i < bitsharesCurrencies.size(); i++) { - CryptoCurrency nextCurrency = bitsharesCurrencies.get(i); - BitsharesAssetInfo nextBitsharesInfo = bitsharesAssetInfos.get(i); - nextAsset = new BitsharesAsset(nextCurrency); - nextAsset.loadInfo(nextBitsharesInfo); - bitsharesAssets.add(nextAsset); - } - - if (LoadEquivalencesThread != null) { - LoadEquivalencesThread.stopLoadingEquivalences(); - }; - LoadEquivalencesThread = new EquivalencesThread(service, generalSetting.getValue(), bitsharesAssets); - LoadEquivalencesThread.start(); - } - }); - } - } - } - } - }); + // TODO Uncomment +// //getting the preferred currency of the user +// final LiveData preferredCurrencySetting = +// CrystalDatabase.getAppDatabase(service).generalSettingDao().getByName(GeneralSetting.SETTING_NAME_PREFERRED_CURRENCY); +// +// preferredCurrencySetting.observe(service, new Observer() { +// @Override +// public void onChanged(final @Nullable GeneralSetting generalSetting) { +// if (generalSetting != null) { +// CryptoCurrency preferredCurrency = CrystalDatabase.getAppDatabase(service).cryptoCurrencyDao().getByNameAndCryptoNet("EUR", CryptoNet.BITSHARES.name()); +// +// if (preferredCurrency != null) { +// BitsharesAssetInfo preferredCurrencyBitsharesInfo = CrystalDatabase.getAppDatabase(service).bitsharesAssetDao().getBitsharesAssetInfoFromCurrencyId(preferredCurrency.getId()); +// +// if (preferredCurrencyBitsharesInfo != null) { +// final BitsharesAsset preferredCurrencyBitshareAsset = new BitsharesAsset(preferredCurrency); +// preferredCurrencyBitshareAsset.loadInfo(preferredCurrencyBitsharesInfo); +// +// //Loading "from" currencies +// final LiveData> bitsharesAssetInfo = +// CrystalDatabase.getAppDatabase(service).bitsharesAssetDao().getAll(); +// +// bitsharesAssetInfo.observe(service, new Observer>() { +// @Override +// public void onChanged(@Nullable List bitsharesAssetInfos) { +// List bitsharesAssets = new ArrayList(); +// List currenciesIds = new ArrayList(); +// for (BitsharesAssetInfo bitsharesAssetInfo : bitsharesAssetInfos) { +// currenciesIds.add(bitsharesAssetInfo.getCryptoCurrencyId()); +// } +// List bitsharesCurrencies = CrystalDatabase.getAppDatabase(service).cryptoCurrencyDao().getByIds(currenciesIds); +// +// BitsharesAsset nextAsset; +// for (int i = 0; i < bitsharesCurrencies.size(); i++) { +// CryptoCurrency nextCurrency = bitsharesCurrencies.get(i); +// BitsharesAssetInfo nextBitsharesInfo = bitsharesAssetInfos.get(i); +// nextAsset = new BitsharesAsset(nextCurrency); +// nextAsset.loadInfo(nextBitsharesInfo); +// bitsharesAssets.add(nextAsset); +// } +// +// if (LoadEquivalencesThread != null) { +// LoadEquivalencesThread.stopLoadingEquivalences(); +// }; +// LoadEquivalencesThread = new EquivalencesThread(service, generalSetting.getValue(), bitsharesAssets); +// LoadEquivalencesThread.start(); +// } +// }); +// } +// } +// } +// } +// }); } public void loadAccountTransactions(){ @@ -152,33 +151,34 @@ public class CrystalWalletService extends LifecycleService { final CrystalWalletService thisService = this; final CrystalDatabase db = CrystalDatabase.getAppDatabase(this); - //final LiveData> cryptoNetAccountList = db.cryptoNetAccountDao().getAll(); - final LiveData> grapheneAccountInfoList = db.grapheneAccountInfoDao().getAll(); - grapheneAccountInfoList.observe(this, new Observer>() { - @Override - public void onChanged(@Nullable List grapheneAccountInfos) { - GrapheneAccount nextGrapheneAccount; - for(GrapheneAccountInfo nextGrapheneAccountInfo : grapheneAccountInfos) { - CryptoNetAccount nextAccount = db.cryptoNetAccountDao().getById(nextGrapheneAccountInfo.getCryptoNetAccountId()); - //GrapheneAccountInfo grapheneAccountInfo = db.grapheneAccountInfoDao().getByAccountId(nextAccount.getId()); - nextGrapheneAccount = new GrapheneAccount(nextAccount); - nextGrapheneAccount.loadInfo(nextGrapheneAccountInfo); + // TODO Uncomment +// final LiveData> grapheneAccountInfoList = db.grapheneAccountInfoDao().getAll(); +// grapheneAccountInfoList.observe(this, new Observer>() { +// @Override +// public void onChanged(@Nullable List grapheneAccountInfos) { +// GrapheneAccount nextGrapheneAccount; +// for(GrapheneAccountInfo nextGrapheneAccountInfo : grapheneAccountInfos) { +// CryptoNetAccount nextAccount = db.cryptoNetAccountDao().getById(nextGrapheneAccountInfo.getCryptoNetAccountId()); +// //GrapheneAccountInfo grapheneAccountInfo = db.grapheneAccountInfoDao().getByAccountId(nextAccount.getId()); +// nextGrapheneAccount = new GrapheneAccount(nextAccount); +// nextGrapheneAccount.loadInfo(nextGrapheneAccountInfo); +// +// +// bitsharesAccountManager.loadAccountFromDB(nextGrapheneAccount,thisService); +// } +// } +// }); - - bitsharesAccountManager.loadAccountFromDB(nextGrapheneAccount,thisService); - } - } - }); - - final LiveData> cryptoNetAccountList = db.cryptoNetAccountDao().getAllBitcoins(); - cryptoNetAccountList.observe(this, new Observer>() { - @Override - public void onChanged(@Nullable List cryptoNetAccounts) { - for(CryptoNetAccount nextCryptoNetAccount : cryptoNetAccounts) { - generalAccountManager.loadAccountFromDB(nextCryptoNetAccount,thisService); - } - } - }); + // TODO Uncomment +// final LiveData> cryptoNetAccountList = db.cryptoNetAccountDao().getAllBitcoins(); +// cryptoNetAccountList.observe(this, new Observer>() { +// @Override +// public void onChanged(@Nullable List cryptoNetAccounts) { +// for(CryptoNetAccount nextCryptoNetAccount : cryptoNetAccounts) { +// generalAccountManager.loadAccountFromDB(nextCryptoNetAccount,thisService); +// } +// } +// }); /*while(this.keepLoadingAccountTransactions){ try{ diff --git a/app/src/main/java/cy/agorise/crystalwallet/service/EquivalencesThread.java b/app/src/main/java/cy/agorise/crystalwallet/service/EquivalencesThread.java index 12a446c..cd5b667 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/service/EquivalencesThread.java +++ b/app/src/main/java/cy/agorise/crystalwallet/service/EquivalencesThread.java @@ -1,6 +1,6 @@ package cy.agorise.crystalwallet.service; -import android.arch.lifecycle.LifecycleService; +import androidx.lifecycle.LifecycleService; import android.util.Log; import java.util.ArrayList; diff --git a/app/src/main/java/cy/agorise/crystalwallet/util/BottomStatusBar.java b/app/src/main/java/cy/agorise/crystalwallet/util/BottomStatusBar.java index a5150a6..722ac3c 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/util/BottomStatusBar.java +++ b/app/src/main/java/cy/agorise/crystalwallet/util/BottomStatusBar.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.util; import android.content.Context; -import android.support.constraint.ConstraintLayout; +import androidx.constraintlayout.widget.ConstraintLayout; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.ImageView; diff --git a/app/src/main/java/cy/agorise/crystalwallet/util/BounceTouchListener.java b/app/src/main/java/cy/agorise/crystalwallet/util/BounceTouchListener.java index 4053ad9..df4b688 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/util/BounceTouchListener.java +++ b/app/src/main/java/cy/agorise/crystalwallet/util/BounceTouchListener.java @@ -3,12 +3,12 @@ package cy.agorise.crystalwallet.util; import android.animation.Animator; import android.animation.AnimatorListenerAdapter; import android.animation.ValueAnimator; -import android.support.annotation.IdRes; -import android.support.annotation.Nullable; -import android.support.v4.view.MotionEventCompat; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; -import android.support.v7.widget.StaggeredGridLayoutManager; +import androidx.annotation.IdRes; +import androidx.annotation.Nullable; +import androidx.core.view.MotionEventCompat; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; +import androidx.recyclerview.widget.StaggeredGridLayoutManager; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/util/ChildViewPager.java b/app/src/main/java/cy/agorise/crystalwallet/util/ChildViewPager.java index 34f6417..b70a00b 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/util/ChildViewPager.java +++ b/app/src/main/java/cy/agorise/crystalwallet/util/ChildViewPager.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.util; import android.content.Context; -import android.support.v4.view.ViewPager; +import androidx.viewpager.widget.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.animation.DecelerateInterpolator; diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/AccountSeedListViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/AccountSeedListViewModel.java index b1b9ae6..4faa2fa 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/AccountSeedListViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/AccountSeedListViewModel.java @@ -1,15 +1,13 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; -import android.arch.paging.PagedList; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import java.util.List; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.AccountSeed; -import cy.agorise.crystalwallet.models.CryptoCoinTransaction; /** * Created by Henry Varona on 27/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/AccountSeedViewModel.kt b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/AccountSeedViewModel.kt index aa9d3e9..6ce4468 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/AccountSeedViewModel.kt +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/AccountSeedViewModel.kt @@ -1,8 +1,8 @@ package cy.agorise.crystalwallet.viewmodels import android.app.Application -import android.arch.lifecycle.AndroidViewModel -import android.arch.lifecycle.LiveData +import androidx.lifecycle.AndroidViewModel +import androidx.lifecycle.LiveData import cy.agorise.crystalwallet.dao.CrystalDatabase import cy.agorise.crystalwallet.models.AccountSeed diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/ContactListViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/ContactListViewModel.java index 38da032..6923d5e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/ContactListViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/ContactListViewModel.java @@ -1,10 +1,10 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; -import android.arch.paging.LivePagedListBuilder; -import android.arch.paging.PagedList; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; +import androidx.paging.LivePagedListBuilder; +import androidx.paging.PagedList; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.enums.CryptoNet; diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/ContactViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/ContactViewModel.java index 1951215..954cd0c 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/ContactViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/ContactViewModel.java @@ -1,9 +1,8 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; -import android.arch.paging.PagedList; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import java.util.List; diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCoinBalanceListViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCoinBalanceListViewModel.java index 1e76ea7..e04b27d 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCoinBalanceListViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCoinBalanceListViewModel.java @@ -1,15 +1,13 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import java.util.List; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.CryptoCoinBalance; -import cy.agorise.crystalwallet.models.CryptoNetAccount; -import cy.agorise.crystalwallet.models.CryptoNetBalance; /** * Created by Henry Varona on 27/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyEquivalenceListViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyEquivalenceListViewModel.java index 81a7a96..499d038 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyEquivalenceListViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyEquivalenceListViewModel.java @@ -1,14 +1,12 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.AndroidViewModel; import java.util.List; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.CryptoCurrencyEquivalence; -import cy.agorise.crystalwallet.models.CryptoNetBalance; /** * Created by Henry Varona on 27/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyEquivalenceViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyEquivalenceViewModel.java index 2261b0e..bb935da 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyEquivalenceViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyEquivalenceViewModel.java @@ -1,10 +1,8 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; - -import java.util.List; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.CryptoCurrencyEquivalence; diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyViewModel.java index fa6cc20..1b72d39 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoCurrencyViewModel.java @@ -1,12 +1,10 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.AndroidViewModel; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.CryptoCurrency; -import cy.agorise.crystalwallet.models.CryptoCurrencyEquivalence; /** * Created by Henry Varona on 4/11/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetAccountListViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetAccountListViewModel.java index 9945c33..4412d8f 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetAccountListViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetAccountListViewModel.java @@ -1,13 +1,12 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import java.util.List; import cy.agorise.crystalwallet.dao.CrystalDatabase; -import cy.agorise.crystalwallet.models.CryptoCoinBalance; import cy.agorise.crystalwallet.models.CryptoNetAccount; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetAccountViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetAccountViewModel.java index f27d6ef..3e2966b 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetAccountViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetAccountViewModel.java @@ -1,13 +1,10 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; - -import java.util.List; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import cy.agorise.crystalwallet.dao.CrystalDatabase; -import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.models.CryptoNetAccount; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetBalanceListViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetBalanceListViewModel.java index b0452a2..bf09657 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetBalanceListViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/CryptoNetBalanceListViewModel.java @@ -1,13 +1,12 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import java.util.List; import cy.agorise.crystalwallet.dao.CrystalDatabase; -import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.models.CryptoNetBalance; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/GeneralSettingListViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/GeneralSettingListViewModel.java index 0a171ba..4860c2a 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/GeneralSettingListViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/GeneralSettingListViewModel.java @@ -1,14 +1,12 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; -import android.arch.paging.PagedList; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import java.util.List; import cy.agorise.crystalwallet.dao.CrystalDatabase; -import cy.agorise.crystalwallet.models.CryptoCoinTransaction; import cy.agorise.crystalwallet.models.GeneralSetting; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/GrapheneAccountInfoViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/GrapheneAccountInfoViewModel.java index 950d563..f75f58a 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/GrapheneAccountInfoViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/GrapheneAccountInfoViewModel.java @@ -1,12 +1,10 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; import cy.agorise.crystalwallet.dao.CrystalDatabase; -import cy.agorise.crystalwallet.models.CryptoNetAccount; -import cy.agorise.crystalwallet.models.GrapheneAccount; import cy.agorise.crystalwallet.models.GrapheneAccountInfo; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/TransactionListViewModel.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/TransactionListViewModel.java index 706cf6d..7f1f182 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/TransactionListViewModel.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/TransactionListViewModel.java @@ -1,11 +1,11 @@ package cy.agorise.crystalwallet.viewmodels; import android.app.Application; -import android.arch.lifecycle.AndroidViewModel; -import android.arch.lifecycle.LiveData; -import android.arch.paging.DataSource; -import android.arch.paging.LivePagedListBuilder; -import android.arch.paging.PagedList; +import androidx.lifecycle.AndroidViewModel; +import androidx.lifecycle.LiveData; +import androidx.paging.DataSource; +import androidx.paging.LivePagedListBuilder; +import androidx.paging.PagedList; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.CryptoCoinTransactionExtended; diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/ContactNameValidationField.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/ContactNameValidationField.java index 1156511..cb70721 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/ContactNameValidationField.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/ContactNameValidationField.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.viewmodels.validators.validationfields; -import android.arch.lifecycle.ViewModelProviders; -import android.support.v4.app.FragmentActivity; +import androidx.lifecycle.ViewModelProviders; +import androidx.fragment.app.FragmentActivity; import android.widget.EditText; import cy.agorise.crystalwallet.models.Contact; diff --git a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/CurrentPinValidationField.java b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/CurrentPinValidationField.java index 7877184..5fd96ee 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/CurrentPinValidationField.java +++ b/app/src/main/java/cy/agorise/crystalwallet/viewmodels/validators/validationfields/CurrentPinValidationField.java @@ -1,12 +1,11 @@ package cy.agorise.crystalwallet.viewmodels.validators.validationfields; -import android.arch.lifecycle.LifecycleOwner; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentActivity; +import androidx.lifecycle.LifecycleOwner; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; +import androidx.annotation.Nullable; +import androidx.fragment.app.FragmentActivity; import android.widget.EditText; import java.util.List; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedListAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedListAdapter.java index 8208deb..eb36022 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedListAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedListAdapter.java @@ -1,15 +1,12 @@ package cy.agorise.crystalwallet.views; - -import android.arch.paging.PagedListAdapter; -import android.support.v7.recyclerview.extensions.ListAdapter; +import androidx.recyclerview.widget.ListAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.models.AccountSeed; -import cy.agorise.crystalwallet.models.CryptoCoinTransaction; /** * Created by Henry Varona on 11/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedListView.java b/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedListView.java index 4cbf669..1596e9d 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedListView.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedListView.java @@ -1,9 +1,8 @@ package cy.agorise.crystalwallet.views; -import android.arch.paging.PagedList; import android.content.Context; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; @@ -13,9 +12,7 @@ import java.util.List; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.models.AccountSeed; -import cy.agorise.crystalwallet.models.CryptoCoinTransaction; import cy.agorise.crystalwallet.viewmodels.AccountSeedListViewModel; -import cy.agorise.crystalwallet.viewmodels.TransactionListViewModel; /** * Created by Henry Varona on 10/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedViewHolder.java b/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedViewHolder.java index f25d932..0f3e34e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedViewHolder.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/AccountSeedViewHolder.java @@ -2,16 +2,13 @@ package cy.agorise.crystalwallet.views; import android.content.Context; import android.content.Intent; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.TextView; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.activities.AccountSeedSettingsActivity; -import cy.agorise.crystalwallet.activities.BackupSeedActivity; -import cy.agorise.crystalwallet.activities.SettingsActivity; import cy.agorise.crystalwallet.models.AccountSeed; -import cy.agorise.crystalwallet.models.CryptoCoinTransaction; /** * Created by Henry Varona on 17/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/ContactAddressListAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/ContactAddressListAdapter.java index 1be39eb..a1afc1d 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/ContactAddressListAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/ContactAddressListAdapter.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.views; -import android.support.v7.recyclerview.extensions.ListAdapter; +import androidx.recyclerview.widget.ListAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/ContactAddressViewHolder.java b/app/src/main/java/cy/agorise/crystalwallet/views/ContactAddressViewHolder.java index 711c9ab..e801044 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/ContactAddressViewHolder.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/ContactAddressViewHolder.java @@ -1,23 +1,17 @@ package cy.agorise.crystalwallet.views; import android.content.Context; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.text.Editable; import android.text.TextWatcher; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.EditText; -import android.widget.ImageView; import android.widget.Spinner; -import android.widget.TextView; - -import java.util.ArrayList; -import java.util.List; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.enums.CryptoNet; -import cy.agorise.crystalwallet.models.Contact; import cy.agorise.crystalwallet.models.ContactAddress; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/ContactListAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/ContactListAdapter.java index bc502a3..3b83766 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/ContactListAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/ContactListAdapter.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.views; -import android.support.v7.recyclerview.extensions.ListAdapter; +import androidx.recyclerview.widget.ListAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/ContactSelectionListAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/ContactSelectionListAdapter.java index 58f1350..7362610 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/ContactSelectionListAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/ContactSelectionListAdapter.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.views; -import android.support.v7.recyclerview.extensions.ListAdapter; +import androidx.recyclerview.widget.ListAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/ContactSelectionViewHolder.java b/app/src/main/java/cy/agorise/crystalwallet/views/ContactSelectionViewHolder.java index a86406f..ef5e2c2 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/ContactSelectionViewHolder.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/ContactSelectionViewHolder.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.views; import android.content.Context; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/ContactViewHolder.java b/app/src/main/java/cy/agorise/crystalwallet/views/ContactViewHolder.java index d713b14..2c97df2 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/ContactViewHolder.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/ContactViewHolder.java @@ -3,8 +3,8 @@ package cy.agorise.crystalwallet.views; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; -import android.support.v7.app.AlertDialog; -import android.support.v7.widget.RecyclerView; +import androidx.appcompat.app.AlertDialog; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceListAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceListAdapter.java index 8d43915..2894fef 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceListAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceListAdapter.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.views; -import android.support.v7.recyclerview.extensions.ListAdapter; +import androidx.recyclerview.widget.ListAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceListView.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceListView.java index f087fc5..6f15c6d 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceListView.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceListView.java @@ -1,8 +1,8 @@ package cy.agorise.crystalwallet.views; import android.content.Context; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; @@ -12,7 +12,6 @@ import java.util.List; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.models.CryptoCoinBalance; -import cy.agorise.crystalwallet.viewmodels.CryptoCoinBalanceListViewModel; /** * Created by Henry Varona on 10/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceViewHolder.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceViewHolder.java index f6d3b3d..6cf5d22 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceViewHolder.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoCoinBalanceViewHolder.java @@ -1,18 +1,17 @@ package cy.agorise.crystalwallet.views; -import android.arch.lifecycle.LifecycleOwner; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; +import androidx.lifecycle.LifecycleOwner; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; import android.content.Context; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.Nullable; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.TextView; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.dao.CrystalDatabase; import cy.agorise.crystalwallet.models.CryptoCoinBalance; -import cy.agorise.crystalwallet.models.CryptoCoinTransaction; import cy.agorise.crystalwallet.models.CryptoCurrency; import cy.agorise.crystalwallet.models.CryptoCurrencyEquivalence; import cy.agorise.crystalwallet.models.GeneralSetting; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountAdapter.java index e08d0ae..49a16be 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountAdapter.java @@ -1,8 +1,6 @@ package cy.agorise.crystalwallet.views; -import android.arch.lifecycle.ViewModelProviders; import android.content.Context; -import android.support.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -13,9 +11,7 @@ import android.widget.TextView; import java.util.List; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.models.CryptoCurrency; import cy.agorise.crystalwallet.models.CryptoNetAccount; -import cy.agorise.crystalwallet.viewmodels.AccountSeedListViewModel; /** * Created by Henry Varona on 01/20/2018. diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountListAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountListAdapter.java index b15f42e..c3268d9 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountListAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountListAdapter.java @@ -1,13 +1,12 @@ package cy.agorise.crystalwallet.views; -import android.support.v7.recyclerview.extensions.ListAdapter; +import androidx.recyclerview.widget.ListAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.models.CryptoNetAccount; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountListView.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountListView.java index 3e61f08..e5b201e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountListView.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountListView.java @@ -1,8 +1,8 @@ package cy.agorise.crystalwallet.views; import android.content.Context; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; import android.util.AttributeSet; import android.view.LayoutInflater; import android.view.View; @@ -11,9 +11,7 @@ import android.widget.RelativeLayout; import java.util.List; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.models.CryptoNetAccount; -import cy.agorise.crystalwallet.viewmodels.AccountSeedListViewModel; import cy.agorise.crystalwallet.viewmodels.CryptoNetAccountListViewModel; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountViewHolder.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountViewHolder.java index 4a24698..8f87888 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountViewHolder.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetAccountViewHolder.java @@ -2,14 +2,12 @@ package cy.agorise.crystalwallet.views; import android.content.Context; import android.content.Intent; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.TextView; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.activities.BackupSeedActivity; import cy.agorise.crystalwallet.activities.CryptoNetAccountSettingsActivity; -import cy.agorise.crystalwallet.models.AccountSeed; import cy.agorise.crystalwallet.models.CryptoNetAccount; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetBalanceListAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetBalanceListAdapter.java index 76b0f55..b4f8f98 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetBalanceListAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetBalanceListAdapter.java @@ -1,16 +1,15 @@ package cy.agorise.crystalwallet.views; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; -import android.support.v7.recyclerview.extensions.ListAdapter; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.ListAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import cy.agorise.crystalwallet.R; import cy.agorise.crystalwallet.models.CryptoNetBalance; -import cy.agorise.crystalwallet.viewmodels.CryptoCoinBalanceListViewModel; /** * Created by Henry Varona on 11/9/2017. diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetBalanceViewHolder.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetBalanceViewHolder.java index 0e2e900..b9842d0 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetBalanceViewHolder.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetBalanceViewHolder.java @@ -1,14 +1,14 @@ package cy.agorise.crystalwallet.views; import android.content.Context; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.arch.lifecycle.LifecycleOwner; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; -import android.arch.lifecycle.ViewModelProviders; -import android.support.v4.app.FragmentTransaction; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.lifecycle.LifecycleOwner; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.Observer; +import androidx.lifecycle.ViewModelProviders; +import androidx.fragment.app.FragmentTransaction; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.Button; import android.widget.ImageView; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetSelectionListAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetSelectionListAdapter.java index efed1ae..b693a43 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetSelectionListAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetSelectionListAdapter.java @@ -1,23 +1,18 @@ package cy.agorise.crystalwallet.views; -import android.support.annotation.NonNull; -import android.support.v7.recyclerview.extensions.ListAdapter; -import android.support.v7.util.DiffUtil; +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.ListAdapter; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.TextView; -import android.widget.Toast; - -import org.tukaani.xz.check.Check; import java.util.ArrayList; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.models.CryptoCoinBalance; import cy.agorise.crystalwallet.models.CryptoNetSelection; /** diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetSelectionViewHolder.java b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetSelectionViewHolder.java index e079993..1773a4e 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetSelectionViewHolder.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/CryptoNetSelectionViewHolder.java @@ -1,22 +1,13 @@ package cy.agorise.crystalwallet.views; -import android.arch.lifecycle.LifecycleOwner; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.Observer; import android.content.Context; -import android.support.annotation.Nullable; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.CheckBox; import android.widget.TextView; import cy.agorise.crystalwallet.R; -import cy.agorise.crystalwallet.dao.CrystalDatabase; -import cy.agorise.crystalwallet.models.CryptoCoinBalance; -import cy.agorise.crystalwallet.models.CryptoCurrency; -import cy.agorise.crystalwallet.models.CryptoCurrencyEquivalence; import cy.agorise.crystalwallet.models.CryptoNetSelection; -import cy.agorise.crystalwallet.models.GeneralSetting; /** * Created by Henry Varona on 10/30/2018. diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/TimeZoneAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/TimeZoneAdapter.java index e6c8e69..37d3db3 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/TimeZoneAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/TimeZoneAdapter.java @@ -1,8 +1,8 @@ package cy.agorise.crystalwallet.views; import android.content.Context; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/TransactionListAdapter.java b/app/src/main/java/cy/agorise/crystalwallet/views/TransactionListAdapter.java index ae8d482..a300ec9 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/TransactionListAdapter.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/TransactionListAdapter.java @@ -1,8 +1,8 @@ package cy.agorise.crystalwallet.views; -import android.arch.paging.PagedListAdapter; -import android.support.annotation.NonNull; -import android.support.v4.app.Fragment; +import androidx.paging.PagedListAdapter; +import androidx.annotation.NonNull; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/TransactionViewHolder.java b/app/src/main/java/cy/agorise/crystalwallet/views/TransactionViewHolder.java index 4a3a14a..4dddce7 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/TransactionViewHolder.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/TransactionViewHolder.java @@ -1,17 +1,15 @@ package cy.agorise.crystalwallet.views; -import android.arch.lifecycle.LiveData; -import android.arch.lifecycle.ViewModelProviders; +import androidx.lifecycle.LiveData; +import androidx.lifecycle.ViewModelProviders; import android.content.Context; import android.content.Intent; -import android.support.v4.app.Fragment; -import android.support.v7.widget.RecyclerView; +import androidx.fragment.app.Fragment; +import androidx.recyclerview.widget.RecyclerView; import android.view.View; import android.widget.ImageView; import android.widget.TextView; -import org.apache.commons.codec.binary.StringUtils; - import java.text.DateFormat; import java.text.DecimalFormat; import java.text.SimpleDateFormat; diff --git a/app/src/main/java/cy/agorise/crystalwallet/views/natives/CustomTextInputEditText.java b/app/src/main/java/cy/agorise/crystalwallet/views/natives/CustomTextInputEditText.java index 219444b..ceb18da 100644 --- a/app/src/main/java/cy/agorise/crystalwallet/views/natives/CustomTextInputEditText.java +++ b/app/src/main/java/cy/agorise/crystalwallet/views/natives/CustomTextInputEditText.java @@ -1,7 +1,7 @@ package cy.agorise.crystalwallet.views.natives; import android.content.Context; -import android.support.design.widget.TextInputEditText; +import com.google.android.material.textfield.TextInputEditText; import android.util.AttributeSet; import android.view.View; diff --git a/app/src/main/res/layout/account_seed_activity_settings.xml b/app/src/main/res/layout/account_seed_activity_settings.xml index f6a268d..8c1a96e 100644 --- a/app/src/main/res/layout/account_seed_activity_settings.xml +++ b/app/src/main/res/layout/account_seed_activity_settings.xml @@ -1,5 +1,5 @@ - - - - @@ -75,39 +75,39 @@ app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toTopOf="parent" /> - + - + - - - - + - + - - + diff --git a/app/src/main/res/layout/account_seed_list.xml b/app/src/main/res/layout/account_seed_list.xml index ca509d3..5d8fa3f 100644 --- a/app/src/main/res/layout/account_seed_list.xml +++ b/app/src/main/res/layout/account_seed_list.xml @@ -5,7 +5,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content"> - - - - + - + diff --git a/app/src/main/res/layout/activity_create_contact.xml b/app/src/main/res/layout/activity_create_contact.xml index c4b0a50..02884b4 100644 --- a/app/src/main/res/layout/activity_create_contact.xml +++ b/app/src/main/res/layout/activity_create_contact.xml @@ -1,5 +1,5 @@ - - - - +