先贴上效果图:

 

 <?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:background="@drawable/main_bg"
android:fillViewport="true" > <!-- 设置fillViewport属性表示充满整个ScrollView --> <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical" > <LinearLayout
android:id="@+id/logo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dip"
android:layout_weight="1"
android:gravity="bottom|center_horizontal"
android:orientation="vertical" > <ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" /> <ImageView
android:id="@+id/serviceimg"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout> <LinearLayout
android:id="@+id/login"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="top|center_horizontal"
android:orientation="vertical"
android:visibility="visible" > <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="60dip"
android:layout_marginRight="60dip"
android:orientation="vertical" > <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal" > <RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" > <EditText
android:id="@+id/userid"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5.0dip"
android:maxLength="16"
android:maxLines="1"
android:paddingBottom="6.0dip"
android:paddingLeft="80.0dip"
android:paddingTop="6.0dip"
android:textColor="#ff333333"
android:textSize="20sp" /> <TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/userid"
android:layout_marginTop="15.0dip"
android:paddingLeft="10.0dip"
android:text="帐号:"
android:textColor="#ff00303e"
android:textSize="20sp" />
</RelativeLayout> <Button
android:id="@+id/history"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dip"
android:text="..." />
</LinearLayout> <RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dip" > <EditText
android:id="@+id/password"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5.0dip"
android:inputType="textPassword"
android:maxLength="16"
android:maxLines="1"
android:paddingBottom="6.0dip"
android:paddingLeft="80.0dip"
android:paddingTop="6.0dip"
android:textColor="#ff333333"
android:textSize="20sp" /> <TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBaseline="@id/password"
android:layout_marginTop="15.0dip"
android:paddingLeft="10.0dip"
android:text="密码:"
android:textColor="#ff00303e"
android:textSize="20sp" />
</RelativeLayout> <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:gravity="center"
android:orientation="horizontal" > <Button
android:id="@+id/setbt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="设置"
android:textColor="#FFFFFFFF"
android:textSize="20sp" /> <Button
android:id="@+id/loginbt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="20dip"
android:layout_weight="1"
android:text="登录"
android:textColor="#FFFFFFFF"
android:textSize="20sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout> <LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_weight="1"
android:alwaysDrawnWithCache="true"
android:gravity="bottom|center_horizontal"
android:orientation="vertical" > <TextView
android:id="@+id/info"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="15dp"
android:autoLink="web" android:gravity="center_horizontal"
android:text="http://www.cnblogs.com/_ymw/"
android:textColor="#FFFFFF"
android:textSize="20sp" />
</LinearLayout>
</LinearLayout> </ScrollView>

Android 登录界面调用输入法时让界面自动上移,使输入法不会遮挡到主界面(Activity)的更多相关文章

  1. iOS tableview上textView在编辑状态时,tableview自动上移的功能

    在viewcognroller中,添加tableview时, tableview中cell上的textField如果吊起键盘时,tableview时可以自动上移,但是如果是textView吊起键盘,t ...

  2. Oracle EBS 从Web界面进入责任时,提示不存在可用的有效责任

    Oracle EBS 从Web界面进入责任时,提示不存在可用的有效责任         每次在Web界面,点击某一责任的功能时,弹出Form.会提示错误:对不起,不存在可用的有效责任.         ...

  3. 解决VS2008之后平台(如VS2012/VS2013/VS2015)调试模式下不显示主界面窗口的问题

    问题描述:win10操作系统下,VS2008工程调试模式下正常显示主界面窗口,使用VS2012/VS2013/VS2015环境打开VS2008工程,调试模式下应用程序转为后台进程,不显示主界面窗口:另 ...

  4. Android Handler 异步调用修改界面与主线程

    在Android编程的过程中,如果在Activity中某个操作会运行比较长的时间,比如:下载文件.这个时候如果在主线程中直接下载文件,会造成Activity卡死的现象:而且如果时间超过5秒,会有ANR ...

  5. android应用程序第一次启动时显示引导界面

    市面上好多优秀的应用(举例新浪微博.UC浏览器)都采用了欢迎页面与使用向导的方式给用户带来了良好的用户体验. 一般来说用户第一次安装应用或者安装了新版本后第一次进入应用都会显示成 欢迎页面-使用向导- ...

  6. Android AsynTask更新主界面

    虽然今天礼拜六还在加班,但是在等接口,所以还是有很多时间来自己学点东西的,所以就接着昨天的来.今天继续学的是不通过主线程来更新主线程的界面的问题. 昨天是用的开启线程调用Handler来更新线程,那个 ...

  7. Android ActionBar应用实战,高仿微信主界面的设计

    转载请注明出处:http://blog.csdn.net/guolin_blog/article/details/26365683 经过前面两篇文章的学习,我想大家对ActionBar都已经有一个相对 ...

  8. 【Android】13.0 第13章 创建和访问SQLite数据库—本章示例主界面

    分类:C#.Android.VS2015: 创建日期:2016-02-26 一.简介 Android 内置了三种数据存取方式:SQLite数据库.文件.SharedPreferences. 这一章我们 ...

  9. Ionic2 rc2 Events 跨界面调用的使用方法及问题解决

    Events:事件注册  在任意一界面注册事件之后可在任意界面根据事件名称进行调用. 首先看一下官方文档的调用方式 import { Events } from 'ionic-angular'; co ...

随机推荐

  1. STL中的set容器的一点总结2

    http://blog.csdn.net/sunshinewave/article/details/8068326 1.关于set C++ STL 之所以得到广泛的赞誉,也被很多人使用,不只是提供了像 ...

  2. 【bzoj2957】楼房重建 分块+二分查找

    题目描述 小A的楼房外有一大片施工工地,工地上有N栋待建的楼房.每天,这片工地上的房子拆了又建.建了又拆.他经常无聊地看着窗外发呆,数自己能够看到多少栋房子.为了简化问题,我们考虑这些事件发生在一个二 ...

  3. 判断腾讯QQ是否在线

    http://webpresence.qq.com/getonline?Type=1&1617052138: 判断腾讯QQ是否在线接口. 下面是个简单的例子: <!doctype htm ...

  4. c# IList<T> 深拷贝

    class A { public string a1{get;set}; public string a2{get;set}; public IList<B> a3{get;set}; / ...

  5. Topcoder SRM579 1000pts

    石头剪刀布QAQ 一看是个很油的概率dp 首先一看你很快能得出状态的表示F[i][r][p][s] 然后只要考虑r,p,s出现的次数来进行概率dp就好了 具体实现的时候细节很多(少) 如果预处理一下组 ...

  6. 谈一谈深度学习之semantic Segmentation

    上一次发博客已经是9月份的事了....这段时间公司的事实在是多,有写博客的时间都拿去看paper了..正好春节回来写点东西,也正好对这段时间做一个总结. 首先当然还是好好说点这段时间的主要工作:语义分 ...

  7. [bzoj 2844]线性基+高斯消元

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2844 又用到线性基+高斯消元的套路题了,因为经过高斯消元以后的线性基有非常好的序关系,所以 ...

  8. [poj 3693]后缀数组+出现次数最多的重复子串

    题目链接:http://poj.org/problem?id=3693 枚举长度L,看长度为L的子串最多能重复出现几次,首先,能出现1次是肯定的,然后看是否能出现两次及以上.由抽屉原理,这个子串出现次 ...

  9. Codeforces Round #510 (Div. 2) D. Petya and Array(树状数组)

    D. Petya and Array 题目链接:https://codeforces.com/contest/1042/problem/D 题意: 给出n个数,问一共有多少个区间,满足区间和小于t. ...

  10. egrep对于conf文件中去掉#注释,排除无用项

    [root@localhost conf]# egrep -v "#|^$" nginx.conf.default > nginx.conf dd