Search in sources :

Example 1 with SampleAnimationBackendConfigurator

use of com.facebook.samples.animation2.utils.SampleAnimationBackendConfigurator 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);
}
Also used : AnimatedDrawable2(com.facebook.fresco.animation.drawable.AnimatedDrawable2) ToggleButton(android.widget.ToggleButton) SeekBar(android.widget.SeekBar) SampleAnimationBackendConfigurator(com.facebook.samples.animation2.utils.SampleAnimationBackendConfigurator) AnimationControlsManager(com.facebook.samples.animation2.utils.AnimationControlsManager) ImageView(android.widget.ImageView)

Aggregations

ImageView (android.widget.ImageView)1 SeekBar (android.widget.SeekBar)1 ToggleButton (android.widget.ToggleButton)1 AnimatedDrawable2 (com.facebook.fresco.animation.drawable.AnimatedDrawable2)1 AnimationControlsManager (com.facebook.samples.animation2.utils.AnimationControlsManager)1 SampleAnimationBackendConfigurator (com.facebook.samples.animation2.utils.SampleAnimationBackendConfigurator)1