thellmund / Android-Week-View

Display highly customizable calendar views in your Android app
Apache License 2.0
188 stars 97 forks source link

Set single event spannableString for customize ui style but apply to all event chips #301

Open ChingSheng opened 11 months ago

ChingSheng commented 11 months ago

Describe the bug As title. In previous version, WeekViewEntity.Style.Builder() has setTextStrikeThrough() to customize individual event chip style. As below code.

            @PublicApi
            @Deprecated("Use a SpannableString for the title or location instead.")
            fun setTextStrikeThrough(strikeThrough: Boolean): Builder {
                style.isTextStrikeThrough = strikeThrough
                return this
            }

However when I try using SpannableString for individual WeekViewEntiry. Once SpannableString are set to one WeekViewEntity, other WeekViewEntity (event chip) also apply this SpannableString.

To Reproduce Steps to reproduce the behavior:

  1. Scroll to date which has set StrikeThrough SpannableString WeekViewEntiry
  2. Browse other events
  3. Event are all apply this SpannableString

Expected behavior Each WeekViewEntiry has individual SpannableString setting, not affect to other events

Screenshots

https://github.com/thellmund/Android-Week-View/assets/5635575/0d8837e9-7373-4a2f-90b8-b5dfbb43d8be

My code for additional information image

Additional context