can any开发者_开发技巧body tell how to display background image in a TextView in android?
If you are working with xmls you can add it as Praveen Chandrasekaran said doing:
android:background="@drawable/myResouce"
Before that you have to put your image file inside the res/drawable folder.
You can also change it from the code doing:
  mTextView.setBackgroundResource(R.drawable.myResouce);
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.
android:background="@drawable/mark"
Also review.... your background image should be a 9.png and add some paddings for your content
           android:layout_marginLeft="10dp" android:layout_marginRight="10dp"
            android:layout_height="400dp" android:background="@drawable/mark"
            android:paddingTop="5dp" android:paddingBottom="5dp" android:paddingLeft=
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论