use of pl.droidsonroids.gif.GifOptions in project android-gif-drawable by koral--.
the class GifTexImage2DFragment method onCreateView.
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
if (!isOpenGLES2Supported()) {
Snackbar.make(container, R.string.gles2_not_supported, Snackbar.LENGTH_LONG).show();
return null;
}
try {
GifOptions options = new GifOptions();
options.setInIsOpaque(true);
mGifTexImage2D = new GifTexImage2D(new InputSource.ResourcesSource(getResources(), R.drawable.anim_flag_chile), options);
} catch (IOException e) {
throw new IllegalStateException(e);
}
final GLSurfaceView view = (GLSurfaceView) inflater.inflate(R.layout.opengl, container, false);
view.setEGLContextClientVersion(2);
view.setRenderer(new Renderer());
view.getHolder().setFixedSize(mGifTexImage2D.getWidth(), mGifTexImage2D.getHeight());
mGifTexImage2D.startDecoderThread();
return view;
}
Aggregations