yadav-rahul / TastyToast

:bread: Make your native android Toasts Tasty
2.04k stars 356 forks source link

完善建议 #20

Open feisher opened 7 years ago

feisher commented 7 years ago

建议修改吐司为静态吐司 在TastyToast类中修改 代码如下:

static Toast toast = null; //Toast的对象! public static Toast makeText(Context context, String msg, int length, int type) { if (toast==null) { toast= new Toast(context); } 替换原此位置代码即可

yadav-rahul commented 7 years ago

@feisher LGTM. Are you interested in implementing this part?

feisher commented 7 years ago

@yadav-rahul Yes, I am very interested, but I am sorry that my Github is not use good, I have to modify their own local library, very few online modification,

yadav-rahul commented 7 years ago

@feisher Are you working on this?

yadav-rahul commented 7 years ago

@feisher If you are working on this one then please update your progress regarding it.

nullkk commented 6 years ago

@yadav-rahul Thank you for this libs I found clicking the same button multiple times Will appear many times toast, He was revised , toast Singleton mode.

wx20180126-152629 2x
nullkk commented 6 years ago

@feisher 老哥 多次点击 还是会多次出现 能不能只出现一次,他这个 toast搞成了单例, 但是view 不能只绘制一次吧 ?

feisher commented 6 years ago

@nullkk改写后的效果是这样,是为了 保证实时显示的是最新的toast提示,肯定需要二次绘制的,不然怎么更新内容 mark

nullkk commented 6 years ago

@feisher 我把layout的view也写成单列了. 每次调用判断是否为空,不为空直接showview.这样只加载一次view, 但是会有问题 比如我点了error 类型 set10个文字 在点info类型set 3个文字 view是只加载了一次 但是文字大小都设置不一样.这个view就不会刷新..

gzehua commented 6 years ago

Android高版本中关闭notification权限,还能显示吗?

feisher commented 6 years ago

@gzehua toast和通知权限无关,完全不受影响的