android内部培训视频_第五节(1)_OA实战之登录界面
第五节(1):OA实战之登录界面
一、登录界面布局
1.背景图片
2.文本框
3.checkbox
4.按钮
暂未实现点击切换图片效果
<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:paddingLeft="20dp"
android:paddingRight="20dp"
android:gravity="center"
android:background="@drawable/login_bj"
tools:context=".MainActivity" >
<LinearLayout
android:id="@+id/ll01"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical" >
<EditText
android:id="@+id/txtUserName"
android:layout_width="match_parent"
android:layout_height="70dp"
android:background="@drawable/input"
android:layout_marginBottom="20dp"
android:hint="@string/txtusername_tips"
android:inputType="none" />
<EditText
android:id="@+id/txtPassword"
android:layout_width="match_parent"
android:layout_height="70dp"
android:background="@drawable/input"
android:layout_marginBottom="20dp"
android:hint="@string/txtpassword_tips"
android:inputType="textPassword" />
<LinearLayout
android:id="@+id/ll02"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_horizontal"
android:layout_marginBottom="20dp"
>
<CheckBox
android:id="@+id/cbPass"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cbpass_txt"
/>
<CheckBox
android:id="@+id/cbAuto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/cbauto_txt"
/>
</LinearLayout>
<Button
android:id="@+id/btnLogin"
android:layout_width="match_parent"
android:layout_height="70dp"
android:background="@drawable/login_btn"
android:text="@string/btnlogin_txt"
android:textSize="25sp"
android:textColor="#FFF"
/>
</LinearLayout>
</RelativeLayout>

SharedPreferences sharedPreferences = getSharedPreferences(
"userinfo", MODE_PRIVATE);
String userName = sharedPreferences.getString("userName", "");
String userPass = sharedPreferences.getString("passWord", "");
if(!"".equals(userName) && !"".equals(userPass)){
txtUserName.setText(userName);
txtPassword.setText(userPass);
}
android内部培训视频_第五节(1)_OA实战之登录界面的更多相关文章
- android内部培训视频_第四节(1)_异步网络操作
第四节(1):异步网络操作 一.结合asyncTask下载网络图片 1.定义下载类,继承自asyncTask,参数分别为:String(url地址),Integer(刻度,本例没有用到),BitMa ...
- android内部培训视频_第一节
声明:本视频为公司内部做android培训时录制的,无任何商业目的.同时鉴于水平有限,可能不符合您的需求,放在这里的目的是提供给公司同事下载,作为培训的一个记录,也作为一个系列教程的自我督促完成的理由 ...
- android内部培训视频_第二节 布局基础
第二节:布局入门 一.线性布局 需要掌握的属性: 1.orientation:排列方式 vertical:垂直 Horizontal:水平 2.weight:水平布局的权重 3.gravity:子控件 ...
- android内部培训视频_第三节 常用控件(Button,TextView,EditText,AutocompleteTextView)
第三节:常用控件 一.Button 需要掌握的属性: 1.可切换的背景 2.9.png使用 3.按钮点击事件 1) onClick 3) 匿名类 4) 公共类 二.TextView 常用属性 1.a ...
- android内部培训视频_第三节(3)_常用控件(ViewPager、日期时间相关、ListView)
第三节(2):常用控件之ViewPager.日期时间相关.ListView 一.ViewPager 实例:结合PagerAdapter滑动切换图片 二.日期时间相关:AnalogClock\Dig ...
- Rafy 领域实体框架 - 公司内部培训视频
本月给公司内部一个项目做架构重构,其中使用到了 Rafy 框架.所以我培训了 Rafy 领域实体框架的使用方法,过程中录制了视频,方便其他同事查看.现在把视频放到园里来分享下,有兴趣的朋友可以看看,有 ...
- sencha touch 在线实战培训 第一期 第五节
2014.1.6晚上8点准时开的课 本期培训一共八节,前三堂免费,后面的课程需要付费才可以观看. 本节内容: 实现皮肤自定义样式的修改 css相关理论: 重写官方样式,美化ap ...
- 【Android测试】【第十五节】Instrumentation——官方译文
◆版权声明:本文出自胖喵~的博客,转载必须注明出处. 转载请注明出处:http://www.cnblogs.com/by-dream/p/5482207.html 前言 前面介绍了不少Android ...
- Vue快速学习_第五节
axios安装及使用 网站文档地址:https://www.kancloud.cn/yunye/axios/234845 1.npm安装 cnpm install axios 2.// 在main.j ...
随机推荐
- js实现前端分页页码管理
用JS实现前端分页页码管理,可以很美观的区分页码显示(这也是参考大多数网站的分页页码展示),能够有很好的用户体验,这也是有业务需要就写了一下,还是新手,经验不足,欢迎指出批评! 首先先看效果图: 这是 ...
- 从netty-example分析Netty组件续
上文我们从netty-example的Discard服务器端示例分析了netty的组件,今天我们从另一个简单的示例Echo客户端分析一下上个示例中没有出现的netty组件. 1. 服务端的连接处理,读 ...
- php注册审核
通过注册审核,判断刚创建的账户是否可以使用. 后台管理员审核通过后,账号可以使用. 通过session 设置只能通过登录入口进入网页. 原理:通过数据库设置账号的一个字段状态,例: isok:1, i ...
- Unity3D框架插件uFrame实践记录(二)
5.创建属性和命令 本小节主要内容包括: 在Element节点上创建属性数据 在Element节点上创建命令数据 5.1.在Element节点上创建属性数据 在这里,我们首先为Login节点中的属性( ...
- ASP.NET Core 中文文档 第四章 MVC(4.1)Controllers, Actions 和 Action Results
原文:Controllers, Actions, and Action Results 作者:Steve Smith 翻译:姚阿勇(Dr.Yao) 校对:许登洋(Seay) Action 和 acti ...
- Struts2入门(五)——OGNL和标签库
一.前言 OGNL和标签库的作用,粗暴一点说,就是减少在JSP页面中出现java代码,利于维护. 1.1.OGNL 1.1.1.什么是OGNL? OGNL(Object-Graph Navigatio ...
- 微信小程序服务范围重大更新
12.29日,小程序服务范围做了重大更新,增对富媒体和工具类型的小程序,增加了很多细分领域 富媒体:增加资讯,FM电台,有声读物等,媒体平台可上小程序了 工具:信息查询,网络代理,健康,企业管理等 , ...
- docker4dotnet #2 容器化主机
.NET 猿自从认识了小鲸鱼,感觉功力大增.上篇<docker4dotnet #1 前世今生&世界你好>中给大家介绍了如何在Windows上面配置Docker for Window ...
- JavaScript知识结构图
画的一个知识结构图,方便理解.
- 斗天斗地斗控件 -- 与 Flyout 控件的斗争史
前言 在淘宝的收藏夹页面本地化过程中,收藏的宝贝和店铺的分类展示通过一个下拉菜单的方式进行展示.如果单独为此从头重写一个控件,那么不但费时费力,包括所有的动画方式都要全新设计,而且还容易出 bug.好 ...