Back to project page wizapp.
The source code is released under:
MIT License
If you think the Android project wizapp 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 com.wb.wizapp.ui; //w ww . j a va 2s.co m import android.app.Activity; import android.app.DialogFragment; import android.os.Handler; import android.util.Log; import com.wb.wizapp.IConstants; public class BaseActivity extends Activity { private DialogFragment frg; private final int PROGRESS_TIMEOUT = 2 * 1000; public void ShowProgress() { Log.d(IConstants.LOG_TAG, "ShowProgress"); if (frg == null) { frg = new BaseProgressFragment(); } if (!frg.isVisible()) { frg.show(getFragmentManager(), "progress"); new Handler().postDelayed(new Runnable() { @Override public void run() { HideProgress(); } }, PROGRESS_TIMEOUT); } } public void HideProgress() { if (frg != null && frg.isVisible()) { Log.d(IConstants.LOG_TAG, "HideProgress"); frg.dismiss(); } } }