Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Need DURATION_INDEFINITE ! #109

Open
mustafa-fahimi opened this issue Apr 6, 2017 · 1 comment
Open

Need DURATION_INDEFINITE ! #109

mustafa-fahimi opened this issue Apr 6, 2017 · 1 comment

Comments

@mustafa-fahimi
Copy link

Hi. Please add infinite duration for this beautiful toast. Its really needed for everyone i guess. Thanks.

@ga25
Copy link

ga25 commented Jul 24, 2017

step1:
add a flag of keeping show in Style Class:
public static final int DURATION_MAX=-1;
step2:
set duration with the flag:
toast.setDuration(Style.DURATION_MAX);
step3:
compare duration with the flag in displaySuperToast() of Toast Class , if matched do nothing before execute sendDelayedMessage():
private void displaySuperToast(SuperToast superToast)
{
...
if (duration == Style.DURATION_MAX)
//do nothing
return;
sendDelayedMessage(superToast, Messages.REMOVE_SUPERTOAST,superToast.getDuration() + AnimationUtils.SHOW_DURATION);
...
}

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

No branches or pull requests

2 participants