From d377eca31a9c9623c525f181a32c588a31dc5737 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 7 Jun 2019 12:45:59 -0400 Subject: Update migration docs --- docs/Migration.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'docs/Migration.md') diff --git a/docs/Migration.md b/docs/Migration.md index 593056e..b8d5715 100644 --- a/docs/Migration.md +++ b/docs/Migration.md @@ -12,6 +12,9 @@ Please refer to [MD's documents](https://github.com/afollestad/material-dialogs/ Alongside such changes, `:colorpicker` is no longer as necessary. It exists mainly to provide an internal interface for other submodules. +After Material Dialog 2.x, a decision was made to enforce theming through xml styles only to avoid reflection. +As a result, options to supply custom dialog colors are now removed. + ## Update ProgressAnimator `ProgressAnimator` has been completely rewritten to be an extension of `ValueAnimator`. -- cgit v1.2.3 From 77be91c57b36ae85b6be34d3db864fcd63661018 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 7 Jun 2019 13:11:45 -0400 Subject: Add deprecation annotations for network utils --- core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt | 3 +++ docs/Migration.md | 2 +- sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'docs/Migration.md') diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt index 32cf084..39d689b 100644 --- a/core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt +++ b/core/src/main/kotlin/ca/allanwang/kau/utils/NetworkUtils.kt @@ -22,6 +22,7 @@ import android.net.ConnectivityManager /** * Created by Allan Wang on 2017-07-07. */ +@Suppress("DEPRECATION") @Deprecated("Applications should make use of network callbacks instead of individual queries") inline val Context.isNetworkAvailable: Boolean @SuppressLint("MissingPermission") @@ -31,6 +32,7 @@ inline val Context.isNetworkAvailable: Boolean return activeNetworkInfo?.isConnectedOrConnecting ?: false } +@Suppress("DEPRECATION") @Deprecated("Applications should make use of network callbacks instead of individual queries") inline val Context.isWifiConnected: Boolean @SuppressLint("MissingPermission") @@ -40,6 +42,7 @@ inline val Context.isWifiConnected: Boolean return (activeNetworkInfo?.type ?: -1) == ConnectivityManager.TYPE_WIFI } +@Suppress("DEPRECATION") @Deprecated("Applications should make use of network callbacks instead of individual queries") inline val Context.isMobileDataConnected: Boolean @SuppressLint("MissingPermission") diff --git a/docs/Migration.md b/docs/Migration.md index b8d5715..203dc1d 100644 --- a/docs/Migration.md +++ b/docs/Migration.md @@ -13,7 +13,7 @@ Please refer to [MD's documents](https://github.com/afollestad/material-dialogs/ Alongside such changes, `:colorpicker` is no longer as necessary. It exists mainly to provide an internal interface for other submodules. After Material Dialog 2.x, a decision was made to enforce theming through xml styles only to avoid reflection. -As a result, options to supply custom dialog colors are now removed. +As a result, options to supply custom dialog colors are now removed (ie in the changelog dialog and color picker kprefs). ## Update ProgressAnimator diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt index 2c3bf23..9ce3f42 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt @@ -260,7 +260,7 @@ class MainActivity : KPrefActivity() { if (KPrefSample.version < BuildConfig.VERSION_CODE) { KPrefSample.version = BuildConfig.VERSION_CODE if (!BuildConfig.DEBUG) - showChangelog(R.xml.kau_changelog, KPrefSample.textColor) + showChangelog(R.xml.kau_changelog) } supportActionBar?.apply { setDisplayHomeAsUpEnabled(false) @@ -293,7 +293,7 @@ class MainActivity : KPrefActivity() { override fun onOptionsItemSelected(item: MenuItem): Boolean { when (item.itemId) { - R.id.action_changelog -> showChangelog(R.xml.kau_changelog, KPrefSample.textColor) + R.id.action_changelog -> showChangelog(R.xml.kau_changelog) R.id.action_settings -> startActivity() R.id.action_email -> sendEmail(R.string.your_email, R.string.your_subject) else -> return super.onOptionsItemSelected(item) -- cgit v1.2.3