getActivity / Toaster

Android 吐司框架,专治 Toast 各种疑难杂症
Apache License 2.0
3.25k stars 406 forks source link

Toast可以自定义显示时长 #84

Closed DodoSpringLove closed 2 years ago

DodoSpringLove commented 2 years ago

Toast可以自定义显示时长

DodoSpringLove commented 2 years ago

3s太短了

getActivity commented 2 years ago

getActivity commented 2 years ago

小伙子,你仔细看过文档了没?

DodoSpringLove commented 2 years ago

image 老大,你这要的不是ToastStregy呀。。。是我的版本不对吗?

DodoSpringLove commented 2 years ago

image

implementation 'com.github.getActivity:ToastUtils:9.6'

这是我用的版本,支持Style自定义

getActivity commented 2 years ago

升级一下,这个功能是最新版本才有的

riggionLin commented 2 years ago

java.lang.NullPointerException: Attempt to invoke interface method 'android.view.View com.hjq.toast.config.IToastStyle.createView(android.content.Context)' on a null object reference at com.hjq.toast.ToastStrategy.createToast(ToastStrategy.java:90) at com.xiaoe.merchant.ui.knowledge.video.CreateVideoActivity$initClick$3$1.createToast(CreateVideoActivity.kt:103)

riggionLin commented 2 years ago

空指针,我是在特定场景下设置的,能否提供长和端时间的显示的方法

getActivity commented 2 years ago

@riggionLin 小伙子,我不推荐你修改默认的 Toast 策略,如果因此出现了问题只能靠你自己排查和修复了。