title: Dynamically change TextView in Fragment (public void processMessage)
body: <p>I am looking for a way to create a chat fragment. So basically I am trying to make a fragment dynamic. As a first step I am trying to update a textview which I have to display messages received. I am using XMPP as a client and I am receiving message through the following function:</p>
  
  <pre><code>        @Override
          public void processMessage(Chat arg0, org.jivesoftware.smack.packet.Message message) {
  
              // TODO Auto-generated method stub
              String from = message.getFrom();
              String body = message.getBody();
              System.out.println(String.format("Received message '%1$s' from %2$s", body, from));
              text.setText(String.format("'%1$s' from %2$s", body, from));
          }
  </code></pre>
  
  <p>Any help regarding dynamically updating a textview in a fragment is appreciated.</p>
  
  <p>Thanks </p>
  
  <p>Max</p>