Affichage TextView sur ImageView dans android

Je veux afficher un texte sur une Image Vue. Je ne l'aime Alesqui suggéré ici:
Android de Texte sur l'image

L'aperçu dans Android studio a l'air bien:
Affichage TextView sur ImageView dans android

Mais mon résultat ressemble à ceci avec le texte unwantedly ci-dessus:

Affichage TextView sur ImageView dans android

- Je ajouter le code XML suivant dynamiquement à un LinearLayout pendant l'exécution:

<RelativeLayout 
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/relativelayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <ImageView
        android:id="@+id/myImageView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/myImageSouce" />

    <TextView
        android:id="@+id/myImageViewText"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignLeft="@+id/myImageView"
        android:layout_alignTop="@+id/myImageView"
        android:layout_alignRight="@+id/myImageView"
        android:layout_alignBottom="@+id/myImageView"
        android:layout_margin="1dp"
        android:gravity="center"
        android:text="Hello"
        android:textColor="#000000" />

</RelativeLayout>

Je ajouter de la façon suivante:

LinearLayout ll = (LinearLayout) findViewById(R.id.layout_story_covers);
LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);

    for (int i = 0; i < stories.size(); i++)
    {
        //add  imageView
        RelativeLayout coverLayout = (RelativeLayout) inflater.inflate(R.layout.fragment_cover, null);
        ImageView imageView =(ImageView) coverLayout.findViewById(R.id.imageViewCover);
        TextView textView = (TextView) coverLayout.findViewById(R.id.textViewCover);
        textView.setText(stories.get(i).title);
        imageLoader.displayImage(stories.get(i).cover.fileUrl, imageView);
        ll.addView(coverLayout);
    }

Cela doit avoir quelque chose à voir avec ce parent LinearLayout. Quelle est la bonne façon de le faire obtenir le résultat?

le textcolor est faux. il devrait être noir, pas jaune. Et il faut dire Bonjour, pas Mon Texte.
ouais, c'est incohérent. Mais j'ai négligé qu'en raison de sa moindre importance.

OriginalL'auteur dba | 2014-11-17