(55) using Android:drawableright to set up the TextView with picture

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.