Code example for WeakReference

Methods: get

0
        mNative = new WeakReference<android.view.ViewPropertyAnimator>(view.animate());
    } 
 
    @Override 
    public ViewPropertyAnimator setDuration(long duration) {
        android.view.ViewPropertyAnimator n = mNative.get();
        if (n != null) {
            n.setDuration(duration);
        } 
        return this;
    } 
 
    @Override 
    public long getDuration() { 
        android.view.ViewPropertyAnimator n = mNative.get();
        if (n != null) {
            return n.getDuration();
        } 
        return RETURN_WHEN_NULL;
    } 
Stop searching for code, let great code find you!  Add Codota to your java IDE