Interface Optimization and processing technology (iii) Optimize table components in the logon box and table components

Source: Internet
Author: User

Interface Optimization and processing technology (iii) Optimize table components in the logon box and table components

  • Create an xml file under drawable under res

Code:

1 <? Xml version = "1.0" encoding = "UTF-8"?> 2 <shape xmlns: android = "http://schemas.android.com/apk/res/android"> 3 <corners android: radius = "8dp"/> 4 <solid android: color = "#55 FFFFFF"/> 5 <stroke android: width = "0.5dp" android: color = "# FFFFFF"/> 6 </shape> login_border_bg.xml
  • Add Tag settings to set the component appearance
  • Add the padding attribute to the LinearLayer label in the layout file to set the layout margin.

Code:

1 <LinearLayout2 android: orientation = "vertical" 3 android: layout_width = "fill_parent" 4 android: layout_height = "wrap_content" 5 android: layout_centerVertical = "true" 6 android: background = "@ drawable/login_border_bg" 7 android: padding = "10dp"> activity_login.xml

 


Run:

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.