diff --git a/build-system/dependencies.gradle b/build-system/dependencies.gradle index 2e1ed057b..4db98a939 100644 --- a/build-system/dependencies.gradle +++ b/build-system/dependencies.gradle @@ -6,7 +6,8 @@ ext { buildToolsVersion = '28.0.3' // Libraries version - supportLibraryVersion = '28.0.0' + appCompatVersion = '1.2.0' + supportLibAndroidX = '1.0.0' playAuthVersion = '15.0.1' okHttpVersion = '3.10.0' retrofitVersion = '2.4.0' @@ -22,14 +23,15 @@ ext { smsVerifyVersion = '0.3.1' zxingVersion = '3.5.0' cardAndroidVersion = '5.5.1' + localizationVersion = '1.2.6' // TODO: Migrate to AndroidX supportLibraries = [ - appCompat : "com.android.support:appcompat-v7:${supportLibraryVersion}", - supportV4 : "com.android.support:support-v4:${supportLibraryVersion}", - recyclerview: "com.android.support:recyclerview-v7:${supportLibraryVersion}", - cardView : "com.android.support:cardview-v7:${supportLibraryVersion}", - design : "com.android.support:design:${supportLibraryVersion}", + appCompat : "androidx.appcompat:appcompat:$appCompatVersion", + supportV4 : "androidx.legacy:legacy-support-v4:$supportLibAndroidX", + recyclerview: "androidx.recyclerview:recyclerview:$supportLibAndroidX", + cardView : "androidx.cardview:cardview:$supportLibAndroidX", + design : "com.google.android.material:material:$supportLibAndroidX", ] playServicesLibraries = [ @@ -60,7 +62,7 @@ ext { mockitoVersion = '1.10.19' testLibraries = [ - runner : "com.android.support.test:runner:${testRunnerVersion}", + runner : 'androidx.test.ext:junit:1.1.1', powermock : "org.powermock:powermock-mockito-release-full:${powermockVersion}", junit : "junit:junit:${junitVersion}", mockito : "org.mockito:mockito-core:${mockitoVersion}", @@ -70,4 +72,8 @@ ext { powermockXstream : "org.powermock:powermock-classloading-xstream:${powermockVersion}", espresso : "com.android.support.test.espresso:espresso-core:${espressoVersion}", ] + + localizationLibraries = [ + localization: "com.akexorcist:localization:${localizationVersion}" + ] } diff --git a/build.gradle b/build.gradle index ec419d908..86c42738d 100644 --- a/build.gradle +++ b/build.gradle @@ -4,9 +4,10 @@ buildscript { repositories { maven { url 'https://maven.google.com' } jcenter() + google() } dependencies { - classpath 'com.android.tools.build:gradle:3.1.0' + classpath 'com.android.tools.build:gradle:3.2.0' classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6' } } @@ -17,6 +18,7 @@ allprojects { maven { url "https://maven.google.com" } maven { url "https://jitpack.io" } jcenter() + google() } project.plugins.whenPluginAdded { plugin -> @@ -32,4 +34,4 @@ allprojects { task clean(type: Delete) { delete rootProject.buildDir -} \ No newline at end of file +} diff --git a/corekit/build.gradle b/corekit/build.gradle index cf42e5556..7a260e4ce 100644 --- a/corekit/build.gradle +++ b/corekit/build.gradle @@ -13,7 +13,7 @@ android { versionCode 2 versionName versionSdk - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' buildConfigField "String", "CALLBACK_STRING", "\"/token/callback/\"" buildConfigField "String", "CALLBACK_URL", "\"https://hangout.betas.in/veritrans/api/paymentstatus\"" diff --git a/corekit/consumer-rules.pro b/corekit/consumer-rules.pro index c0c812ae6..83074dc10 100644 --- a/corekit/consumer-rules.pro +++ b/corekit/consumer-rules.pro @@ -55,13 +55,13 @@ -keep class com.midtrans.sdk.uikit.BuildConfig { *; } # http://stackoverflow.com/questions/29679177/cardview-shadow-not-appearing-in-lollipop-after-obfuscate-with-proguard/29698051 --keep class android.support.v7.widget.RoundRectDrawable { *; } +-keep class androidx.cardview.widget.RoundRectDrawable { *; } # keep public class android.support.v7.widget.** { *; } --keep public class android.support.v7.internal.widget.** { *; } --keep public class android.support.v7.internal.view.menu.** { *; } +-keep public class androidx.preference.internal.** { *; } +#-keep public class android.support.v7.internal.view.menu.** { *; } --keep public class * extends android.support.v4.view.ActionProvider { +-keep public class * extends androidx.core.view.ActionProvider { public (android.content.Context); } @@ -70,10 +70,10 @@ public void *(android.view.MenuItem); } --dontwarn android.support.design.** --keep class android.support.design.** { *; } --keep interface android.support.design.** { *; } --keep public class android.support.design.R$* { *; } +-dontwarn com.google.android.material.** +-keep class com.google.android.material.** { *; } +-keep interface com.google.android.material.** { *; } +-keep public class com.google.android.material.R$* { *; } # Retrofit 1.X @@ -230,4 +230,4 @@ public static final *** NULL; } # Retain declared checked exceptions for use by a Proxy instance. -keepattributes Exceptions --dontwarn javax.annotation.** \ No newline at end of file +-dontwarn javax.annotation.** diff --git a/corekit/proguard-rules.pro b/corekit/proguard-rules.pro index e2b3900fe..c677d8aeb 100644 --- a/corekit/proguard-rules.pro +++ b/corekit/proguard-rules.pro @@ -55,13 +55,13 @@ -keep class com.midtrans.sdk.uikit.BuildConfig { *; } # http://stackoverflow.com/questions/29679177/cardview-shadow-not-appearing-in-lollipop-after-obfuscate-with-proguard/29698051 --keep class android.support.v7.widget.RoundRectDrawable { *; } +-keep class androidx.cardview.widget.RoundRectDrawable { *; } # keep public class android.support.v7.widget.** { *; } --keep public class android.support.v7.internal.widget.** { *; } --keep public class android.support.v7.internal.view.menu.** { *; } +-keep public class androidx.preference.internal.** { *; } +#-keep public class android.support.v7.internal.view.menu.** { *; } --keep public class * extends android.support.v4.view.ActionProvider { +-keep public class * extends androidx.core.view.ActionProvider { public (android.content.Context); } @@ -70,10 +70,10 @@ public void *(android.view.MenuItem); } --dontwarn android.support.design.** --keep class android.support.design.** { *; } --keep interface android.support.design.** { *; } --keep public class android.support.design.R$* { *; } +-dontwarn com.google.android.material.** +-keep class com.google.android.material.** { *; } +-keep interface com.google.android.material.** { *; } +-keep public class com.google.android.material.R$* { *; } # Retrofit 1.X @@ -231,4 +231,4 @@ public static final *** NULL; } # Retain declared checked exceptions for use by a Proxy instance. -keepattributes Exceptions --dontwarn javax.annotation.** \ No newline at end of file +-dontwarn javax.annotation.** diff --git a/corekit/src/main/java/com/midtrans/sdk/corekit/core/MidtransSDK.java b/corekit/src/main/java/com/midtrans/sdk/corekit/core/MidtransSDK.java index 6faac3b84..12036d970 100644 --- a/corekit/src/main/java/com/midtrans/sdk/corekit/core/MidtransSDK.java +++ b/corekit/src/main/java/com/midtrans/sdk/corekit/core/MidtransSDK.java @@ -2,9 +2,10 @@ import android.app.Activity; import android.content.Context; -import android.support.annotation.NonNull; import android.text.TextUtils; +import androidx.annotation.NonNull; + import com.midtrans.sdk.analytics.MixpanelAnalyticsManager; import com.midtrans.sdk.corekit.BuildConfig; import com.midtrans.sdk.corekit.callback.BankBinsCallback; @@ -1905,4 +1906,4 @@ private boolean isTransactionRequestAvailable() { public String getLanguageCode() { return languageCode; } -} \ No newline at end of file +} diff --git a/corekit/src/main/java/com/midtrans/sdk/corekit/core/SdkCoreFlowBuilder.java b/corekit/src/main/java/com/midtrans/sdk/corekit/core/SdkCoreFlowBuilder.java index 0a82f43a4..546bf2745 100644 --- a/corekit/src/main/java/com/midtrans/sdk/corekit/core/SdkCoreFlowBuilder.java +++ b/corekit/src/main/java/com/midtrans/sdk/corekit/core/SdkCoreFlowBuilder.java @@ -1,7 +1,8 @@ package com.midtrans.sdk.corekit.core; import android.content.Context; -import android.support.annotation.NonNull; + +import androidx.annotation.NonNull; /** * Created by shivam on 10/20/15. @@ -75,4 +76,4 @@ public SdkCoreFlowBuilder setMerchantBaseUrl(String merchantBaseUrl) { this.merchantServerUrl = merchantBaseUrl; return this; } -} \ No newline at end of file +} diff --git a/corekit/src/main/java/com/midtrans/sdk/corekit/core/TransactionRequest.java b/corekit/src/main/java/com/midtrans/sdk/corekit/core/TransactionRequest.java index cdaad9baf..672288474 100644 --- a/corekit/src/main/java/com/midtrans/sdk/corekit/core/TransactionRequest.java +++ b/corekit/src/main/java/com/midtrans/sdk/corekit/core/TransactionRequest.java @@ -1,9 +1,9 @@ package com.midtrans.sdk.corekit.core; -import android.support.annotation.NonNull; import android.text.TextUtils; -import com.google.gson.annotations.SerializedName; +import androidx.annotation.NonNull; + import com.midtrans.sdk.corekit.models.BcaBankTransferRequestModel; import com.midtrans.sdk.corekit.models.BillInfoModel; import com.midtrans.sdk.corekit.models.BillingAddress; @@ -426,4 +426,4 @@ public Shopeepay getShopeepay() { public void setShopeepay(Shopeepay shopeepay) { this.shopeepay = shopeepay; } -} \ No newline at end of file +} diff --git a/corekit/src/main/java/com/midtrans/sdk/corekit/core/themes/ColorTheme.java b/corekit/src/main/java/com/midtrans/sdk/corekit/core/themes/ColorTheme.java index 8ea2a7e09..76f44fa2d 100644 --- a/corekit/src/main/java/com/midtrans/sdk/corekit/core/themes/ColorTheme.java +++ b/corekit/src/main/java/com/midtrans/sdk/corekit/core/themes/ColorTheme.java @@ -1,7 +1,7 @@ package com.midtrans.sdk.corekit.core.themes; import android.content.Context; -import android.support.v4.content.ContextCompat; +import androidx.core.content.ContextCompat; import com.midtrans.sdk.corekit.R; diff --git a/corekit/src/main/java/com/midtrans/sdk/corekit/models/snap/Authentication.java b/corekit/src/main/java/com/midtrans/sdk/corekit/models/snap/Authentication.java index 1f99cd406..0a489afc9 100644 --- a/corekit/src/main/java/com/midtrans/sdk/corekit/models/snap/Authentication.java +++ b/corekit/src/main/java/com/midtrans/sdk/corekit/models/snap/Authentication.java @@ -1,6 +1,6 @@ package com.midtrans.sdk.corekit.models.snap; -import android.support.annotation.StringDef; +import androidx.annotation.StringDef; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; @@ -17,4 +17,4 @@ String AUTH_3DS = "3ds"; String AUTH_NONE = "none"; String AUTH_RBA = "rba"; -} \ No newline at end of file +} diff --git a/corekit/src/main/java/com/midtrans/sdk/corekit/utilities/Utils.java b/corekit/src/main/java/com/midtrans/sdk/corekit/utilities/Utils.java index e6d79f2b1..70e0c21b6 100644 --- a/corekit/src/main/java/com/midtrans/sdk/corekit/utilities/Utils.java +++ b/corekit/src/main/java/com/midtrans/sdk/corekit/utilities/Utils.java @@ -9,11 +9,12 @@ import android.content.Context; import android.content.res.Resources; import android.net.ConnectivityManager; -import android.support.annotation.NonNull; import android.util.DisplayMetrics; import android.view.View; import android.view.inputmethod.InputMethodManager; +import androidx.annotation.NonNull; + import com.midtrans.sdk.corekit.core.Logger; import com.midtrans.sdk.corekit.models.snap.Authentication; @@ -272,4 +273,4 @@ public static String getDeviceType(Activity activity) { return deviceType; } -} \ No newline at end of file +} diff --git a/demo/build.gradle b/demo/build.gradle index 7f0fb44b1..48784eb4d 100644 --- a/demo/build.gradle +++ b/demo/build.gradle @@ -28,7 +28,7 @@ android { versionCode 4 versionName "1.21.0" - testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner' resValue "string", "app_name", "Midtrans Demo Dev" } @@ -96,6 +96,7 @@ dependencies { implementation supportLibraries.cardView implementation supportLibraries.design implementation libraries.swipeLayout + implementation localizationLibraries.localization implementation(libraries.crashlytics) { transitive = true } @@ -104,4 +105,4 @@ dependencies { exclude module: 'uikit' exclude module: 'corekit' } -} \ No newline at end of file +} diff --git a/demo/proguard-rules.pro b/demo/proguard-rules.pro index c052a5e99..0dca2e7aa 100644 --- a/demo/proguard-rules.pro +++ b/demo/proguard-rules.pro @@ -36,17 +36,17 @@ -keep class com.midtrans.sdk.coreflow.BuildConfig { *; } # Keep the support library --keep class android.support.v4.** { *; } --keep interface android.support.v4.** { *; } +-keep class androidx.legacy.** { *; } +-keep interface androidx.legacy.** { *; } # http://stackoverflow.com/questions/29679177/cardview-shadow-not-appearing-in-lollipop-after-obfuscate-with-proguard/29698051 --keep class android.support.v7.widget.RoundRectDrawable { *; } +-keep class androidx.cardview.widget.RoundRectDrawable { *; } # keep public class android.support.v7.widget.** { *; } --keep public class android.support.v7.internal.widget.** { *; } --keep public class android.support.v7.internal.view.menu.** { *; } +-keep public class androidx.preference.internal.** { *; } +#-keep public class android.support.v7.internal.view.menu.** { *; } --keep public class * extends android.support.v4.view.ActionProvider { +-keep public class * extends androidx.core.view.ActionProvider { public (android.content.Context); } @@ -59,10 +59,10 @@ *** get*(); } --dontwarn android.support.design.** --keep class android.support.design.** { *; } --keep interface android.support.design.** { *; } --keep public class android.support.design.R$* { *; } +-dontwarn com.google.android.material.** +-keep class com.google.android.material.** { *; } +-keep interface com.google.android.material.** { *; } +-keep public class com.google.android.material.R$* { *; } # Retrofit 1.X @@ -192,11 +192,11 @@ public static final *** NULL; } -keepclassmembers class * extends android.app.Activity { public void *(android.view.View); } --keepclassmembers class * extends android.support.v7.app.AppCompatActivity{ +-keepclassmembers class * extends androidx.appcompat.app.AppCompatActivity{ public void *(android.view.View); } --keepclassmembers public class * extends android.support.v4.app.Fragment{ +-keepclassmembers public class * extends androidx.legacy.app.Fragment{ public *** on*(...); public *** *Dialog(); public void *(android.view.View); -} \ No newline at end of file +} diff --git a/demo/src/main/java/com/midtrans/demo/CustomPermataVaInputDialogFragment.java b/demo/src/main/java/com/midtrans/demo/CustomPermataVaInputDialogFragment.java index e16b35b0b..a4af5b678 100644 --- a/demo/src/main/java/com/midtrans/demo/CustomPermataVaInputDialogFragment.java +++ b/demo/src/main/java/com/midtrans/demo/CustomPermataVaInputDialogFragment.java @@ -1,10 +1,11 @@ package com.midtrans.demo; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.TextInputLayout; -import android.support.v4.app.DialogFragment; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; + +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.textfield.TextInputLayout; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; diff --git a/demo/src/main/java/com/midtrans/demo/CustomVaInputDialogFragment.java b/demo/src/main/java/com/midtrans/demo/CustomVaInputDialogFragment.java index 5176efbcf..834aad6df 100644 --- a/demo/src/main/java/com/midtrans/demo/CustomVaInputDialogFragment.java +++ b/demo/src/main/java/com/midtrans/demo/CustomVaInputDialogFragment.java @@ -1,10 +1,11 @@ package com.midtrans.demo; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.design.widget.TextInputLayout; -import android.support.v4.app.DialogFragment; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; + +import com.google.android.material.appbar.AppBarLayout; +import com.google.android.material.textfield.TextInputLayout; import android.text.Editable; import android.text.InputFilter; import android.text.InputFilter.LengthFilter; diff --git a/demo/src/main/java/com/midtrans/demo/DemoAccountActivity.java b/demo/src/main/java/com/midtrans/demo/DemoAccountActivity.java index 03e1d9d83..10e368568 100644 --- a/demo/src/main/java/com/midtrans/demo/DemoAccountActivity.java +++ b/demo/src/main/java/com/midtrans/demo/DemoAccountActivity.java @@ -1,17 +1,15 @@ package com.midtrans.demo; -import android.content.Intent; import android.graphics.Color; import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.text.TextUtils; import android.view.View; -import android.widget.RelativeLayout; /** * Created by ziahaqi on 5/3/17. diff --git a/demo/src/main/java/com/midtrans/demo/DemoCardRegisterActivity.java b/demo/src/main/java/com/midtrans/demo/DemoCardRegisterActivity.java index e03481f4d..a0e3a3978 100644 --- a/demo/src/main/java/com/midtrans/demo/DemoCardRegisterActivity.java +++ b/demo/src/main/java/com/midtrans/demo/DemoCardRegisterActivity.java @@ -7,12 +7,12 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.TextInputEditText; -import android.support.design.widget.TextInputLayout; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import com.google.android.material.textfield.TextInputEditText; +import com.google.android.material.textfield.TextInputLayout; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; diff --git a/demo/src/main/java/com/midtrans/demo/DemoConfigActivity.java b/demo/src/main/java/com/midtrans/demo/DemoConfigActivity.java index d6d634afb..9a01f05a6 100644 --- a/demo/src/main/java/com/midtrans/demo/DemoConfigActivity.java +++ b/demo/src/main/java/com/midtrans/demo/DemoConfigActivity.java @@ -10,11 +10,11 @@ import android.os.Build; import android.os.Bundle; import android.os.Handler; -import android.support.annotation.Nullable; -import android.support.annotation.RequiresApi; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.AppCompatRadioButton; +import androidx.annotation.Nullable; +import androidx.annotation.RequiresApi; +import androidx.appcompat.widget.AppCompatRadioButton; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; import android.text.TextUtils; import android.view.View; import android.widget.*; diff --git a/demo/src/main/java/com/midtrans/demo/DemoImageAdapter.java b/demo/src/main/java/com/midtrans/demo/DemoImageAdapter.java index 188ed5169..d5c69620b 100644 --- a/demo/src/main/java/com/midtrans/demo/DemoImageAdapter.java +++ b/demo/src/main/java/com/midtrans/demo/DemoImageAdapter.java @@ -1,8 +1,8 @@ package com.midtrans.demo; -import android.support.v4.app.Fragment; -import android.support.v4.app.FragmentManager; -import android.support.v4.app.FragmentPagerAdapter; +import androidx.fragment.app.Fragment; +import androidx.fragment.app.FragmentManager; +import androidx.fragment.app.FragmentPagerAdapter; /** * Created by rakawm on 3/15/17. diff --git a/demo/src/main/java/com/midtrans/demo/DemoOrderReviewActivity.java b/demo/src/main/java/com/midtrans/demo/DemoOrderReviewActivity.java index a9704610e..e5d1bdfa1 100644 --- a/demo/src/main/java/com/midtrans/demo/DemoOrderReviewActivity.java +++ b/demo/src/main/java/com/midtrans/demo/DemoOrderReviewActivity.java @@ -5,12 +5,12 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.TextInputEditText; -import android.support.v4.app.TaskStackBuilder; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import com.google.android.material.textfield.TextInputEditText; +import androidx.core.app.TaskStackBuilder; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.text.TextUtils; import android.view.View; import android.view.View.OnClickListener; diff --git a/demo/src/main/java/com/midtrans/demo/DemoProductListActivity.java b/demo/src/main/java/com/midtrans/demo/DemoProductListActivity.java index 5ec829094..2e401c779 100644 --- a/demo/src/main/java/com/midtrans/demo/DemoProductListActivity.java +++ b/demo/src/main/java/com/midtrans/demo/DemoProductListActivity.java @@ -5,11 +5,11 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.CardView; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.cardview.widget.CardView; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.text.TextUtils; import android.view.View; import android.widget.ImageView; diff --git a/demo/src/main/java/com/midtrans/demo/DemoProductPageActivity.java b/demo/src/main/java/com/midtrans/demo/DemoProductPageActivity.java index badf15e86..112a257d0 100644 --- a/demo/src/main/java/com/midtrans/demo/DemoProductPageActivity.java +++ b/demo/src/main/java/com/midtrans/demo/DemoProductPageActivity.java @@ -5,11 +5,11 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v4.view.ViewPager; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.viewpager.widget.ViewPager; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.Toolbar; import android.text.TextUtils; import android.view.View; import android.widget.TextView; diff --git a/demo/src/main/java/com/midtrans/demo/EntryActivity.java b/demo/src/main/java/com/midtrans/demo/EntryActivity.java index b665828de..69835d6cf 100644 --- a/demo/src/main/java/com/midtrans/demo/EntryActivity.java +++ b/demo/src/main/java/com/midtrans/demo/EntryActivity.java @@ -1,6 +1,6 @@ package com.midtrans.demo; -import android.support.v7.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; diff --git a/demo/src/main/java/com/midtrans/demo/GopayStatusActivity.java b/demo/src/main/java/com/midtrans/demo/GopayStatusActivity.java index 6c4942fad..105a0ba81 100644 --- a/demo/src/main/java/com/midtrans/demo/GopayStatusActivity.java +++ b/demo/src/main/java/com/midtrans/demo/GopayStatusActivity.java @@ -2,9 +2,9 @@ import android.os.Build; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; +import androidx.annotation.Nullable; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; import android.text.TextUtils; import android.view.View; import android.widget.FrameLayout; diff --git a/demo/src/main/java/com/midtrans/demo/ImageFragment.java b/demo/src/main/java/com/midtrans/demo/ImageFragment.java index 1c30f3011..1d2479bad 100644 --- a/demo/src/main/java/com/midtrans/demo/ImageFragment.java +++ b/demo/src/main/java/com/midtrans/demo/ImageFragment.java @@ -1,8 +1,8 @@ package com.midtrans.demo; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.Fragment; +import androidx.annotation.Nullable; +import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/demo/src/main/java/com/midtrans/demo/InstallmentDialogFragment.java b/demo/src/main/java/com/midtrans/demo/InstallmentDialogFragment.java index ec3c2bd1b..ea892aabc 100644 --- a/demo/src/main/java/com/midtrans/demo/InstallmentDialogFragment.java +++ b/demo/src/main/java/com/midtrans/demo/InstallmentDialogFragment.java @@ -1,8 +1,9 @@ package com.midtrans.demo; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.v4.app.DialogFragment; +import androidx.annotation.Nullable; +import androidx.fragment.app.DialogFragment; + import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; diff --git a/demo/src/main/java/com/midtrans/demo/SavedCardsAdapter.java b/demo/src/main/java/com/midtrans/demo/SavedCardsAdapter.java index e3eb6dea3..18d9b6722 100644 --- a/demo/src/main/java/com/midtrans/demo/SavedCardsAdapter.java +++ b/demo/src/main/java/com/midtrans/demo/SavedCardsAdapter.java @@ -1,7 +1,7 @@ package com.midtrans.demo; import android.content.Context; -import android.support.v7.widget.RecyclerView; +import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; diff --git a/demo/src/main/java/com/midtrans/demo/SelectPaymentMethodAdapter.java b/demo/src/main/java/com/midtrans/demo/SelectPaymentMethodAdapter.java index aabd722de..6e583b074 100644 --- a/demo/src/main/java/com/midtrans/demo/SelectPaymentMethodAdapter.java +++ b/demo/src/main/java/com/midtrans/demo/SelectPaymentMethodAdapter.java @@ -2,8 +2,8 @@ import android.content.res.ColorStateList; import android.graphics.Color; -import android.support.v7.widget.AppCompatCheckBox; -import android.support.v7.widget.RecyclerView; +import androidx.appcompat.widget.AppCompatCheckBox; +import androidx.recyclerview.widget.RecyclerView; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; diff --git a/demo/src/main/java/com/midtrans/demo/SelectPaymentMethodDialogFragment.java b/demo/src/main/java/com/midtrans/demo/SelectPaymentMethodDialogFragment.java index 0260184c2..1ab79f074 100644 --- a/demo/src/main/java/com/midtrans/demo/SelectPaymentMethodDialogFragment.java +++ b/demo/src/main/java/com/midtrans/demo/SelectPaymentMethodDialogFragment.java @@ -1,11 +1,12 @@ package com.midtrans.demo; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.AppBarLayout; -import android.support.v4.app.DialogFragment; -import android.support.v7.widget.LinearLayoutManager; -import android.support.v7.widget.RecyclerView; +import androidx.annotation.Nullable; +import com.google.android.material.appbar.AppBarLayout; + +import androidx.fragment.app.DialogFragment; +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/demo/src/main/java/com/midtrans/demo/UserAddressActivity.java b/demo/src/main/java/com/midtrans/demo/UserAddressActivity.java index 17d07a349..b75d2ec47 100644 --- a/demo/src/main/java/com/midtrans/demo/UserAddressActivity.java +++ b/demo/src/main/java/com/midtrans/demo/UserAddressActivity.java @@ -4,13 +4,14 @@ import android.graphics.PorterDuff; import android.graphics.drawable.Drawable; import android.os.Bundle; -import android.support.annotation.Nullable; -import android.support.design.widget.TextInputLayout; -import android.support.v4.content.ContextCompat; -import android.support.v7.app.AppCompatActivity; -import android.support.v7.widget.AppCompatAutoCompleteTextView; -import android.support.v7.widget.AppCompatEditText; -import android.support.v7.widget.Toolbar; +import androidx.annotation.Nullable; +import com.google.android.material.textfield.TextInputLayout; + +import androidx.appcompat.widget.AppCompatAutoCompleteTextView; +import androidx.core.content.ContextCompat; +import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.widget.AppCompatEditText; +import androidx.appcompat.widget.Toolbar; import android.text.Editable; import android.text.TextUtils; import android.text.TextWatcher; diff --git a/demo/src/main/java/com/midtrans/demo/indicator/CirclePageIndicator.java b/demo/src/main/java/com/midtrans/demo/indicator/CirclePageIndicator.java index 0393da1b5..0ceefcb3e 100644 --- a/demo/src/main/java/com/midtrans/demo/indicator/CirclePageIndicator.java +++ b/demo/src/main/java/com/midtrans/demo/indicator/CirclePageIndicator.java @@ -25,9 +25,9 @@ import android.graphics.drawable.Drawable; import android.os.Parcel; import android.os.Parcelable; -import android.support.v4.view.MotionEventCompat; -import android.support.v4.view.ViewConfigurationCompat; -import android.support.v4.view.ViewPager; +import androidx.core.view.MotionEventCompat; +import androidx.core.view.ViewConfigurationCompat; +import androidx.viewpager.widget.ViewPager; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; @@ -549,4 +549,4 @@ public void writeToParcel(Parcel dest, int flags) { dest.writeInt(currentPage); } } -} \ No newline at end of file +} diff --git a/demo/src/main/java/com/midtrans/demo/indicator/PageIndicator.java b/demo/src/main/java/com/midtrans/demo/indicator/PageIndicator.java index ee3c912ed..6bf4e1b00 100644 --- a/demo/src/main/java/com/midtrans/demo/indicator/PageIndicator.java +++ b/demo/src/main/java/com/midtrans/demo/indicator/PageIndicator.java @@ -16,7 +16,7 @@ * limitations under the License. */ -import android.support.v4.view.ViewPager; +import androidx.viewpager.widget.ViewPager; /** * A PageIndicator is responsible to show an visual indicator on the total views @@ -50,4 +50,4 @@ public interface PageIndicator extends ViewPager.OnPageChangeListener { * Notify the indicator that the fragment list has changed. */ void notifyDataSetChanged(); -} \ No newline at end of file +} diff --git a/demo/src/main/java/com/midtrans/demo/widgets/DemoRadioButton.java b/demo/src/main/java/com/midtrans/demo/widgets/DemoRadioButton.java index cf5d71220..84a2d9693 100644 --- a/demo/src/main/java/com/midtrans/demo/widgets/DemoRadioButton.java +++ b/demo/src/main/java/com/midtrans/demo/widgets/DemoRadioButton.java @@ -2,9 +2,10 @@ import android.content.Context; import android.graphics.Typeface; -import android.support.v7.widget.AppCompatRadioButton; import android.util.AttributeSet; +import androidx.appcompat.widget.AppCompatRadioButton; + import com.midtrans.demo.FontCache; /** diff --git a/demo/src/main/java/com/midtrans/demo/widgets/DemoTextView.java b/demo/src/main/java/com/midtrans/demo/widgets/DemoTextView.java index f84590326..9a3729cc7 100644 --- a/demo/src/main/java/com/midtrans/demo/widgets/DemoTextView.java +++ b/demo/src/main/java/com/midtrans/demo/widgets/DemoTextView.java @@ -2,7 +2,7 @@ import android.content.Context; import android.graphics.Typeface; -import android.support.v7.widget.AppCompatTextView; +import androidx.appcompat.widget.AppCompatTextView; import android.util.AttributeSet; import com.midtrans.demo.FontCache; diff --git a/demo/src/main/res/layout/activity_demo_account.xml b/demo/src/main/res/layout/activity_demo_account.xml index a665204d9..c357b66d2 100644 --- a/demo/src/main/res/layout/activity_demo_account.xml +++ b/demo/src/main/res/layout/activity_demo_account.xml @@ -5,11 +5,11 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - - + + - \ No newline at end of file + diff --git a/demo/src/main/res/layout/activity_demo_card_register.xml b/demo/src/main/res/layout/activity_demo_card_register.xml index e2adcdc26..cc51c80f1 100644 --- a/demo/src/main/res/layout/activity_demo_card_register.xml +++ b/demo/src/main/res/layout/activity_demo_card_register.xml @@ -6,12 +6,12 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - + - + - - @@ -80,7 +80,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content"> - - + - - - + - - - + @@ -245,7 +245,7 @@ android:src="@drawable/ic_veritrans" /> - + - \ No newline at end of file + diff --git a/demo/src/main/res/layout/activity_demo_configuration.xml b/demo/src/main/res/layout/activity_demo_configuration.xml index 0a61088b0..b8a7d6303 100644 --- a/demo/src/main/res/layout/activity_demo_configuration.xml +++ b/demo/src/main/res/layout/activity_demo_configuration.xml @@ -5,12 +5,12 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - + + - @@ -199,7 +199,7 @@ - + - \ No newline at end of file + diff --git a/demo/src/main/res/layout/activity_demo_product_list.xml b/demo/src/main/res/layout/activity_demo_product_list.xml index ceaec6ce5..608849740 100644 --- a/demo/src/main/res/layout/activity_demo_product_list.xml +++ b/demo/src/main/res/layout/activity_demo_product_list.xml @@ -4,12 +4,12 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - + + - - + - - @@ -254,15 +254,15 @@ - + - + - \ No newline at end of file + diff --git a/demo/src/main/res/layout/activity_demo_shopper_page.xml b/demo/src/main/res/layout/activity_demo_shopper_page.xml index 65b2da29a..81d7baeee 100644 --- a/demo/src/main/res/layout/activity_demo_shopper_page.xml +++ b/demo/src/main/res/layout/activity_demo_shopper_page.xml @@ -4,11 +4,11 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - + + - @@ -183,4 +183,4 @@ layout="@layout/layout_primary_button"/> - \ No newline at end of file + diff --git a/demo/src/main/res/layout/activity_order_review.xml b/demo/src/main/res/layout/activity_order_review.xml index 8b63e31c0..e9de185c7 100644 --- a/demo/src/main/res/layout/activity_order_review.xml +++ b/demo/src/main/res/layout/activity_order_review.xml @@ -5,11 +5,11 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - - - + + - - - - + - - - + - - - + - - +