Skip to content

Commit

Permalink
Migrate to AndroidX
Browse files Browse the repository at this point in the history
  • Loading branch information
XaBbl4 committed Mar 28, 2020
1 parent 541aa0b commit 660ce21
Show file tree
Hide file tree
Showing 216 changed files with 895 additions and 808 deletions.
28 changes: 13 additions & 15 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ repositories {
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileSdkVersion 29
buildToolsVersion '29.0.2'
defaultConfig {
applicationId "com.yoshione.fingen"
minSdkVersion 21
targetSdkVersion 28
versionCode 132
versionName "2.6.4.2"
resValue "string", "app_name", "Fingen"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

lintOptions {
Expand Down Expand Up @@ -97,13 +97,11 @@ android {
}
}

def support = '28.0.0'
def retrofit = '2.4.0'
def dagger = '2.16'
def butterKnife = "8.8.1"
def butterKnife = "10.0.0"

dependencies {
implementation "com.android.support:support-annotations:$support"
repositories {
mavenCentral()
}
Expand All @@ -114,14 +112,14 @@ dependencies {
implementation(name: 'HeaderDecor-0.2.7', ext: 'aar')
annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:3.1.0'
implementation 'com.airbnb.android:airmapview:1.6.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation "com.android.support:cardview-v7:$support"
implementation "com.android.support:design:$support"
implementation "com.android.support:preference-v7:$support"
implementation "com.android.support:recyclerview-v7:$support"
implementation "com.android.support:support-annotations:$support"
implementation "com.android.support:support-v13:$support"
implementation 'com.google.android.gms:play-services-vision:10.2.4'
implementation 'androidx.annotation:annotation:1.1.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.preference:preference:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation "com.google.android.gms:play-services-maps:17.0.0"
implementation "com.google.android.gms:play-services-vision:19.0.0"
implementation 'com.dropbox.core:dropbox-core-sdk:3.0.6'
implementation 'com.evernote:android-job:1.2.5'
implementation 'com.github.angads25:filepicker:1.1.1'
Expand All @@ -145,7 +143,7 @@ dependencies {
implementation('com.mikepenz:materialdrawer:6.0.7@aar') { transitive = true }
androidTestImplementation 'junit:junit:4.13'
androidTestImplementation 'org.hamcrest:hamcrest-library:2.2'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'

implementation "com.squareup.retrofit2:converter-gson:$retrofit"
Expand Down
2 changes: 0 additions & 2 deletions app/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@
-keep public class com.evernote.android.job.JobRescheduleService
-keep public class com.evernote.android.job.gcm.PlatformGcmService

-keep class android.support.v7.widget.SearchView { *; }

-dontwarn com.sothree.**
-keep class com.sothree.**
-keep interface com.sothree.**
7 changes: 4 additions & 3 deletions app/src/main/java/com/yoshione/fingen/ActivityAbout.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import com.yoshione.fingen.widgets.ToolbarActivity;

import java.lang.ref.WeakReference;
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/java/com/yoshione/fingen/ActivityAccounts.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.preference.PreferenceManager;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentTransaction;
import androidx.preference.PreferenceManager;

import com.yoshione.fingen.interfaces.IAbstractModel;
import com.yoshione.fingen.model.Account;
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/java/com/yoshione/fingen/ActivityAdditional.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;

import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;

import com.yoshione.fingen.adapter.AdapterMenuItems;
import com.yoshione.fingen.model.MenuItem;
import com.yoshione.fingen.widgets.ToolbarActivity;
Expand Down
19 changes: 10 additions & 9 deletions app/src/main/java/com/yoshione/fingen/ActivityBackup.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,6 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.SwitchCompat;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
Expand All @@ -30,12 +22,21 @@
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.SwitchCompat;
import androidx.preference.PreferenceManager;

import com.dropbox.core.DbxException;
import com.dropbox.core.android.Auth;
import com.dropbox.core.v2.DbxClientV2;
import com.dropbox.core.v2.files.FileMetadata;
import com.dropbox.core.v2.files.Metadata;
import com.dropbox.core.v2.users.FullAccount;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.textfield.TextInputLayout;
import com.yoshione.fingen.dropbox.DropboxClient;
import com.yoshione.fingen.dropbox.UploadTask;
import com.yoshione.fingen.dropbox.UserAccountTask;
Expand Down Expand Up @@ -296,7 +297,7 @@ void backupDB() {
@Override
public void onComplete() {
Toast.makeText(ActivityBackup.this, "File uploaded successfully", Toast.LENGTH_SHORT).show();
SharedPreferences preferences = android.support.v7.preference.PreferenceManager.getDefaultSharedPreferences(ActivityBackup.this);
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(ActivityBackup.this);
preferences.edit().putLong(FgConst.PREF_SHOW_LAST_SUCCESFUL_BACKUP_TO_DROPBOX, new Date().getTime()).apply();
initLastDropboxBackupField();
}
Expand Down
7 changes: 4 additions & 3 deletions app/src/main/java/com/yoshione/fingen/ActivityBudget.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
import android.annotation.SuppressLint;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.Log;

import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.viewpager.widget.ViewPager;

import com.yoshione.fingen.interfaces.IAbstractModel;
import com.yoshione.fingen.model.Cabbage;
import com.yoshione.fingen.model.Events;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.design.widget.TabLayout;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AlertDialog;
import android.widget.ArrayAdapter;
import android.widget.ListView;

import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentPagerAdapter;
import androidx.preference.PreferenceManager;
import androidx.viewpager.widget.ViewPager;

import com.google.android.material.tabs.TabLayout;
import com.yoshione.fingen.interfaces.IAbstractModel;
import com.yoshione.fingen.model.Credit;
import com.yoshione.fingen.model.MenuItem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.design.widget.TextInputLayout;
import android.support.v4.content.ContextCompat;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.AppCompatCheckBox;
import android.text.Editable;
import android.text.TextWatcher;
import android.util.Log;
Expand All @@ -18,6 +14,11 @@
import android.widget.EditText;
import android.widget.Toast;

import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.AppCompatCheckBox;
import androidx.core.content.ContextCompat;

import com.google.android.material.textfield.TextInputLayout;
import com.yoshione.fingen.dao.AccountsDAO;
import com.yoshione.fingen.interfaces.IAbstractModel;
import com.yoshione.fingen.managers.AccountManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.content.ContextCompat;
import android.text.Editable;
import android.text.TextWatcher;
import android.view.Menu;
Expand All @@ -12,6 +11,8 @@
import android.widget.ImageButton;
import android.widget.Toast;

import androidx.core.content.ContextCompat;

import com.yoshione.fingen.adapter.NestedItemFullNameAdapter;
import com.yoshione.fingen.dao.CategoriesDAO;
import com.yoshione.fingen.dao.CreditsDAO;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.support.annotation.StringRes;
import android.support.v4.app.ActivityCompat;
import android.support.v7.app.AlertDialog;
import android.text.Editable;
import android.text.TextWatcher;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.core.app.ActivityCompat;

import com.airbnb.android.airmapview.AirMapMarker;
import com.airbnb.android.airmapview.AirMapView;
import com.airbnb.android.airmapview.listeners.OnCameraChangeListener;
Expand Down
33 changes: 17 additions & 16 deletions app/src/main/java/com/yoshione/fingen/ActivityEditTransaction.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,6 @@
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.StringRes;
import android.support.constraint.ConstraintLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.TabLayout;
import android.support.design.widget.TextInputLayout;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.text.Editable;
import android.text.Spannable;
import android.text.SpannableString;
Expand All @@ -52,6 +36,23 @@
import android.widget.TextView;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.preference.PreferenceManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager.widget.ViewPager;

import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.tabs.TabLayout;
import com.google.android.material.textfield.TextInputLayout;
import com.yoshione.fingen.adapter.AdapterProducts;
import com.yoshione.fingen.adapter.NestedItemFullNameAdapter;
import com.yoshione.fingen.dao.AccountsDAO;
Expand Down
11 changes: 6 additions & 5 deletions app/src/main/java/com/yoshione/fingen/ActivityExportCSV.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.design.widget.TextInputLayout;
import android.support.v7.app.AlertDialog;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
Expand All @@ -22,7 +17,13 @@
import android.widget.ProgressBar;
import android.widget.Toast;

import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.preference.PreferenceManager;

import com.github.angads25.filepicker.model.DialogConfigs;
import com.google.android.material.textfield.TextInputLayout;
import com.yoshione.fingen.csv.CsvImporter;
import com.yoshione.fingen.dao.TransactionsDAO;
import com.yoshione.fingen.interfaces.IProgressEventsListener;
Expand Down
12 changes: 7 additions & 5 deletions app/src/main/java/com/yoshione/fingen/ActivityImportCSV.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.preference.PreferenceManager;
import android.support.annotation.NonNull;
import android.support.annotation.StringRes;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.SwitchCompat;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
Expand All @@ -23,6 +18,13 @@
import com.github.angads25.filepicker.model.DialogConfigs;

import android.util.Log;

import androidx.annotation.NonNull;
import androidx.annotation.StringRes;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.widget.SwitchCompat;
import androidx.preference.PreferenceManager;

import com.yoshione.fingen.interfaces.IProgressEventsListener;
import com.yoshione.fingen.csv.CsvImporter;
import com.yoshione.fingen.utils.FileUtils;
Expand Down
Loading

0 comments on commit 660ce21

Please sign in to comment.