1, let TextView realize the following red circle picture effect
2, TextView implementation with pictures, as long as through the android:drawableright set on the line
<TextViewAndroid:id= "@+id/sq_question1"Android:layout_width= "Match_parent"Android:layout_height= "52DP"Android:layout_marginbottom= "9DP"Android:background= "@drawable/corners_bg"Android:drawableright= "@drawable/question_down"android:gravity= "Center|left"Android:paddingleft= "20DP"Android:paddingright= "24DP"Android:singleline= "true"Android:text= "Please select your password protection problem"Android:textcolor= "@color/black"android:textsize= "15DP"Android:textstyle= "normal" />
3. The contents of the Corners_bg.xml file are as follows:
<?XML version= "1.0" encoding= "Utf-8"?> <Shapexmlns:android= "Http://schemas.android.com/apk/res/android"> <SolidAndroid:color= "@color/white" /> <StrokeAndroid:width= "1DP"Android:color= "#bfbfbf" /> <CornersAndroid:topleftradius= "7DP"Android:toprightradius= "7DP"Android:bottomrightradius= "7DP"Android:bottomleftradius= "7DP"/> </Shape>
(55) using Android:drawableright to set up the TextView with picture