界面优化处理技术之(三)登录框表格组件优化处理

  • 在res下drawable下创建xml文件

代码:

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="#55FFFFFF"/>
5     <stroke android:width="0.5dp" android:color="#FFFFFF"/>
6 </shape>
login_border_bg.xml
  • 添加标签设置对其进行组件外观设置
  • 布局文件中LinearLayer标签添加padding属性设置布局边距

代码:

1  <LinearLayout
2         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

 


运行:

posted @ 2015-12-24 08:16  阿兰德鱼  阅读(382)  评论(0编辑  收藏  举报