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

How to make Gif to be full screen? #9

Open
ManishGladMinds opened this issue Apr 6, 2016 · 4 comments
Open

How to make Gif to be full screen? #9

ManishGladMinds opened this issue Apr 6, 2016 · 4 comments

Comments

@ManishGladMinds
Copy link

I want to show the Gif full screen, what is the solution for this?

@linqh0806
Copy link

i meet the problem too, do you have the method to solve it?

@xiaoshan136
Copy link

how to set imageview size? now only can show the original size.

@subsub
Copy link

subsub commented Mar 20, 2017

Inside onMeasure(), remove remove checking if movieWidth > maximumWidth and remove if movieHeight > maximumHeight.
So change these lines:

if (measureModeWidth != MeasureSpec.UNSPECIFIED) {
                int maximumWidth = MeasureSpec.getSize(widthMeasureSpec);
                if (movieWidth > maximumWidth) {
                        scaleW = (float) movieWidth / (float) maximumWidth;
                }
}

into these:

if (measureModeWidth != MeasureSpec.UNSPECIFIED) {
                int maximumWidth = MeasureSpec.getSize(widthMeasureSpec);
                scaleH = (float) movieWidth / (float) maximumWidth;
}

The same with the height

And change from Math.max to Math.min

mScale = 1f / Math.max(scaleH, scaleW);

into

mScale = 1f / Math.min(scaleH, scaleW);

@istahilagi
Copy link

I still can't do this, where do I put this code?

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

No branches or pull requests

5 participants