Skip to content

Instantly share code, notes, and snippets.

@azzeddineCH
Created July 16, 2017 21:20
Show Gist options
  • Save azzeddineCH/1d47445063b6f6c7bf98b9d8832ead83 to your computer and use it in GitHub Desktop.
Save azzeddineCH/1d47445063b6f6c7bf98b9d8832ead83 to your computer and use it in GitHub Desktop.
/**
* a method to handle the state of the auth widgets, it displays a progress bar while the
* firebase authentication network process
* @param state if true the progress bar will be shown
* @param view holds the auth widget to hide or dispaly
*/
private void showProgress(boolean state,View view){
mProgressBarContainer =view.findViewById(R.id.progress_bar_container);
mEmailPasswordAuthContainer = view.findViewById(R.id.email_password_auth_container);
if(state) {
mProgressBarContainer.setVisibility(View.VISIBLE);
mEmailPasswordAuthContainer.setVisibility(View.GONE) ;
} else {
mProgressBarContainer.setVisibility(View.GONE) ;
mEmailPasswordAuthContainer.setVisibility(View.VISIBLE);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment