Last active
July 31, 2016 17:41
-
-
Save juanpabloprado/f958d6550f9ec4f5a936fba3ce5f40df to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.juanpabloprado.ui.activity; | |
import android.app.ProgressDialog; | |
import android.support.v7.app.AppCompatActivity; | |
public abstract class ActivityWithProgressDialog extends AppCompatActivity { | |
private ProgressDialog mProgressDialog; | |
public void showProgressDialog() { | |
mProgressDialog = | |
ProgressDialog.show(this, null, getString(R.string.progress_dialog_loading), true, false); | |
} | |
public void hideProgressDialog() { | |
if (mProgressDialog != null && mProgressDialog.isShowing()) { | |
mProgressDialog.dismiss(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment