From 013f08f9061ad0dea803e5e63f24480a138a05b2 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 7 Jun 2019 12:48:07 -0400 Subject: Clean up changelog config --- .../main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 14 ++------------ sample/src/main/res/values/colors.xml | 6 +++--- 2 files changed, 5 insertions(+), 15 deletions(-) (limited to 'sample') 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 d9586c4..2c3bf23 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt @@ -260,12 +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) { - // TODO MD Color -// titleColor(KPrefSample.textColor) -// backgroundColor(KPrefSample.bgColor) -// positiveColor(KPrefSample.accentColor) - } + showChangelog(R.xml.kau_changelog, KPrefSample.textColor) } supportActionBar?.apply { setDisplayHomeAsUpEnabled(false) @@ -298,12 +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) { - // TODO MD Color -// titleColor(KPrefSample.textColor) -// backgroundColor(KPrefSample.bgColor) -// positiveColor(KPrefSample.accentColor) - } + R.id.action_changelog -> showChangelog(R.xml.kau_changelog, KPrefSample.textColor) R.id.action_settings -> startActivity() R.id.action_email -> sendEmail(R.string.your_email, R.string.your_subject) else -> return super.onOptionsItemSelected(item) diff --git a/sample/src/main/res/values/colors.xml b/sample/src/main/res/values/colors.xml index 3ab3e9c..12363c4 100644 --- a/sample/src/main/res/values/colors.xml +++ b/sample/src/main/res/values/colors.xml @@ -1,6 +1,6 @@ - #3F51B5 - #303F9F - #FF4081 + #2196F3 + #1976D2 + #FF5722 -- 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 'sample') 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 From 6e37f118bfa98c07699d1d610a1549923d446ebe Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Fri, 7 Jun 2019 13:18:39 -0400 Subject: Enforce java 1.8 to fix build problems --- .idea/misc.xml | 2 +- android-lib.gradle | 5 +++++ sample/build.gradle | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'sample') diff --git a/.idea/misc.xml b/.idea/misc.xml index 51fa3e5..cc04cd3 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -35,7 +35,7 @@ - + diff --git a/android-lib.gradle b/android-lib.gradle index e8a4c6d..28fc945 100644 --- a/android-lib.gradle +++ b/android-lib.gradle @@ -61,6 +61,11 @@ android { pickFirst 'META-INF/library_release.kotlin_module' } + compileOptions { + sourceCompatibility '1.8' + targetCompatibility '1.8' + } + sourceSets { main.java.srcDirs += 'src/main/kotlin' test.java.srcDirs += 'src/test/kotlin' diff --git a/sample/build.gradle b/sample/build.gradle index bb7cab0..d11e5bd 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -80,6 +80,11 @@ android { pickFirst 'META-INF/library_release.kotlin_module' } + compileOptions { + sourceCompatibility '1.8' + targetCompatibility '1.8' + } + sourceSets { main.java.srcDirs += 'src/main/kotlin' test.java.srcDirs += 'src/test/kotlin' -- cgit v1.2.3