title: Android - Set text to TextView
body: <p>I'm currently learning some android for a school project and I can't figure out the way to <strong>set text dynamically</strong> to a <code>TextView</code>. </p>
  
  <p>Here is my code:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_enviar_mensaje);
      err = (TextView)findViewById(R.id.texto);
      err.setText("Escriba su mensaje y luego seleccione el canal.");
  }
  </code></pre>
  
  <p>This is currently not working and I can't find a way to make it work...</p>
  
  <p>Any help will be much appreciated...
  Thank you for the time,
  José.</p>
  
  <p>EDIT: Here is the <strong>activity_enviar_mensaje.xml</strong></p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      ...
      tools:context=".EnviarMensaje" &gt;
      ...
      &lt;TextView
          android:id="@+id/texto"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignLeft="@+id/listaVista"
          android:layout_alignParentBottom="true"
          android:layout_alignRight="@+id/listaVista"
          android:text="TextView" /&gt;
      ...
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>By not working I mean the text shown does not change at any moment...</p>