So I have a textview in which I tv.append some strings when my listener get's some specific data. The problem is, that textview updates the text only when I move to another view or hide app in the background and then get it back to the front. So basicaly i make a textview, Then I have a listener based on asmack library (XMPP) When i recieve a messgae I append it to textview, but i can see it only by moving to another view and going back.
tv = (TextView)findViewById(R.id.textwindow);
chat = xmpp.getChatManager().createChat(contactid, new MessageListener() {
public void processMessage(Chat chat, Message message) {
System.out.println("Reciveved:"+ message);
tv.append("From:"+chat.getParticipant()+"\n"+message.getBody()+"\n");
}
}
);;