布局文件:

login.xml文件

[html]view plaincopy

  1. <spanstyle="font-family:'CourierNew';"><?xmlversion="1.0"encoding="utf-8"?>

  2. <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"

  3. android:layout_width="fill_parent"

  4. android:layout_height="fill_parent"

  5. android:background="@drawable/logo_bg"

  6. android:orientation="vertical">

  7. <RelativeLayout

  8. android:layout_width="fill_parent"

  9. android:layout_height="wrap_content">

  10. <ImageButton

  11. android:id="@+id/img_btn"

  12. android:layout_width="wrap_content"

  13. android:layout_height="wrap_content"

  14. android:layout_alignParentRight="true"

  15. android:background="@drawable/quit"/>

  16. <TextView

  17. android:id="@+id/tv_zh"

  18. android:layout_width="wrap_content"

  19. android:layout_height="35dip"

  20. android:layout_marginLeft="12dip"

  21. android:layout_marginTop="10dip"

  22. android:gravity="bottom"

  23. android:text="帐号:"

  24. android:textColor="#000000"

  25. android:textSize="18sp"/>

  26. <EditText

  27. android:id="@+id/et_zh"

  28. android:layout_width="fill_parent"

  29. android:layout_height="40dip"

  30. android:layout_below="@id/tv_zh"

  31. android:layout_marginLeft="12dip"

  32. android:layout_marginRight="10dip"/>

  33. <TextView

  34. android:id="@+id/tv_mima"

  35. android:layout_width="wrap_content"

  36. android:layout_height="35dip"

  37. android:layout_below="@id/et_zh"

  38. android:layout_marginLeft="12dip"

  39. android:layout_marginTop="10dip"

  40. android:gravity="bottom"

  41. android:text="密码:"

  42. android:textColor="#000000"

  43. android:textSize="18sp"/>

  44. <EditText

  45. android:id="@+id/et_mima"

  46. android:layout_width="fill_parent"

  47. android:layout_height="40dip"

  48. android:layout_below="@id/tv_mima"

  49. android:layout_marginLeft="12dip"

  50. android:layout_marginRight="10dip"

  51. android:maxLines="200"

  52. android:password="true"

  53. android:scrollHorizontally="true"/>

  54. <CheckBox

  55. android:id="@+id/cb_mima"

  56. android:layout_width="wrap_content"

  57. android:layout_height="wrap_content"

  58. android:layout_below="@id/et_mima"

  59. android:layout_marginLeft="12dip"

  60. android:text="记住密码"

  61. android:textColor="#000000"/>

  62. <CheckBox

  63. android:id="@+id/cb_auto"

  64. android:layout_width="wrap_content"

  65. android:layout_height="wrap_content"

  66. android:layout_below="@id/cb_mima"

  67. android:layout_marginLeft="12dip"

  68. android:text="自动登录"

  69. android:textColor="#000000"/>

  70. <Button

  71. android:id="@+id/btn_login"

  72. android:layout_width="80dip"

  73. android:layout_height="40dip"

  74. android:layout_below="@id/et_mima"

  75. android:layout_alignParentRight="true"

  76. android:layout_alignTop="@id/cb_auto"

  77. android:layout_marginRight="10dip"

  78. android:gravity="center"

  79. android:text="登录"

  80. android:textColor="#000000"

  81. android:textSize="18sp"/>

  82. </RelativeLayout>

  83. </LinearLayout></span>



logo.xml文件

[html]view plaincopy

  1. <spanstyle="font-family:'CourierNew';"><?xmlversion="1.0"encoding="utf-8"?>

  2. <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"

  3. android:layout_width="fill_parent"

  4. android:layout_height="fill_parent"

  5. android:background="@drawable/logo_bg"

  6. android:orientation="vertical">

  7. <RelativeLayout

  8. android:layout_width="fill_parent"

  9. android:layout_height="wrap_content"

  10. android:layout_weight="3">

  11. <ProgressBar

  12. android:id="@+id/pgBar"

  13. android:layout_width="wrap_content"

  14. android:layout_height="wrap_content"

  15. android:layout_centerInParent="true"/>

  16. <TextView

  17. android:id="@+id/tv1"

  18. android:layout_width="wrap_content"

  19. android:layout_height="wrap_content"

  20. android:layout_below="@id/pgBar"

  21. android:layout_centerHorizontal="true"

  22. android:text="正在登录..."

  23. android:textColor="#000000"

  24. android:textSize="18sp"/>

  25. </RelativeLayout>

  26. <LinearLayout

  27. android:layout_width="fill_parent"

  28. android:layout_height="wrap_content"

  29. android:layout_weight="1"

  30. android:gravity="center"

  31. android:orientation="vertical">

  32. <Button

  33. android:id="@+id/btn_back"

  34. android:layout_width="70dip"

  35. android:layout_height="35dip"

  36. android:text="取消"

  37. android:textColor="#000000"

  38. android:textSize="12sp"/>

  39. </LinearLayout>

  40. </LinearLayout></span>


welcome.xml


[html]view plaincopy

  1. <spanstyle="font-family:'CourierNew';"><?xmlversion="1.0"encoding="utf-8"?>

  2. <LinearLayoutxmlns:android="http://schemas.android.com/apk/res/android"

  3. android:layout_width="fill_parent"

  4. android:layout_height="fill_parent"

  5. android:layout_gravity="center"

  6. android:background="@drawable/login_bg"

  7. android:orientation="vertical">

  8. <TextView

  9. android:layout_width="fill_parent"

  10. android:layout_height="wrap_content"

  11. android:gravity="center"

  12. android:text="登陆成功,进入用户界面"

  13. android:textColor="#000000"

  14. android:textSize="20sp"/>

  15. </LinearLayout></span>





工程下载连接:点击打开链接

【转】http://blog.csdn.net/liuyiming_/article/details/7704923

更多相关文章

  1. Android(安卓)构建
  2. git新建本地仓库关联远程仓库(无需移动本地仓库文件)
  3. android 图片水平显示,类Gallery效果
  4. Android调用MediaScanner进行扫描
  5. linux tar.gz zip 解压缩 压缩命令
  6. android binder c++层-客户端(c++) 调用 服务端(c++) 例子
  7. Android获取SD卡视频音频文件
  8. Google用户登录界面 Android实现
  9. NPM 和webpack 的基础使用

随机推荐

  1. 两种方式实现Android侧滑菜单
  2. Android进行全屏设置
  3. INSTALL_FAILED_CONFLICTING_PROVIDER 错
  4. Android Studio TV开发教程(十六)让电视应
  5. Android Service---启动服务
  6. Android核心分析(19)----电话系统之GSMCall
  7. Android实现内存中数据保存到sdcard的方
  8. 怎么查看Android编译时候交叉编译链工具
  9. android开发游记:从viewpager禁用滚动 总
  10. android adb devices 后出现offline问题