Définir le texte en ImageButton

J'ai un ImageButton qui ressemble à ceci.

 <ImageButton
            android:id="@+id/ImageButton"
            android:layout_width="200dp"
            android:layout_height="200dp"
            android:layout_gravity="center"
            android:layout_marginBottom="6px"
            android:layout_marginRight="3px"
            android:layout_toRightOf="@+id/Logo"
            android:background="@drawable/button_bg_purple"
            android:scaleType="fitStart"
            android:src="@drawable/ImageButton" />


 ImageButton ImgButton= (ImageButton) this.findViewById(R.id.ImageButton);

Maintenant, j'ai besoin d'ajouter un texte dynamique dans ImageButton par programme et je ne peux pas utiliser le bouton.
Comment puis-je le faire?

Merci D'Avance ...

Pourquoi n'utilisez-vous pas un Bouton? ImageButtons n'ont pas une propriété de texte. Ils étendent l'ImageView. Si vous ne voulez pas utiliser un Bouton, puis utilisez un TextView. OU... vous aurez pour attirer votre texte à l'intérieur de la ImageButton par programmation... une overkill!
ImageButton ne peut pas avoir de texte!

OriginalL'auteur Suniel | 2014-02-14