Android-Iconics icon indicating copy to clipboard operation
Android-Iconics copied to clipboard

Some icons are incorrectly rendered with `IconicsTextView` + XML

Open smelfungus opened this issue 4 years ago • 13 comments

About this issue

Some icons are incorrectly rendered with IconicsTextView + XML.

  • Pixel C emulator: image

  • Samsung Galaxy S20 Ultra: image

Sample code:

<com.mikepenz.iconics.view.IconicsTextView
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:text="@string/title_statistics_chart_success"
  android:textAppearance="?attr/textAppearanceBody2" />
<string name="title_statistics_chart_success">{gmd-trending-up} Success</string>

Details

  • Used support library version: androidx.appcompat:appcompat:1.4.0-alpha03
  • Used gradle build tools version 4.2.2 / 7.1.1
  • Used tooling / Android Studio version: 4.2.2
  • Used library version: 5.2.8, 5.3.0-b01

Fonts:

  • com.mikepenz:google-material-typeface:4.0.0.1-kotlin@aar
  • com.mikepenz:community-material-typeface:5.8.55.0-kotlin@aar

smelfungus avatar Jul 17 '21 16:07 smelfungus

Are they correctly rendered if using as IconicsDrawable?

mikepenz avatar Jul 20 '21 16:07 mikepenz

@mikepenz I just checked this, yes: image

smelfungus avatar Jul 20 '21 17:07 smelfungus

Could it be that the font was not initialised, or maybe android API level related?

mikepenz avatar Jul 20 '21 17:07 mikepenz

@mikepenz, let me create a reproducible sample and share it asap.

smelfungus avatar Jul 21 '21 15:07 smelfungus

@mikepenz It seems like the appcompat dependency is causing this issue, it is working with: androidx.appcompat:appcompat:1.3.1 But starts breaking with: androidx.appcompat:appcompat:1.4.0-alpha01+ Sample: https://github.com/dummyco/android-iconics-gh-592

smelfungus avatar Jul 23 '21 10:07 smelfungus

That's super interesting :/ will have to take a closer look, not sure why that would be.

mikepenz avatar Jul 24 '21 13:07 mikepenz

Maybe it's time to deprecate all text based forms, and only retain the IconicsDrawable

mikepenz avatar Jul 24 '21 13:07 mikepenz

Screenshot 2021-07-30 at 09 11 13

I have the feeling something in here overwrites our spannable

mikepenz avatar Jul 30 '21 07:07 mikepenz

You will have to add app:emojiCompatEnabled="false" to the xml (using their setter to disable it programmatically from the view seems to not work.

mikepenz avatar Jul 30 '21 07:07 mikepenz

Tried to find a way around, but have not found any solution beside disabling support for it via xml

mikepenz avatar Jul 30 '21 08:07 mikepenz

That's wonderful! Thank you for taking a look 👍🏻

smelfungus avatar Jul 30 '21 08:07 smelfungus

Just to note this also occurs on compose previews

nonproto avatar Jan 31 '22 18:01 nonproto

Are they correctly rendered if using as IconicsDrawable?

Jibonahmed115 avatar Aug 27 '22 11:08 Jibonahmed115