Wann wird Snackbar isqueUed () verwendet? (Wie man die Snackbar anstellt)

Post a reply

Smilies
:) :( :oops: :chelo: :roll: :wink: :muza: :sorry: :angel: :read: *x) :clever:
View more smilies

BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Wann wird Snackbar isqueUed () verwendet? (Wie man die Snackbar anstellt)

by Anonymous » 12 Sep 2025, 07:23

Wenn ich die Snackbar mehrmals in einer Zeile aufrufe, wird nur das letzte Snackbar -Element angezeigt. Mit den folgenden Codes würde nur Punkt 3 angezeigt. Es scheint, dass Snackbar.length_long für Punkt 1 und 2 ignoriert (und auf Null gesetzt wird). < /p>

Snackbar.make(view, "Item 1", Snackbar.LENGTH_LONG).show();
Snackbar.make(view, "Item 2", Snackbar.LENGTH_LONG).show();
Snackbar.make(view, "Item 3", Snackbar.LENGTH_LONG).show();
< /code>

In den Google -Dokumenten sehe ich jedoch, dass es möglich ist, die Nachrichten abzuwarten.public boolean isShownOrQueued ()

Returns whether this Snackbar is currently being shown,
or is queued to be shown next.
< /code>
< /blockquote>

Wie können wir die Snackbart tatsächlich anstellen? < /p>

Top