分层嵌套的登录
来源:互联网 发布:数据库查找语句 编辑:程序博客网 时间:2024/05/29 13:17
主层代码:activity_main
<span style="font-family:KaiTi_GB2312;font-size:24px;"><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/main_content_bg" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" > <include android:id="@+id/include1" layout="@layout/login_top"/> <ImageView android:id="@+id/imageView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/monkey" android:layout_alignParentBottom="true" android:layout_alignRight="@+id/include1" android:layout_marginBottom="20dp" > </ImageView> <TextView android:id="@+id/tvForgetPass" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignRight="@+id/include1" android:layout_below="@+id/include1" android:layout_marginTop="24dp" android:text="@string/tvForgetPass" android:textAppearance="?android:attr/textAppearanceMedium" /> </RelativeLayout></span>
<span style="font-family: SimSun;">嵌套的登录代码:login</span>
<pre name="code" class="html"><span style="font-family:KaiTi_GB2312;font-size:24px;"><?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="wrap_content" android:background="@drawable/logintopbg" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" > <EditText android:id="@+id/etName" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:layout_centerHorizontal="true" android:layout_marginTop="10dp" android:background="@android:drawable/edit_text" android:drawableLeft="@drawable/icons_user_img" android:ems="10" android:hint="@string/etname" > <requestFocus /> </EditText> <EditText android:id="@+id/etPassword" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignLeft="@+id/etName" android:layout_below="@+id/etName" android:layout_marginTop="20dp" android:background="@android:drawable/edit_text" android:drawableLeft="@drawable/icons_password_img" android:drawablePadding="10dp" android:ems="10" android:hint="@string/etPassword" android:inputType="textPassword" /> <LinearLayout android:id="@+id/linearLayout1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignLeft="@+id/etPassword" android:layout_below="@+id/etPassword" android:layout_marginTop="10dp" > <Button android:id="@+id/btnLogin" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:background="@drawable/btn_select" android:text="@string/btnLogin" /> <Button android:id="@+id/btnRegiste" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:layout_marginLeft="5dp" android:background="@drawable/btn_select" android:text="@string/btnRegiste" /> </LinearLayout></RelativeLayout></span>
主要的Button和设置:
1.btn_select
<?xml version="1.0" encoding="utf-8"?><selector xmlns:android="http://schemas.android.com/apk/res/android" > <!-- 按钮点击和不点击的效果 属性: android:state_pressed: false:未按下 true:按下 --><item android:drawable="@drawable/btn_shape" android:state_pressed="false"></item><item android:drawable="@drawable/btn_shape_after" android:state_pressed="true"></item></selector>2.btn_shape
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="#FF72CAE1"/> <corners android:radius="10dp"/></shape>3.btn_shape_after
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" > <!-- solid:填充色 corners:边角的弧度 --> <solid android:color="#87cefa"/> <corners android:radius="10dp"/></shape>4.login
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="#55FFFFFF"/> <corners android:radius="10dp"/></shape>5.logintopbg
<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" > <solid android:color="#55ffffff"/> <corners android:radius="10dp"/></shape>
表现形式:
待续……
0 0
- 分层嵌套的登录
- 用于显示分层数据的嵌套网格
- 框架嵌套实现网页的分层
- 登录页面嵌套的问题
- 用于显示分层数据的嵌套网格(from msdn)
- 登录分层实例
- 使用分层实现登录
- 重新登录,页面嵌套问题的解决办法
- 【ASP】利用MVC分层结构,优化ASP的登录系统的写作
- C# 分层开发的案例 学生管理系统 实现用户的登录和修改密码
- 分层应用——如何实现登录?
- 解决登录失效时,跳转登录页面的iframe嵌套问题
- 分层第一章软件系统的分层开发
- laravea 添加 分层/嵌套 控制器 (方法二)
- Symbian的分层
- datagrid的数据分层
- Symbian的分层
- 结构分层的经验谈
- Python序列之列表和元组
- Oracle权限管理介绍
- select系统调用 -- 文件描述符就绪条件
- CocoaPods 使用方法介绍
- Sql学习第四天——SQL关于with cube,with rollup和grouping
- 分层嵌套的登录
- 浅谈:Java静态变量以及静态方法。
- 安装mysql workbench
- java web error:Choose unique values for the 'webAppRootKey' context-param in your web.xml files
- SpringMVC实例
- Spring MVC 学习
- UVALive 7269 (构造)
- Android编程学习笔记 之 File数据存储
- java之GUI文件对话框javax.swing.JFileChooser