blongho / worldCountryData

Android library for country flag, currency, and other country information
https://blongho.github.io/worldCountryData/doc/
MIT License
98 stars 35 forks source link

Flag cut off in ImageView. #22

Closed chitgoks closed 3 years ago

chitgoks commented 3 years ago

Hi. I use the svg to this ImageView tag.

<ImageView
            android:id="@+id/flag"
            android:layout_width="30dp"
            android:layout_height="20dp"
            android:layout_marginEnd="5dp"
            android:contentDescription="@string/empty"
            android:layout_gravity="center_vertical"
            android:scaleType="centerCrop"/>

For example, use american flag. The result is not all the flag is fit inside the ImageView.

tried to use adjustViewBounds, still no. tried all scale types, nothing worked such that the flag did not fit in the image view.

please seee result. flag

e.g. US and PH flag are cut off.

thoughts?

blongho commented 3 years ago

I do not notice that kind of behaviour. Check this application https://github.com/blongho/world-country-data-demo

It has an apk that you can download from Google play

chitgoks commented 3 years ago

ok anyway. they are 72dp both in width and height in the sample which is not what i want.

it's ok. not a bottleneck.