Android Learning-interface-use point 9 to make a pull-up picture

Source: Internet
Author: User

Online Search for pictures

The point on the left represents the vertically stretched area, and the top point represents the horizontally stretched area.

The point on the right represents the vertical cocoa display area of the text, and the lower point represents the horizontal display area of the text.

The area that overlaps on the left is the stretch area, and the area that is coincident on the right is the display area.

The display area is actually refers to the Text property of the control to display the area, used to think that the text is displayed on the image of the location, below the example with text

3 Images processed

Figure 1

Figure 2

Figure 3

Effect

Xml

<Relativelayoutxmlns:android= "Http://schemas.android.com/apk/res/android"Android:layout_width= "Fill_parent"Android:layout_height= "Fill_parent" >    <ButtonAndroid:id= "@+id/button01"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_alignparentleft= "true"Android:layout_alignparenttop= "true"Android:background= "@drawable/a11"Android:layout_margin= "2DP"         />    <ButtonAndroid:id= "@+id/button1"Android:layout_width= "Match_parent"Android:layout_height= "Wrap_content"Android:layout_alignparentleft= "true"Android:layout_below= "@+id/button01"Android:background= "@drawable/a11"Android:layout_margin= "2DP"/>    <ButtonAndroid:id= "@+id/button2"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_alignparentleft= "true"Android:layout_below= "@+id/button1"Android:background= "@drawable/a22"Android:layout_margin= "2DP"/>    <ButtonAndroid:id= "@+id/button02"Android:layout_width= "Wrap_content"Android:layout_height= "Match_parent"Android:layout_alignparentleft= "true"Android:layout_below= "@+id/button2"Android:background= "@drawable/a22"Android:layout_margin= "2DP" />    <ButtonAndroid:id= "@+id/button3"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_aligntop= "@+id/button2"Android:layout_torightof= "@+id/button2"Android:background= "@drawable/a33"Android:layout_margin= "2DP"/>    <ButtonAndroid:id= "@+id/button03"Android:layout_width= "Wrap_content"Android:layout_height= "Wrap_content"Android:layout_alignleft= "@+id/button3"Android:layout_alignparentbottom= "true"Android:layout_alignparentright= "true"Android:layout_below= "@+id/button3"Android:background= "@drawable/a33"Android:layout_margin= "2DP"/></Relativelayout>

Example with text area

To be Continued ...

Android Learning-interface-use point 9 to make a pull-up 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.