Android LinearLayout Add divider Line

Source: Internet
Author: User

Method One: You can place a ImageView component and then set it as the color or graphic of the divider line. The definition code for the divider view is as follows: [HTML]View Plaincopy
  1. <ImageView
  2.          =  
  3.          =  
  4.          =  
  5.          />< Span style= "Border:none; padding:0px; margin:0px; " >  
The results are as follows: Method two: In Android3.0 and above, LinearLayout supports direct display of divider lines. The Android:showdividers property of the Settings <LinearLayout> label can then display the divider in the corresponding position linearlayout. If you have more than one linearlayout, the display effect is the same as dividing the line between linearlayout. The Android:showdividers property can set the following 4 values: None: Do not display divider lines; Beginning: Displays the divider at the beginning of the LinearLayout; end: Displays the divider at the end of the LinearLayout ; Middle: Displays a divider between every two components in the LinearLayout: In addition to setting the Android:showdividers property, you also set the Android:divider property, which represents the image of the divider line, Need a drawable id  more reference: http://www.dajo.com.cn/a/boke/anzhuo/2013/1030/86.html
Related Article

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.