You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: HelpDoc-en.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@
10
10
11
11
*[What should I do if the framework cannot meet the scene I am currently using](#what-should-i-do-if-the-framework-cannot-meet-the-scene-i-am-currently-using)
12
12
13
+
*[How to implement cross page display of toast in the framework](#how-to-implement-cross-page-display-of-toast-in-the-framework)
14
+
13
15
*[Why the framework prefers to use window manager to implement toast](#why-the-framework-prefers-to-use-window-manager-to-implement-toast)
14
16
15
17
#### How to customize toast display animation
@@ -146,6 +148,17 @@ public class ToastStrategy {
146
148
147
149
* The Toaster framework is intended to solve some toast requirements. If Toaster cannot meet your needs, you can consider using the [EasyWindow](https://github.com/getActivity/EasyWindow) floating window framework to achieve it.
148
150
151
+
#### How to implement cross page display of toast in the framework
152
+
153
+
* By default, Toasts in the Toaster framework are only displayed on the current Activity. If an Activity switch occurs, the Toast becomes invisible as the current Activity is destroyed, making it impossible to display on the new Activity. The framework added support for this feature in version [12.5](https://github.com/getActivity/Toaster/releases/tag/12.5). The following is an example of how to use it:
154
+
155
+
```java
156
+
ToastParams params =newToastParams();
157
+
params.text ="I am a Toast that can be displayed across pages";
158
+
// Indicates that this Toast needs to be displayed across pages
159
+
params.crossPageShow =true;
160
+
Toaster.show(params);
161
+
149
162
#### Why the framework prefers to use window manager to implement toast
150
163
151
164
*There are too many pits in the system toast, the main problems are as follows:
## [Please click here to view frequently asked questions](HelpDoc-en.md)
132
140
133
141
#### Comparison between different Toast frameworks
134
142
135
143
| Function or detail |[Toaster](https://github.com/getActivity/Toaster)|[ AndroidUtilCode-ToastUtils ](https://github.com/Blankj/AndroidUtilCode)|[Toasty](https://github.com/GrenderG/Toasty)|
136
144
| :----: | :------: | :-----: | :-----: |
137
-
| Corresponding version | 12.3| 1.30.6 | 1.5.0 |
145
+
| Corresponding version | 12.5| 1.30.6 | 1.5.0 |
138
146
| Number of issues |[](https://github.com/getActivity/Toaster/issues)|[](https://github.com/Blankj/AndroidUtilCode/issues)|[](https://github.com/GrenderG/Toasty/issues)|
* Android version guide: [AndroidVersionAdapter](https://github.com/getActivity/AndroidVersionAdapter)
0 commit comments