Search in sources :

Example 1 with AnimationControlsManager

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

Example 2 with AnimationControlsManager

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

Aggregations

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