[android-beginners] How to get last added TextView of a ListView after ArrayAdapter.add()

2009-05-05 Thread JackMaster
Hi all! I'm doing the following inside a handleMessage() method of an Handler object: arrayAdapter.add(myMessage); System.out.println(listView.getChildCount()); I always get the expected numer (i.e. 1 after the first add() call) minus 1. I supposed it happens because the UI is not yet refreshed.

[android-beginners] Activity, I got CalledFromWrongThreadException

2009-05-04 Thread JackMaster
Hello all! I'm going to implement a simple chat application. I designed to introduce an interface called TextReceiveListener that expose just one method: void receive(String message) Doing so, I wrote this: public class SChat extends Activity implements TextReceiveListener { ... public

[android-beginners] Activity, I got CalledFromWrongThreadException

2009-05-04 Thread JackMaster
Hello all! I'm going to implement a simple chat application. I designed to introduce an interface called TextReceiveListener that expose just one method: void receive(String message) Doing so, I wrote this: public class SChat extends Activity implements TextReceiveListener { ... publ