mikepenz / Android-Iconics

Android-Iconics - Use any icon font, or vector (.svg) as drawable in your application.
https://mikepenz.dev
Apache License 2.0
5.18k stars 617 forks source link

Too big icons on Kindle Fire HD (2013) #514

Closed afarber closed 2 years ago

afarber commented 4 years ago

About this issue

Hello,

I am using your library in a word game wirtten in Java + androidx. Thanks a lot for your library, Mike.

Now I am trying to port my app to Amazon Fire HD devices and have gotten the following test report by the Amazon review team:

Actual Result: Observe that app contains distorted images Expected Result: The app should not display distorted/stretched/cropped images. Affected device list: Kindle Fire HD (2013) Kindle Fire HDX WAN (2013) Kindle Fire HDX (2013) Kindle Fire HDX 8.9 WAN (2013) Kindle Fire HDX 8.9 (2013) Fire Phone

Words by Farber_Kindle Fire HD (2013)_screenshot

Unfortunately, it is difficult to get additional details from Amazon review team, it is not possible to reply to them directly.

In my app I use code like:

private final PrimaryDrawerItem mPrivacyItem = new PrimaryDrawerItem()
        .withName(R.string.privacy_policy)
        .withIdentifier(R.id.navi_drawer_privacy)
        .withIcon(FontAwesome.Icon.faw_eye1)
        .withOnDrawerItemClickListener((view, position, drawerItem) -> {
            showPrivacyPolicy();
            return false;
        });

And here are the libraries I use:

implementation 'androidx.multidex:multidex:2.0.1'

implementation 'com.squareup.okhttp3:okhttp:3.12.2'
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.neovisionaries:nv-websocket-client:2.10'

implementation "androidx.room:room-common:2.2.5"
implementation "androidx.room:room-runtime:2.2.5"
annotationProcessor "androidx.room:room-compiler:2.2.5"
androidTestImplementation "androidx.room:room-testing:2.2.5"

implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
annotationProcessor "androidx.lifecycle:lifecycle-common-java8:2.2.0"

implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.viewpager2:viewpager2:1.0.0'
implementation 'com.google.android.material:material:1.3.0-alpha02'

implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
implementation 'com.mikepenz:materialdrawer:6.1.2'
implementation 'com.mikepenz:iconics-core:3.2.5'
implementation 'com.mikepenz:fontawesome-typeface:5.3.1.1@aar'
implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0-alpha'
implementation "com.facebook.android:facebook-core:[5,6)"
implementation "com.facebook.android:facebook-login:[5,6)"

googleImplementation 'com.google.android.gms:play-services-auth:18.1.0'
googleImplementation 'com.google.firebase:firebase-messaging:20.2.4'
googleImplementation 'com.android.billingclient:billing:3.0.0'

amazonCompileOnly files('libs/amazon-device-messaging-1.1.0.jar')
amazonImplementation files('libs/login-with-amazon-sdk.jar')

Do you please have an idea on how to workaround the issue?

On my own Fire 5 and Fire 7 devices I do not see the problem:

Screenshot_2020-08-22-21-06-26

Thanks Alex

Details

Checklist

mikepenz commented 4 years ago

@afarber I believe this is the wrong repo to report this problem on.

can you reproduce this with the sample app of the latest MaterialDrawer release?

v6.1.2 is a pretty old version, and also uses an old Iconics version, for which I can hardly give support at this time (it's a few years old)

afarber commented 4 years ago

Ok, sorry for that.

My problem is that my app is developed in Java + androidx

When I tried the latest versions of your both libraries, they didn't compile.

afarber commented 4 years ago

In your other repo https://github.com/mikepenz/MaterialDrawer you recommend to use 6.1.2 which is what I am using.

mikepenz commented 4 years ago

I understand. Regardless. could you please try the sample app and report if you can reproduce the issue with that one (v6 and v8)

v6 is noted as reference in the other repo, it's no longer maintained though and updates will only land in v8 or newer.

afarber commented 4 years ago

Unfortunately, with 8.1.5 my app does not compile -

image

So I am not sure what could I try. I would like to support you Mike, but how?

mikepenz commented 4 years ago

@afarber please try to install the apk from the MaterialDrawer sample app (not in your app) https://github.com/mikepenz/MaterialDrawer/releases/tag/v8.1.5

(and from older versions) I'd love to see if the bug is reproducible there. It also uses iconics icons: https://github.com/mikepenz/MaterialDrawer/blob/develop/app/src/main/java/com/mikepenz/materialdrawer/app/DrawerActivity.kt#L96

afarber commented 4 years ago

Fire 7

Screenshot_2020-09-09-18-58-25

Screenshot_2020-09-09-18-59-03

afarber commented 4 years ago

Fire 5 with big font Screenshot_2020-09-09-19-19-26

Screenshot_2020-09-09-19-19-12

afarber commented 4 years ago

However I don't have the older Fire tablets where the issue occurs

mikepenz commented 4 years ago

It would be great if we could see if the problem is reproducible with the sample to outline any potential other problems.

at least it would help us to limit the area to search for a problem.

afarber commented 4 years ago

I have bought Kindle Fire 3 Generation for 17 Euro at eBay -

mikepenz commented 4 years ago

Fancy. Curious how it turns out

afarber commented 4 years ago

Screenshot_2020-09-16-14-13-31 Screenshot_2020-09-16-14-13-03

(Sorry, had to switch back to my Mac, could not attach the images in Fire's Silk browser)

afarber commented 4 years ago

Fire OS 4.5.5.3

mikepenz commented 4 years ago

It seems or sounds like this device has a non appropriate Android system breaking default behaviour for font rendering :/

If you look it seems that it is doing things duplicated, which would kind of seem that the canvas logic is faulty on the system.

afarber commented 4 years ago

Mike, currently in my app I check if the build is for Amazon and:

    private final PrimaryDrawerItem mHelpItem = new PrimaryDrawerItem()
            .withName(R.string.help)
            .withIdentifier(R.id.navi_drawer_help)
            .withIcon("amazon".equals(BuildConfig.FLAVOR_store) ? null : FontAwesome.Icon.faw_question_circle1)
            .withOnDrawerItemClickListener((view, position, drawerItem) -> {
                showHelp();
                return false;
            });

and I have many such spots throughout my small word game. If Materialdrawer would offer some global flag for hiding all icons... please consider adding that.

Even better would be to find a workaround for the canvas problem.

For example I have also bought the older Samsung Galaxy S3 with Android 4 and discovered that there was a problem with Path.translate() - the letter tiles drawn with it in my word game were not filled with background color. So I have changed my code and now it works again.

mikepenz commented 3 years ago

@afarber sadly I do not own any device which causes this problem, nor is it reproducible with emulators. And it seems to be limited to the weird way amazon did things for those fire tablets.

99% sure it is a bug on those.

As such it will be hard that I can create a fix for this. If you find a solution to resolve the problem I would be more than happy to get a PR in

afarber commented 3 years ago

Mike please send me your post address at ** and I will send you the device and you can keep it in any case for free.

Greetings from Bochum

Mike Penz notifications@github.com schrieb am Mo. 21. Sept. 2020 um 15:18:

@afarber https://github.com/afarber sadly I do not own any device which causes this problem, nor is it reproducible with emulators. And it seems to be limited to the weird way amazon did things for those fire tablets.

99% sure it is a bug on those.

As such it will be hard that I can create a fix for this. If you find a solution to resolve the problem I would be more than happy to get a PR in

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/mikepenz/Android-Iconics/issues/514#issuecomment-696108947, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOMCKQ3MCVNEUSDAJRUEZTSG5HDZANCNFSM4RCIVR6Q .

mikepenz commented 3 years ago

I appreciate the offer, but I wouldn't be able to make promises if I can fix the problem at all :/

mikepenz commented 2 years ago

Closing as this won't be worked on anymore.

Happy to look into a PR if a solution may be available