use of com.facebook.samples.animation2.utils.AnimationControlsManager in project fresco by facebook.
the class MediaControlFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
ImageView imageView = (ImageView) view.findViewById(R.id.animation_container);
// Create a new animated drawable. The backend will be set by the backend configurator.
mAnimatedDrawable = new AnimatedDrawable2();
imageView.setImageDrawable(mAnimatedDrawable);
mAnimationControlsManager = new AnimationControlsManager(mAnimatedDrawable, (SeekBar) view.findViewById(R.id.seekbar), (ToggleButton) view.findViewById(R.id.playpause), view.findViewById(R.id.reset));
new SampleAnimationBackendConfigurator((Spinner) view.findViewById(R.id.spinner), this);
}
use of com.facebook.samples.animation2.utils.AnimationControlsManager in project fresco by facebook.
the class BitmapAnimationDebugFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
// Get the animation container
ImageView imageView = (ImageView) view.findViewById(R.id.animation_container);
mFrameInformationContainer = (LinearLayout) view.findViewById(R.id.frame_information);
mAnimatedDrawable = new AnimatedDrawable2();
mAnimationControlsManager = new AnimationControlsManager(mAnimatedDrawable, (SeekBar) getView().findViewById(R.id.seekbar), (ToggleButton) getView().findViewById(R.id.playpause), getView().findViewById(R.id.reset));
new BitmapAnimationCacheSelectorConfigurator((Spinner) view.findViewById(R.id.spinner), mBitmapFrameCacheChangedListener, mFrameCacheListener);
imageView.setImageDrawable(mAnimatedDrawable);
}
Aggregations