diff --git a/app/build.gradle b/app/build.gradle index 96bb1176..83f8cbbb 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -172,8 +172,8 @@ dependencies { kapt "eu.szkolny.selective-dao:codegen:27f8f3f194" // Iconics & related - implementation "com.mikepenz:iconics-core:5.3.1" - implementation "com.mikepenz:iconics-views:5.3.1" + implementation "com.mikepenz:iconics-core:5.3.2" + implementation "com.mikepenz:iconics-views:5.3.2" implementation "com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar" implementation "eu.szkolny:szkolny-font:77e33acc2a" diff --git a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/event/EventViewHolder.kt b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/event/EventViewHolder.kt index 8eb4f638..399a597d 100644 --- a/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/event/EventViewHolder.kt +++ b/app/src/main/java/pl/szczodrzynski/edziennik/ui/modules/event/EventViewHolder.kt @@ -4,7 +4,6 @@ package pl.szczodrzynski.edziennik.ui.modules.event -import android.text.SpannableString import android.view.LayoutInflater import android.view.ViewGroup import androidx.appcompat.app.AppCompatActivity @@ -53,13 +52,11 @@ class EventViewHolder( b.simpleMode = adapter.simpleMode manager.setEventTopic(b.topic, item, showType = false) - b.topic.text = SpannableString( - adapter.highlightSearchText( - item = item, - text = b.topic.text, - color = colorHighlight - ) - ).buildIconics() + b.topic.text = adapter.highlightSearchText( + item = item, + text = b.topic.text, + color = colorHighlight + ) b.topic.maxLines = if (adapter.simpleMode) 2 else 3 b.details.text = mutableListOf( @@ -107,9 +104,10 @@ class EventViewHolder( text = addedBy, color = colorHighlight ) - b.addedBy.text = SpannableString( - b.addedBy.text.replace(addedBy, addedBySpanned) - ).buildIconics() + b.addedBy.text = b.addedBy.text.replace(addedBy, addedBySpanned) + // for now, as CharSequence.replace() converts the original sequence to string, + // so the Iconics span data is lost and the share icon set above does not display + b.addedBy.buildIconics() b.attachmentIcon.isVisible = item.hasAttachments diff --git a/app/src/main/res/layout/event_list_item.xml b/app/src/main/res/layout/event_list_item.xml index e353c837..df6b688f 100644 --- a/app/src/main/res/layout/event_list_item.xml +++ b/app/src/main/res/layout/event_list_item.xml @@ -71,7 +71,7 @@ android:gravity="center_vertical" android:orientation="horizontal"> -