Back to project page GalDroid.
The source code is released under:
GNU General Public License
If you think the Android project GalDroid listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package de.raptor2101.GalDroid.WebGallery.Gallery3; //w w w . j a v a2 s. c o m import java.lang.ref.WeakReference; import de.raptor2101.GalDroid.WebGallery.Interfaces.GalleryProgressListener; public class ProgressListener { private final int mMaxCount; private int mObjectCount; private WeakReference<GalleryProgressListener> mListener; public ProgressListener(GalleryProgressListener listener, int maxCount) { mMaxCount = maxCount; mObjectCount = 0; mListener = new WeakReference<GalleryProgressListener>(listener); } public void progress() { mObjectCount++; GalleryProgressListener listener = mListener.get(); if (listener != null) { listener.handleProgress(mObjectCount, mMaxCount); } } }