Setting the background image of an Android TextView
TextView displays text to the user and optionally allows them to edit it. A TextView is a complete text editor, however the basic class is configured to not allow editing; see for a subclass that configures the text view for editing.
In most cases u want add image as textView background. It’s so easy. In layout xml file u must write:
<textview android:background="@drawable/bubble" android:id="@+id/textViewSMS" android:layout_gravity="center_vertical" android:layout_height="wrap_content" android:layout_width="wrap_content" android:text="A normal PNG file (*.png) will be loaded with an empty one-pixel border added around the image, in which you can draw the stretchable patches and content area. A previously saved 9-patch file (*.9.png) will be loaded as-is, with no drawing area added, because it already exists." </textview>
Then u will see result as following: