Android uses Reative_layout to generate the plum interface

Source: Internet
Author: User

XML code:

<?xml version= "1.0" encoding= "Utf-8"? ><relativelayout xmlns:android= "http://schemas.android.com/apk/res/ Android "Android:layout_width=" Match_parent "android:layout_height=" Match_parent "> <!--defines the component in the middle of the parent container- -><textview android:id= "@+id/view01" android:layout_width= "50DP" android:layout_height= "50DP" Android:back Ground= "@drawable/A" android:layout_centerinparent= "true"/><!--defines that the component is located above the parent container--><textview android:id= " @+id/view02 "android:layout_width=" 50DP "android:layout_height=" 50DP "android:background=" @drawable/A "Androi D:layout_above= "@id/view01" android:layout_alignleft= "@id/view01"/><!--defined that the component is located below the View01 component-->< TextView android:id= "@+id/view03" android:layout_width= "50DP" android:layout_height= "50DP" android:background= "@ drawable/a "android:layout_below=" @id/view01 "android:layout_alignleft=" @id/view01 "/><!--defines the component that is located in the VIEW01 component Left--><textview android:id= "@+id/vieW04 "android:layout_width=" 50DP "android:layout_height=" 50DP "android:background=" @drawable/A "android:layout _toleftof= "@id/view01" android:layout_aligntop= "@id/view01"/><!--the component is located on the right side of the view01 component--><textview Androi    D:id= "@+id/view05" android:layout_width= "50DP" android:layout_height= "50DP" android:background= "@drawable/A" android:layout_torightof= "@id/view01" android:layout_aligntop= "@id/view01"/></relativelayout>

Effect:



Android uses Reative_layout to generate the plum interface

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.