预览图及布局结构参考:

布局:

 <?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="match_parent"
android:background="#ffF6F2ED" > <LinearLayout
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="45dp"
android:layout_alignParentTop="true"
android:background="@drawable/android_title_bg"
android:gravity="center_vertical"
android:orientation="horizontal" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:singleLine="true"
android:text="@string/login"
android:textColor="@android:color/white"
android:textSize="15sp" />
</LinearLayout> <ScrollView
android:id="@+id/login_scroller"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title" > <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" > <ImageView
android:id="@+id/joy"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="10dp"
android:minHeight="75dp"
android:minWidth="75dp"
android:padding="3dp"
android:src="@drawable/login_dog" /> <LinearLayout
android:id="@+id/login_edit_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/joy"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:background="@drawable/login_layout_editor_bg"
android:orientation="vertical" > <LinearLayout
android:layout_width="match_parent"
android:layout_height="47dp"
android:focusable="true"
android:focusableInTouchMode="true"
android:gravity="center_vertical"
android:orientation="horizontal" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="@string/user_name"
android:textColor="@android:color/black"
android:textSize="17sp" /> <EditText
android:id="@+id/login_input_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:background="#fffbfbfb"
android:singleLine="true" />
</LinearLayout> <View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#ffc8c8c8" /> <LinearLayout
android:layout_width="match_parent"
android:layout_height="47dp"
android:gravity="center_vertical"
android:orientation="horizontal" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:text="@string/user_password"
android:textColor="@android:color/black"
android:textSize="17sp" /> <EditText
android:id="@+id/login_input_password"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="#fffbfbfb"
android:inputType="textPassword"
android:singleLine="true" /> <CheckBox
android:id="@+id/login_switchBtn"
android:layout_width="55dp"
android:layout_height="wrap_content"
android:layout_marginRight="5dp"
android:button="@drawable/login_hide_password_selector"
android:clickable="true" />
</LinearLayout>
</LinearLayout> <Button
android:id="@+id/login_btn"
android:layout_width="match_parent"
android:layout_height="42dp"
android:layout_below="@+id/login_edit_layout"
android:layout_marginLeft="13dp"
android:layout_marginRight="13dp"
android:layout_marginTop="13dp"
android:background="@drawable/login_layout_btn_bg"
android:text="@string/login"
android:textColor="@android:color/white"
android:textSize="15sp" /> <RelativeLayout
android:id="@+id/login_passfind_and_phonelogin"
android:layout_width="match_parent"
android:layout_height="20dp"
android:layout_below="@+id/login_btn"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="13dp"
android:gravity="center_vertical" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:text="@string/find_password"
android:textColor="#ff288dfe"
android:textSize="15sp" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:text="@string/phone_register"
android:textColor="#ff288dfe"
android:textSize="15sp" />
</RelativeLayout> <RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/login_passfind_and_phonelogin"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="13dp"
android:gravity="center_vertical" > <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:drawableLeft="@drawable/login_icon_wx"
android:drawablePadding="5dp"
android:drawableRight="@drawable/index_icon1"
android:gravity="center_vertical"
android:text="@string/weixin_login"
android:textColor="#ff787878"
android:textSize="15sp" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:drawableLeft="@drawable/login_icon_other"
android:drawablePadding="5dp"
android:drawableRight="@drawable/index_icon1"
android:gravity="center_vertical"
android:text="@string/other_login"
android:textColor="#ff787878"
android:textSize="15sp" />
</RelativeLayout>
</RelativeLayout>
</ScrollView>
</RelativeLayout>

实例下载>>>>>>>>>>>>>>>

在上面基础上添加验证实例下载>>>>>>

这次学习到的

文本框添加背景色可以取消掉默认背景

EditText父级加入以下属性,可以取消默认聚焦

android:gravity="center_vertical"
android:orientation="horizontal"

让文本单行显示的属性:

android:singleLine="true"

TextView添加图标可以用

android:drawableLeft="@drawable/login_icon_wx"

相关文章:

Android:布局实例之模仿QQ登录界面

Android:布局实例之模仿京东登录界面的更多相关文章

  1. [转]Android:布局实例之模仿QQ登录界面

    Android:布局实例之模仿QQ登录界面 预览图: 准备: 1.找到模仿对象 QQ登陆界面UI下载>>>>> 2.导入工程 3.查看布局结构和使用控件 其对应效果图分布 ...

  2. Android:布局实例之模仿QQ登录界面

    预览图: 准备: 1.找到模仿对象 QQ登陆界面UI下载>>>>> 2.导入工程 3.查看布局结构和使用控件 其对应效果图分布为 4.分析样式选择器 下拉箭头2种样式:点 ...

  3. java代码完全手写模仿qq登录界面

    这是我模仿QQ2015版界面,实现的基本功能有登陆验证,重置等,当然直接复制代码运行是不一样的,还要注意自己插入自己的图片. 结果截图如下所示: import java.awt.BorderLayou ...

  4. Android:布局实例之模仿微信Tab

    微信Tab预览效果: 思路: 1.用TabHost+RadioGroup搭建基本布局,以RadioGroup代替TabWidget 2.设置按钮和文字的的样式和selector 3.创建相应的Acti ...

  5. Android:布局实例之常见用户设置界面

    实现效果: 整理思路: 1.控件:文字TextView 和 右箭头ImageView 2.因为考虑到点击效果,设计为:最外层为全圆角,内层有四种情况,分别为上圆角.无圆角.下圆角和全圆角. 3.内层样 ...

  6. 微信小程序相关一、模仿京东静态登录页面

    一.培训的第一天,基本上没有什么最新的东西,但是看到老师的代码收获的确实是不少. 1.1.首页代码很简洁,将共有的样式都提取的很好. 1.2.其次是每一个小块写样式的时候用到了好多子代选择器和后代选择 ...

  7. Android开发实例之miniTwitter登录界面的实现

    原文: http://www.jizhuomi.com/android/example/134.html 本文要演示的Android开发实例是如何完成一个Android中的miniTwitter登录界 ...

  8. Android基础总结(3)——UI界面布局

    Android的UI设计有好几种界面程序编写方式.大体上可分为两大类:一类是利用可视化工具来进行,允许你进行拖拽控件来进行布局:还有一类是编写xml文档来进行布局.这两种方法可以相互转换. 1.常见的 ...

  9. android内部培训视频_第五节(1)_OA实战之登录界面

    第五节(1):OA实战之登录界面  一.登录界面布局 1.背景图片 2.文本框 3.checkbox 4.按钮 暂未实现点击切换图片效果 <RelativeLayout xmlns:androi ...

随机推荐

  1. esp8266 IOT Demo 固件刷写记录

    将编译好的固件按照下面地址刷写到esp8266 出现下面错误是因为刷写的设置不对,按照图上设置: load 0x40100000, len 26828, room 16 tail 12chksum 0 ...

  2. 函数导出在kvm_intel.ko,kvm.ko不共享

    KVM一共包含了三个内核模块,kvm_intel.ko,kvm_amd.ko,kvm.ko.其中两个重要文件x86.c和vmx.c在编译后分别会生成kvm_intel.ko和kvm.ko两个内核模块, ...

  3. Oracle 内存顾问

    --查看内存相关参数SYS@ test10g> col name for a30SYS@ test10g> col value for a20SYS@ test10g> select ...

  4. VM虚拟机,Linux系统安装tools过程遇到 what is the location of the “ifconfig” program

    安装步骤: 复制到/mnt 解压文件 tar -zxvf VMwareTools-10.1.6-5214329.tar.gz 进入减压文件夹后安装 ./vmware-install.pl ... 一直 ...

  5. Hadoop-MR[会用]MR程序的运行模式

    1.简介 现在很少用到使用MR计算框架来实现功能,通常的做法是使用hive等工具辅助完成.但是对于其底层MR的原理还是有必要做一些了解. 2.MR客户端程序实现套路 这一小节总结归纳编写mr客户端程序 ...

  6. C#多线程编程之:集合类中Synchronized方法与SyncRoot属性原理分析

    我们知道,在.net的一些集合类型中,譬如Hashtable和ArrayList,都有Synchronized静态方法和SyncRoot属性,他们之间有联系吗?我怎么才能用好他们呢? 以Hashtab ...

  7. 关于HTML,css3自适应屏幕,自适应宽度

    设置了在不同分辨率下,显示的css样式: @media screen and (min-width:1080px){ .box{ width: 1080px;}.content{width: 1040 ...

  8. POJ 1733 Parity game(带权并查集)

    题目链接:http://poj.org/problem?id=1733 题目大意:给你m条信息,每条信息告诉你区间l~r的1的个数是奇数还是偶数,如果后面出现信息跟前面矛盾则这条信息是错误的,问在第一 ...

  9. Spring + MyBatis 多数据源实现

    近期,在项目中需要做分库,但是因为某些原因,没有采用开源的分库插件,而是采用了同事之前弄得多数据源形式实现的分库.对于多数据源,本人在实际项目也中遇到的不多,之前的项目大多是服务化,以RPC的形式获得 ...

  10. 聊聊五大IO模型

    IO模型介绍 IO模型不是用来开启并发效果的,而是用来接收并发效果的. 比较了五种IO Model:    * blocking IO           阻塞IO    * nonblocking ...