0

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();
tux-world
  • 2,680
  • 6
  • 24
  • 55

1 Answers1

1

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

Blackbelt
  • 156,034
  • 29
  • 297
  • 305