Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep aspect ratio while upscaling #335

Open
jo-elimu opened this issue Aug 18, 2016 · 1 comment
Open

Keep aspect ratio while upscaling #335

jo-elimu opened this issue Aug 18, 2016 · 1 comment

Comments

@jo-elimu
Copy link

jo-elimu commented Aug 18, 2016

Would it be possible to add such a feature to the library?: http://www.ryadel.com/en/android-proportionally-stretch-imageview-fit-whole-screen-width-maintaining-aspect-ratio/

Note the difference between downscaling and upscaling. Android does not support upscaling while keeping the aspect ratio by adjusting only XML settings. It seems like additional Java code is necessary.

<pl.droidsonroids.gif.GifTextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:scaleType="fitXY"
        android:background="@drawable/twiga" />

screen shot 2016-08-18 at 14 28 38
screen shot 2016-08-18 at 14 28 46

@koral--
Copy link
Owner

koral-- commented Sep 25, 2016

Sorry for the long delay. I've added label immediately but forget to comment.
It seems to be possible, but not as a default behavior to not break backwards compatibility. Either new method has to be added to Gif*Views or custom XML attrinute or both.
There is no ETA for this feature, feel free to create pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants