Original Problem description: I want to get the following results in the android app: the background image I used is a nine-patch png image. I use a text view to implement it, but this is not the result. What should I do? Solution: Use a TextView? Do we need to get the front, back, and middle spaces for each change? [Java] <RelativeLayout android: id = "@ + id/relativeLayout1" android: layout_height = "50dp" android: layout_width = "200dp" android: background = "" @ drawable/rowimage "> <TextView android: id =" @ + id/textView1 "android: text =" TextView1 "android: layout_height =" wrap_content "android: layout_width = "wrap_content" android: layout_marginLeft = "10dp" android: layout_alignParentLeft = "true" android: layout_centerVertical = "true"/> <TextView www.2cto.com android: id = "@ + id/textView2" android: text = "TextView2" android: layout_height = "wrap_content" android: layout_width = "wrap_content" android: layout_marginRight = "10dp" android: layout_alignParentRight = "true" android: layout_centerVertical = "true"/> </RelativeLayout>