Animator start - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Animator start method.

This code example shows how to use the following methods:end, isRunning, setTarget, start
            container.start(view, closing);
        } 
    } 
 
    private void start(View view, boolean closing) {
        if (mEnterAnimation.isRunning()) {
            mEnterAnimation.end();
        } 
        if (mExitAnimation.isRunning()) {
            mExitAnimation.end();
        } 
        if (view.getVisibility() != View.VISIBLE) {
            if (!closing) {
                mEnterAnimation.setTarget(view);
                mEnterAnimation.start();
            } 
        } else if (closing) {
            mExitAnimation.setTarget(view);
            mExitAnimation.start();
        } else { 

7
CodeRank
This code example shows how to use the following methods:addListener, start
6
CodeRank
This code example shows how to use the following methods:addListener, start
6
CodeRank
This code example shows how to use the following methods:start
 
    @Override 
    public Result preAnimation() {
        // start the animation. This will send a message to the handler right away, so 
        // the queue is filled when this method returns. 
        mAnimator.start();
 
        return Status.SUCCESS.createResult(); 
    } 
 
    @Override 
    public void postAnimation() { 
        // nothing to be done. 
    } 
} 
6
CodeRank
This code example shows how to use the following methods:start
                    Animator anim = AnimatorInflater.loadAnimator(PropertyAnimations.this, animationID);
                    anim.setTarget(v);
                    anim.start();
                    return; 
                } 
                animation.start();
            } 
        }); 
    } 
} 
7
CodeRank
This code example shows how to use the following methods:addImage, removeImage, waitForID
     */ 
    public BackgroundPainter(Image image, boolean fixed, boolean tile) {
        m_img = image;
         
        // make sure the image is completely loaded 
        MediaTracker mt = new MediaTracker(new Container());
        mt.addImage(m_img, 0);
        try { 
            mt.waitForID(0);
        } catch ( Exception e ) { e.printStackTrace(); }
        mt.removeImage(m_img, 0);
         
        m_fixed = fixed;
        m_tiled = tile;
    } 
     
    /** 
     * Paint the background. 
     * @see prefuse.util.display.PaintListener#prePaint(prefuse.Display, java.awt.Graphics2D) 
     */ 
7
CodeRank
This code example shows how to use the following methods:addImage, isErrorAny, waitForAll
            System.out.println("Couldn't load image " + file);
            return null; 
        } 
 
 
        MediaTracker mt = new MediaTracker(comp);
        try { 
            mt.addImage(img, 0);
            mt.waitForAll();
        } catch (Exception e) {
            System.out.println("Couldn't load image " + file);
            System.out.println(e);
            return null; 
        } 
        if (mt.isErrorAny()) {
            System.out.println("Couldn't load image " + file);
            return null; 
        } 
 
//         ImageObserver observer = new ImageObserver() { 
6
CodeRank
This code example shows how to use the following methods:addImage, removeImage, waitForID
     * Wait for an image to load. 
     * @param image the image to wait for 
     */ 
    protected void waitForImage(Image image) {
        int id = ++nextTrackerID;
        tracker.addImage(image, id);
        try { 
            tracker.waitForID(id, 0);
        } catch (InterruptedException e) {
            e.printStackTrace();
        } 
        tracker.removeImage(image, id);
    } 
     
    /** 
     * Scales an image to fit within the current size thresholds. 
     * @param img the image to scale 
     * @return the scaled image 
     */ 
    protected Image getScaledImage(Image img) {     
6
CodeRank
This code example shows how to use the following methods:addImage, isErrorAny, removeImage, waitForAll
                           RenderingHints.VALUE_ANTIALIAS_ON);
        // 
        // Load Image 
        // 
        Image image = Toolkit.getDefaultToolkit().createImage("test-resources/org/apache/batik/svggen/resources/vangogh.jpg");
        MediaTracker tracker = new MediaTracker(new Button(""));
        tracker.addImage(image, 0);
        try{ 
            tracker.waitForAll();
        }catch(InterruptedException e){
            tracker.removeImage(image);
            image = null;
        }finally { 
            if(image != null)
                tracker.removeImage(image);
            if(tracker.isErrorAny())
                image = null;
            if(image != null){
                if(image.getWidth(null)<0 ||
                   image.getHeight(null)<0)
                    image = null;
6
CodeRank
This code example shows how to use the following methods:addImage, waitForID

Related Animator start Questions & Answers:

start Method Overview
Starts this animation.
See Code Examples for other Android Animator Methods: