Saturday, April 9, 2011

[android-developers] Re: help: dont display Toast

On Apr 9, 11:13 am, David Tabernero <davidt...@gmail.com> wrote:
> Hi,
>
> I can't display Toast in my application:
>
> I have this code but nothing happens. Any help please?
>
> Many thanks and sorry for my english!
>
> ....................
> ....................
>   public void wakeonLan (){
>
>         try {
>                          while (pruebaPing(maquina)){
>                 Toast.makeText(ssh.this, "No responde a ping despues de
> mandar el paquete magico en..." + contadorDormido,
> Toast.LENGTH_SHORT).show();
>                 Toast.makeText(getApplicationContext(), "No responde a ping
> despues de mandar el paquete magico en..." + contadorDormido,
> Toast.LENGTH_SHORT).show();
>                 ................
>                 .................

You cannot show Toasts in the loop - system will not show your Toasts
if it cannot dispatch messages

pskink

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment