forked from github/szkolny
[UI] Update Iconics to remove the span workaround.
This commit is contained in:
parent
63b74a9fda
commit
fa318d4509
@ -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"
|
||||
|
||||
|
@ -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(
|
||||
b.topic.text = adapter.highlightSearchText(
|
||||
item = item,
|
||||
text = b.topic.text,
|
||||
color = colorHighlight
|
||||
)
|
||||
).buildIconics()
|
||||
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
|
||||
|
||||
|
@ -71,7 +71,7 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<TextView
|
||||
<com.mikepenz.iconics.view.IconicsTextView
|
||||
android:id="@+id/topic"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
|
Loading…
Reference in New Issue
Block a user