tags:

views:

43

answers:

2

can anybody tell how to display background image in a TextView in android?

A: 

add a android:background="@drawable/imagefile" attribute on your TextView tag. Before that you have to put your image file inside the res/drawable folder.

Praveen Chandrasekaran
A: 

If you are working with xmls you can add it as Praveen Chandrasekaran said doing:

android:background="@drawable/myResouce"

You can also change it from the code doing:

  mTextView.setBackgroundResource(R.drawable.myResouce);
Macarse