Who can help with implementation of `glide`? Right...
# android
m
Who can help with implementation of
glide
? Right now i get next error in my logs:
Copy code
Load failed for <https://upload.wikimedia.org/wikipedia/sco/7/71/Pringles.svg> with size [65x66]
         class com.bumptech.glide.load.engine.GlideException: Failed to load resource
stackoverflow 2
s
@morozov Are you using androidsvg? https://github.com/BigBadaboom/androidsvg
m
i used
implementation 'com.caverock:androidsvg:1.2.1'
also i tried to ask in so yesterday, but it doesn t help https://stackoverflow.com/questions/52481007/failed-to-load-svg-resource-on-android
s
Try out 1.3 (implementation 'com.caverockandroidsvg aar1.3') and if it still fails, you might want to file a bug. The last time i tried, developer was responsive. http://bigbadaboom.github.io/androidsvg/
@morozov Seems to be working fine for me, tried with Glide 3.6.0 and androidsvg 1.2.1 https://github.com/Ethan1983/AndroidSVGGlideExample
FWIW, i didn't even need AppGlideModule and had to enable clear text http request ( Android Pie thing )
m
for example, i created
Copy code
<com.caverock.androidsvg.SVGImageView
            android:id="@+id/bankLogoView"
            style="@style/icon_account_view"
            app:svg="@drawable/ic_buy_violet"/>
also implement
implementation 'com.caverock:androidsvg-aar:1.3'
and after in my holder tried to use someting like
bankLogoView.setImageAsset(data.logoUrl)
or in holder i need to write smth else?
when i tried get svg image from asset like this:
Copy code
bankLogoView.setImageAsset("wallet.svg")
all works correctly but if i try to get link from url:
Copy code
val uri = Uri.parse("<https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg>")
        bankLogoView.setImageURI(uri)
i get next error :
Copy code
E/SVGImageView: File not found: <https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg>
However, androidsvg1.2.1 fails for https://upload.wikimedia.org/wikipedia/commons/3/35/Tux.svg for API 28
Details at https://github.com/BigBadaboom/androidsvg/issues/148 but fix is available in 1.3
Tux download works on a lower API level though ( 26 etc )