Android Question How to close a Toast

LucaMs

Expert
Licensed User
Longtime User
I shamelessly take advantage of the experience of Klaus and Erel :cool:.
I hope to reciprocate in some way, sooner or later.

I would like to be able to "close" a toast. I used the class of Margret and it works (I have changed something but now I do not remember what).

But it has one big problem: it interferes with the library IME, in the sense that using her class, now the keyboard hides the EditText on which I write.

I remember that even with the great class of Klaus Scale had a similar problem and was enough for me to initialize the IME object after the call to ScaleAll.

In this case I can not find solutions.

Is there a way using reflection to "close" the usual toast?
Or some hint to modify the cToastClass?

Many thanks
 

stevel05

Expert
Licensed User
Longtime User
Not with the standard ToastMessageShow, here's a little test I did a long time ago it's a code module, you can put it in a class and/or compile to library if you wish.

It creates a standard android Toast Message that allows the cancel method to be called on it.
 

Attachments

  • tt.zip
    6 KB · Views: 403
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
Not with the standard ToastMessageShow, here's a little test I did a long time ago it's a code module, you can put it in a class and/or compile to library if you wish.

It creates a standard android Toast Message that allows the cancel method to be called on it.


Many thank, Steve, i'll try it.


P.S. Perfect, thank you again :)
 
Last edited:
Upvote 0
Top