tspaulding0222 / FrameAnimaionContainer

Frame Animation Tool For when regular frame animation runs out of memory

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FrameAnimaionContainer

Frame Animation where each image is loaded individually on another thread.

//Get the frame animation Container FrameAnimationContainer container = FrameAnimationContainer.getInstance(demoImageView);

    //get the images
    final int[] IMAGE_RESOURCES = {R.drawable.demo_01, R.drawable.demo_02, R.drawable.demo_03, R.drawable.demo_04,
            R.drawable.demo_05, R.drawable.demo_06, R.drawable.demo_07, R.drawable.demo_08, R.drawable.demo_09};

    //set the amount of time each image will be visible
    final int ANIMATION_INTERVAL = 15;

    //make the imageview visible
    demoImageView.setVisibility(View.VISIBLE);

    //set the images for the animation container
    container.addAllFrames(IMAGE_RESOURCES, ANIMATION_INTERVAL);

    //when animation restarts, start at frame 14
    container.setRestartAtFrame(14);

    //start the animation
    container.start();

About

Frame Animation Tool For when regular frame animation runs out of memory


Languages

Language:Java 100.0%