From d720b3d28b41ad7b9ede4b10c90e5731ccdcdc96 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 17 Feb 2020 00:26:03 -0500 Subject: [PATCH] Update Installer to AndroidX --- app/build.gradle | 7 ++++--- app/src/main/AndroidManifest.xml | 2 +- .../com/MartyrPher/smapiandroidinstaller/ApkInstall.java | 3 +-- .../MartyrPher/smapiandroidinstaller/ConfigAdapter.java | 2 +- .../com/MartyrPher/smapiandroidinstaller/DialogFrag.java | 9 +-------- .../MartyrPher/smapiandroidinstaller/GitHubFragment.java | 6 +++--- .../smapiandroidinstaller/InstallFragment.java | 6 +++--- .../com/MartyrPher/smapiandroidinstaller/TabAdapter.java | 8 ++++---- app/src/main/res/layout/activity_main.xml | 5 +++-- app/src/main/res/layout/config_editing.xml | 5 ++--- app/src/main/res/layout/config_view.xml | 4 ++-- app/src/main/res/layout/github_layout.xml | 4 ++-- app/src/main/res/layout/view_pager.xml | 8 ++++---- gradle.properties | 2 ++ 14 files changed, 33 insertions(+), 38 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 484c45d..1e8e030 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -21,14 +21,15 @@ android { } dependencies { - implementation 'com.android.support:appcompat-v7:28.0.0-alpha1' - implementation 'com.android.support.constraint:constraint-layout:1.1.3' - implementation 'com.android.support:design:28.0.0' + implementation 'androidx.appcompat:appcompat:1.1.0' + implementation 'androidx.constraintlayout:constraintlayout:1.1.3' + implementation 'com.google.android.material:material:1.1.0' implementation 'com.madgag.spongycastle:core:1.54.0.0' implementation 'com.madgag.spongycastle:prov:1.54.0.0' implementation 'com.madgag.spongycastle:pkix:1.54.0.0' implementation 'com.madgag.spongycastle:pg:1.54.0.0' implementation 'commons-io:commons-io:2.5' + implementation 'androidx.recyclerview:recyclerview:1.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index f062f99..b48b7ae 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -23,7 +23,7 @@ diff --git a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/ApkInstall.java b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/ApkInstall.java index d696cb5..1904b0f 100644 --- a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/ApkInstall.java +++ b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/ApkInstall.java @@ -6,8 +6,7 @@ import android.content.Intent; import android.net.Uri; import android.os.Build; import android.os.Environment; -import android.support.v4.content.FileProvider; - +import androidx.core.content.FileProvider; import java.io.File; /** diff --git a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/ConfigAdapter.java b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/ConfigAdapter.java index 5413fe2..1d1c873 100644 --- a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/ConfigAdapter.java +++ b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/ConfigAdapter.java @@ -1,6 +1,6 @@ package com.MartyrPher.smapiandroidinstaller; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/DialogFrag.java b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/DialogFrag.java index 8f5ba7c..98f5d65 100644 --- a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/DialogFrag.java +++ b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/DialogFrag.java @@ -1,21 +1,14 @@ package com.MartyrPher.smapiandroidinstaller; import android.app.AlertDialog; -import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; -import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; +import androidx.fragment.app.DialogFragment; import android.view.LayoutInflater; import android.view.View; import android.widget.ProgressBar; import android.widget.TextView; -import java.util.Random; -import java.util.concurrent.TimeUnit; - /** * The dialog that is shown in different situations */ diff --git a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/GitHubFragment.java b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/GitHubFragment.java index ee3ad69..f85288c 100644 --- a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/GitHubFragment.java +++ b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/GitHubFragment.java @@ -3,9 +3,9 @@ package com.MartyrPher.smapiandroidinstaller; import android.content.Intent; import android.net.Uri; import android.os.Bundle; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/InstallFragment.java b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/InstallFragment.java index 3fb32b4..91c3d66 100644 --- a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/InstallFragment.java +++ b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/InstallFragment.java @@ -2,9 +2,9 @@ package com.MartyrPher.smapiandroidinstaller; import android.os.Bundle; import android.os.Environment; -import android.support.annotation.NonNull; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; diff --git a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/TabAdapter.java b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/TabAdapter.java index ac07cb8..53a95ad 100644 --- a/app/src/main/java/com/MartyrPher/smapiandroidinstaller/TabAdapter.java +++ b/app/src/main/java/com/MartyrPher/smapiandroidinstaller/TabAdapter.java @@ -1,9 +1,9 @@ package com.MartyrPher.smapiandroidinstaller; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentStatePagerAdapter; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentStatePagerAdapter; import java.util.ArrayList; import java.util.List; diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index ddea5fd..8c26d4f 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,5 +1,6 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/config_editing.xml b/app/src/main/res/layout/config_editing.xml index 9ec1caf..359002f 100644 --- a/app/src/main/res/layout/config_editing.xml +++ b/app/src/main/res/layout/config_editing.xml @@ -1,9 +1,8 @@ - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/config_view.xml b/app/src/main/res/layout/config_view.xml index 4b74bf3..02c1c96 100644 --- a/app/src/main/res/layout/config_view.xml +++ b/app/src/main/res/layout/config_view.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/github_layout.xml b/app/src/main/res/layout/github_layout.xml index a9c9632..7c97f9b 100644 --- a/app/src/main/res/layout/github_layout.xml +++ b/app/src/main/res/layout/github_layout.xml @@ -1,5 +1,5 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/app/src/main/res/layout/view_pager.xml b/app/src/main/res/layout/view_pager.xml index c87305d..7a5fc51 100644 --- a/app/src/main/res/layout/view_pager.xml +++ b/app/src/main/res/layout/view_pager.xml @@ -6,7 +6,7 @@ android:layout_height="match_parent" android:orientation="vertical"> - - + - - + diff --git a/gradle.properties b/gradle.properties index 82618ce..dfcfddc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -7,6 +7,8 @@ # Specifies the JVM arguments used for the daemon process. # The setting is particularly useful for tweaking memory settings. org.gradle.jvmargs=-Xmx1536m +android.enableJetifier=true +android.useAndroidX=true # When configured, Gradle will run in incubating parallel mode. # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects