Comment concat texte dans TextView Android?

Je veux concat deux de texte et de l'afficher avec un seul TextView Android. J'ai essayé de type suivant. Il affiche dans le logcat, mais il n'est pas concat en XML textview.

Voici mon code:

<TextView
              android:id="@+id/heizgriffe"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Heizgriffe"
              android:textColor="#000"
              android:textSize="12dp"
              android:textStyle="bold"

              android:layout_below="@+id/txt"/>

dans la classe Java:

txtConcat = (TextView)findViewById(R.id.txt);
String hub="Hubraum:";
            String str= ItemList.getTxt(); //fetting from webservice
            txtConcat .setText(hub + str );

Quelque chose de mal ici?

OriginalL'auteur selva | 2012-03-07