GifView icon indicating copy to clipboard operation
GifView copied to clipboard

How to make Gif to be full screen?

Open ManishGladMinds opened this issue 8 years ago • 4 comments

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

ManishGladMinds avatar Apr 06 '16 11:04 ManishGladMinds

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

linqh0806 avatar May 29 '16 13:05 linqh0806

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

xiaoshan136 avatar Aug 10 '16 09:08 xiaoshan136

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);

subsub avatar Mar 20 '17 00:03 subsub

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

istahilagi avatar Feb 21 '22 07:02 istahilagi