Java Code Examples for android.view.View#scheduleDrawable()

The following examples show how to use android.view.View#scheduleDrawable() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MultiCallback.java    From android-gif-drawable-eclipse-sample with MIT License 5 votes vote down vote up
@Override
public void scheduleDrawable(final Drawable who, final Runnable what, final long when) {
    for (int i = 0; i < mViewList.size(); i++) {
        final ViewWeakReference reference = mViewList.get(i);
        final View view = reference.get();
        if (view != null) {
            view.scheduleDrawable(who, what, when);
        } else {
            // Always remove null references to reduce Set size
            mViewList.remove(reference);
        }
    }
}