Coder Social home page Coder Social logo

tastytoast's Issues

Multiple clicks appear too long

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

Error:converting bytecode to dex......

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);
}
替换原此位置代码即可

Bug in animation on successive toast calls

Animation of toast gets finished by the time it is displayed in case multiple toast are called successively.

Following gif shows finished animation when second toast is displayed.
Bug Details

add rtl support

please support RTL languages so that tastytoast icon locate in right side of the layout

About Extendibility

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~~~:)

Problem on rtl layout

My application is RTL and TastyToast has problem in showing message!
You can see it on this image.
image

toast.cancel()

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

Make toasts customisable

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:

  • A default TastyToast.show(text) call that shows a default toast.
  • Change the background color TastyToast.show(text, #color)
  • Pass in the duration in milliseconds, with a maximum bound
  • Either pass in an image or an array of images to display the icon or a gif: TastyToast.show(text, #color, #image), TastyToast.show(text, #color, #image[])

Just a few suggestions.

not working in some devices

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 ?

Memory leak

I'm use leakcanary in my project and I noticed a memory leak occurred.
it say's references ErrorToastView.mContext leaks MainActivity instance
here is the screenshot
74a22ca812d9785d040509e9637a0ed3

Suggest

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.

enum for toast type

It would be better to use enum for toast type , storing them as integer seems to be a bad practice .

about the show time

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.