GrenderG / Toasty

The usual Toast, but with steroids 💪
GNU Lesser General Public License v3.0
6.57k stars 809 forks source link

重复弹出 #3

Closed xiangxm closed 7 years ago

xiangxm commented 7 years ago

hi 博主,这个toast会重复弹出。可以优化一下

GrenderG commented 7 years ago

Hello @xiangxm, would you mind to explain your issue in English? I'm afraid I'm not able to understand you.

lodgkk commented 7 years ago

His meaning should be, if you click quickly, toast will continue to pop up, the feeling is very poor, you can determine whether there is a change in the contents of the existence of direct

GrenderG commented 7 years ago

That's the usual behavior of a Toast, internally it has an stack where Toasts are kept until they can show up. You shouldn't create an app where Toasts are popping constantly, it would be an excess of information; even if you create an app like that, it's good for the user to be able to see all the feedback the app is sending to him.

dokiKit commented 6 years ago

if you need debouncing, use rxjava. if you want this behavior on your ui, use rxbinding. For example

RxView.clicks(setWallpaperButton)
                .debounce(300,TimeUnit.MILLISECONDS)
                .subscribe { 
                    // show your toast
                }
xiangxm commented 6 years ago

thanks a lot . :)