mikepenz / Android-Iconics

Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.

Home Page:https://mikepenz.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

com.mikepenz.iconics.view.IconicsImageView won't show image

kenargo opened this issue · comments

About this issue

This issue, which I assume is a doc issue is causing me great pain and as a last resort I'm posing the question.

The short of it; using the following XML in my layout file shows NO image, no icon.

<com.mikepenz.iconics.view.IconicsImageView android:layout_width="72dp" android:layout_height="72dp" app:iiv_color="@android:color/holo_red_dark" app:iiv_icon="gmd-favorite" />

This is right out of the readme and samples but I don't see what is blocking this from working. I can set drawables in code, no problem but via XML it isn't working.

I'm initializing the library in the override to onCreate within my application as follows:

Iconics.init(this)

I am using the 5.1.0 library (updating isn't an option as a 3rd party library I'm using breaks with the minSDK of the updated library.

Oh, can't run the sample; it appears to use a pre-released version of Android Studio, I'm using the latest release version 2020.03.01 of Arctic Fox.

@kenargo could you please try to also register the font, similar like this:

Iconics.registerFont(GoogleMaterial())

Any log messages showing up in logcat?

A library shouldn't break the minSDK requirement unless your app itself requires to be minSDK 16 or so?

You should be able to adjust the used gradle build tools version to the version of AS you use.


Also please make sure you read this:
https://github.com/mikepenz/Android-Iconics#appcompat14x

Great news: adding the call to registerFont resolved the issue and they now work correctly in the XML layout files...

The other issue was a build issues (The minCompileSdk (31) specified in a
dependency's AAR metadata) and resolved by this: https://stackoverflow.com/questions/69034879/how-to-resolve-this-error-the-mincompilesdk-31-specified-in-a-dependencys-aar. Unfortunately, and unrelated the fix for the iconics library doesn't work for your FastAdapter so for that library I an stuck to 5.5.1 until I can upgrade to 31.

I cannot use compileSdk 31 for this project, not your issue; only it appeared once I updated.

This can be closed; issue resolved.