Skip to content

Commit

Permalink
Merge pull request #605 from mikepenz/develop
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
mikepenz authored Oct 11, 2021
2 parents 29e53f0 + 04d510b commit a93b31b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/res/layout/activity_playground.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@
app:iiv_all_size="24dp" />

<com.mikepenz.iconics.view.IconicsTextView
android:id="@+id/test10"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:text="abcdefgh{faw-adjust}ijk{fon-test1}lmnopqrstuv{fon-test2}wxyz"
Expand Down Expand Up @@ -615,4 +616,4 @@
app:layout_constraintTop_toBottomOf="@id/content"
app:layout_constraintBottom_toBottomOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
</layout>
14 changes: 7 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ buildscript {

ext {
release = [
versionName: "5.3.1",
versionCode: 50301
versionName: "5.3.2",
versionCode: 50302
]

setup = [
Expand All @@ -31,7 +31,7 @@ buildscript {
]

versions = [
kotlin : '1.5.21',
kotlin : '1.5.30',
androidX : '1.0.0',
recyclerView : '1.2.1',
material : '1.4.0',
Expand All @@ -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'
]
}

Expand All @@ -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}"
Expand Down
2 changes: 1 addition & 1 deletion iconics-core/src/main/java/com/mikepenz/iconics/Iconics.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit a93b31b

Please sign in to comment.