From acb3b3cc1342d8823dde6bb406d26ebbf8fdbf46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kuba=20Szczodrzy=C5=84ski?= Date: Sun, 10 Oct 2021 16:33:41 +0200 Subject: [PATCH 1/4] Fix setting spanned text to IconicsTextView --- .../iconics/sample/PlaygroundActivity.kt | 19 ++++++++++++++----- .../main/res/layout/activity_playground.xml | 3 ++- .../main/java/com/mikepenz/iconics/Iconics.kt | 2 +- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/mikepenz/iconics/sample/PlaygroundActivity.kt b/app/src/main/java/com/mikepenz/iconics/sample/PlaygroundActivity.kt index ac18cd14..0edf4628 100644 --- a/app/src/main/java/com/mikepenz/iconics/sample/PlaygroundActivity.kt +++ b/app/src/main/java/com/mikepenz/iconics/sample/PlaygroundActivity.kt @@ -19,15 +19,13 @@ package com.mikepenz.iconics.sample import android.annotation.SuppressLint import android.content.Context import android.graphics.Color +import android.graphics.Typeface import android.graphics.drawable.StateListDrawable import android.os.Bundle import android.text.Spannable import android.text.SpannableString -import android.text.style.BackgroundColorSpan -import android.text.style.DynamicDrawableSpan -import android.text.style.ForegroundColorSpan -import android.text.style.ImageSpan -import android.text.style.RelativeSizeSpan +import android.text.SpannableStringBuilder +import android.text.style.* import android.view.LayoutInflater import android.view.Menu import android.view.MenuItem @@ -155,6 +153,17 @@ class PlaygroundActivity : AppCompatActivity() { ) binding.test6.setImageDrawable(iconStateListDrawable) + val span = SpannableStringBuilder(binding.test10.text) + span.setSpan( + StyleSpan(Typeface.BOLD), + 3, + 6, + Spannable.SPAN_EXCLUSIVE_EXCLUSIVE + ) + span.insert(20, "{fab-android}") + binding.test10.text = span + binding.test10.text = binding.test10.text + val iconicsDrawableBase = IconicsDrawable(this).apply { actionBar() colorInt = Color.GREEN diff --git a/app/src/main/res/layout/activity_playground.xml b/app/src/main/res/layout/activity_playground.xml index 33b94c35..ba661afe 100644 --- a/app/src/main/res/layout/activity_playground.xml +++ b/app/src/main/res/layout/activity_playground.xml @@ -261,6 +261,7 @@ app:iiv_all_size="24dp" /> - \ No newline at end of file + diff --git a/iconics-core/src/main/java/com/mikepenz/iconics/Iconics.kt b/iconics-core/src/main/java/com/mikepenz/iconics/Iconics.kt index 30bba8e8..fae98022 100644 --- a/iconics-core/src/main/java/com/mikepenz/iconics/Iconics.kt +++ b/iconics-core/src/main/java/com/mikepenz/iconics/Iconics.kt @@ -334,7 +334,7 @@ object Iconics { fun on(on: String): BuilderString = on(SpannableString(on)) /** Defines where the icons should be applied to */ - fun on(on: CharSequence): BuilderString = on(on.toString()) + fun on(on: CharSequence): BuilderString = on(SpannableString(on)) /** Defines where the icons should be applied to */ fun on(on: StringBuilder): BuilderString = on(on.toString()) From cc6ea1e22772ba4f22399d888bf1e277b7827164 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Mon, 11 Oct 2021 14:49:37 +0200 Subject: [PATCH 2/4] - upgrade dependency versions to current stable release - compose 1.0.3 - kotlin 1.5.31 --- build.gradle | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build.gradle b/build.gradle index a4e9e4a9..b2c01469 100644 --- a/build.gradle +++ b/build.gradle @@ -31,7 +31,7 @@ buildscript { ] versions = [ - kotlin : '1.5.21', + kotlin : '1.5.31', androidX : '1.0.0', recyclerView : '1.2.1', material : '1.4.0', @@ -44,11 +44,11 @@ buildscript { ], startup : '1.1.0', detekt : '1.18.1', - aboutLibraries : '8.9.1', - materialDrawer : '8.4.3', + aboutLibraries : '8.9.3', + materialDrawer : '8.4.4', fastAdapter : '5.5.1', // compose - compose : '1.0.2' + compose : '1.0.3' ] } @@ -61,7 +61,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.1.0-alpha12' + classpath 'com.android.tools.build:gradle:7.1.0-alpha13' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}" classpath "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:${versions.detekt}" classpath "com.mikepenz.aboutlibraries.plugin:aboutlibraries-plugin:${versions.aboutLibraries}" From b5449bdb733ce0f2113d1d97865271fbcad46189 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Mon, 11 Oct 2021 14:56:22 +0200 Subject: [PATCH 3/4] - kotlin 1.5.30 for compose --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index b2c01469..791eb137 100644 --- a/build.gradle +++ b/build.gradle @@ -31,7 +31,7 @@ buildscript { ] versions = [ - kotlin : '1.5.31', + kotlin : '1.5.30', androidX : '1.0.0', recyclerView : '1.2.1', material : '1.4.0', From 04d510b18c515a09de426d3d665e71373e137f98 Mon Sep 17 00:00:00 2001 From: Mike Penz Date: Mon, 11 Oct 2021 15:04:31 +0200 Subject: [PATCH 4/4] - [release] v5.3.2 --- README.md | 2 +- build.gradle | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 5e23780c..56b66223 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ ## Latest releases 🛠 -- Kotlin Next Gen | [v5.3.1](https://github.com/mikepenz/Android-Iconics/tree/v5.3.1) +- Kotlin Next Gen | [v5.3.2](https://github.com/mikepenz/Android-Iconics/tree/v5.3.2) - Kotlin | [v4.0.2](https://github.com/mikepenz/Android-Iconics/tree/v4.0.2) - Java AndroidX | [v3.2.5](https://github.com/mikepenz/Android-Iconics/tree/v3.2.5) - Java Appcompat | [v3.0.4](https://github.com/mikepenz/Android-Iconics/tree/v3.0.4) diff --git a/build.gradle b/build.gradle index 791eb137..c8dc7c9e 100644 --- a/build.gradle +++ b/build.gradle @@ -18,8 +18,8 @@ buildscript { ext { release = [ - versionName: "5.3.1", - versionCode: 50301 + versionName: "5.3.2", + versionCode: 50302 ] setup = [