use of com.facebook.fresco.animation.drawable.AnimatedDrawable2DebugDrawListener in project fresco by facebook.
the class BitmapAnimationDebugFragment method onViewCreated.
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
// Get the animation container
final ImageView imageView = (ImageView) view.findViewById(R.id.animation_container);
mFrameInformationContainer = (LinearLayout) view.findViewById(R.id.frame_information);
mAnimatedDrawable = new AnimatedDrawable2();
mAnimatedDrawable.setDrawListener(new AnimatedDrawable2DebugDrawListener());
view.findViewById(R.id.invalidate_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
imageView.invalidate();
}
});
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