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: