Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to dismiss automatic ? #71

Open
lucazin opened this issue Aug 10, 2018 · 0 comments
Open

How to dismiss automatic ? #71

lucazin opened this issue Aug 10, 2018 · 0 comments

Comments

@lucazin
Copy link

lucazin commented Aug 10, 2018

i want to simulate a loading with this dialog.. i call a function inside pre execute asynctask and in post execute the same dialog dismiss .. how can i do that ?

im trying but no sucess.. someone can help me ?

public class Helper_Functions_Dialogs
{
public static WeakReference ProgressDialogGeral;

//region Loading
public static void LoadingScreen(boolean show, String Titulo,String Mensagem, Activity activity) {

    if(ProgressDialogGeral == null)
        ProgressDialogGeral  = new WeakReference<MaterialStyledDialog>(new 
        MaterialStyledDialog.Builder(activity).build());
        
    if(show)
    {
           ProgressDialogGeral.get().getBuilder()
                   .setHeaderDrawable(R.drawable.header_dialog)
                   .setTitle(Titulo)
                   .setCancelable(false)
                   .withDialogAnimation(true)
                   .setPositiveText("Load...")
                   .setDescription(Mensagem);
          
        ProgressDialogGeral.get().show();
    }
    else
    {
        ProgressDialogGeral.get().dismiss();
        ProgressDialogGeral = null;
    }
}

}

The dialog not dismissing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant