Crouton disable auto hide

68 Views Asked by At

I'm using Crouton library and i'm trying to disable auto hide after finish duration. how can i disable that and can be hide when i want to hide that?

this is my code and i can't find some option to do that

crouton = Crouton.makeText(activity, AndroidUtilities.getString(R.string.please_wait_for_prepare_data, context),
        new Style.Builder()
                .setTextSize((int) AndroidUtilities.getAdjustTextSize(activity, context))
                .setBackgroundColor(android.R.color.holo_green_dark)
                .build(), rootLayout);
crouton.show();
1

There are 1 best solutions below

0
On

use DURATION_INFINITE as duration for you Crouton, and set an OnClickListener on its View, using setOnClickListener. When the callback is called, call hide on your Crouton instance