yadav-rahul / tastytoast Goto Github PK
View Code? Open in Web Editor NEW:bread: Make your native android Toasts Tasty
:bread: Make your native android Toasts Tasty
If you accidentally multi-point several times, really very uncomfortable experience
Forgive my English is bad, directly on the code.
public static void showToast(Context context, String content) { if (toast == null) { toast = Toast.makeText(context, content, Toast.LENGTH_SHORT); } else { toast.setText(content); } toast.show(); }
I‘m learn from guolin
The TastyToast is awesome!
When I run my project then I got an exception,the detailed exception infomation is below.
do you know how to fix this problem.
Thx in advance.
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/facebook/rebound/AndroidSpringLooperFactory$ChoreographerAndroidSpringLooper$1;
Error:Execution failed for task ':app:transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationException
建议修改吐司为静态吐司 在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);
}
替换原此位置代码即可
魅蓝3s 无法使用,demo运行后,不能使用
please support RTL languages so that tastytoast icon locate in right side of the layout
This is no longer supported in android 9
Hello,your Toast is great and I like it.But actually, sometimes I really want to move it to the center of the screen(And maybe some other changes anyway).So,hope that you can give users more methods to operate the Toast or just let it extends the native Toast~~~:)
it always gets stuck for a while
If the toast message is created in a short period of time, it is duplicated
Is there a way to solve it?
Hello , I think your TastyToast need a function of toast.cancel() .
I can't cancel the TastyToast when i close my activity or fragment , and i think a cancel of toast is important.
Thank's for your code , i like the TastyToast , it's beautiful
its not work in android pie.. i put the last version in gradle.
i have to do something else?
After looking through the code it seems like the toasts are quite hard coded, apart from the text it displays and the duration (which matches the normal toast duration of long (1) and short (0)).
Here are some suggestions so that others can begin to use this feature in their apps:
TastyToast.show(text)
call that shows a default toast.TastyToast.show(text, #color)
TastyToast.show(text, #color, #image)
, TastyToast.show(text, #color, #image[])
Just a few suggestions.
thank you for this,
but it's not working on some ASUS and Hawaui devices, but work great on Samsung.
any ideas to fix this ?
The code for warning toast is changed, and the preview should reflect that change
Will be there any update ?
onDraw should not new objects that will allocate too much memory...
Hi,Thank you very much for open source this library,There is a small suggestion,Is it possible to modify the background color of toast?Because some pages themselves are white background, it is not obvious,thank.
it would be more cool if u add feature to positioning the toast..
It would be better to use enum for toast type , storing them as integer seems to be a bad practice .
where to change the background color of successful download toast?
as we know Toast and your TasyToast use the Toast_LOGIN or TOAST_SHORT to control the Toast show Time .
Can we make it more intelligence ,put a long type parameter to control the show time? Or cancel it when I want.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.