Android开发我的新浪微博客户端-登录页面UI篇(可编辑)Android开发我的新浪微博客户端-登录页面UI篇(可编辑)
Android开发我的新浪微博客户端-登录页面UI篇
A ndroid 开发我的新浪微博客户端-登录页面UI 篇 4.1
首先回顾一下功能流程当用户开启软件显示载入页面时程序首先去sqlite 库查询是否已经
保存有用户的新浪微博的UserID 号、Access Token 、Access Secret 的记录如果没有
一条记录那么跳转到用户授权功能页面,这个已经由上面两篇文章实现了,如果有记录那么
页面跳转到用户登录页面,也就是本篇以及下篇要实现的功...
Android开发我的新浪微博客户端-登录页面UI篇(可编辑)
Android开发我的新浪微博客户端-登录页面UI篇
A ndroid 开发我的新浪微博客户端-登录页面UI 篇 4.1
首先回顾一下功能
当用户开启软件显示载入页面时程序首先去sqlite 库查询是否已经
保存有用户的新浪微博的UserID 号、Access Token 、Access Secret 的记录如果没有
一条记录那么跳转到用户授权功能页面,这个已经由上面两篇文章实现了,如果有记录那么
页面跳转到用户登录页面,也就是本篇以及下篇要实现的功能,本篇讲UI 的实现,本项目
支持多微博账号了,也就是用户可以设置多个微博账号,登录的时候选择其中的一个登录,
具体效果如上图,新建名LoginActivity.java 的Activity 并且在AndroidManifest.xml 中
进行相应配置,这个页面就是我们要实现的用户登录页面。
看上面的效果,首先页面分3 部分实现,背景部分、底部菜单部分、用户选择以及头像显
示部分,首先在res/layout 的目录下新建名为login.xml 的layout,然后根据页面显示
要求编写如下的布局控制:
代码
?xml version "1.0" encoding "utf-8"?
LinearLayout
xmlns:android "
android:id "@+id/layout"
android:orientation "vertical"
android:layout_width "fill_parent"
android:layout_height "fill_parent"
ImageView
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:src "@drawable/logo_s"
android:layout_marginTop "5dip"
android:layout_marginLeft "5dip"
RelativeLayout
android:layout_width "fill_parent"
android:layout_height "fill_parent"
RelativeLayout
android:id "@+id/iconBtn"
android:layout_width "90px"
android:layout_height "80px"
android:background "@drawable/icon_selector"
android:layout_above "@+id/selectLayout"
android:layout_centerHorizontal "true"
android:layout_marginBottom "20dip"
ImageView
android:id "@+id/icon"
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:layout_centerInParent "true"
RelativeLayout
android:id "@+id/selectLayout"
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:layout_centerInParent "true"
EditText
android:id "@+id/iconSelect"
android:layout_width "200px"
android:layout_height "wrap_content"
android:Length "10"
android:paddingLeft "20px"
android:editable "false"
android:enabled "false"
android:textSize "13px"
android:background "@drawable/input_over"
ImageButton
android:id "@+id/iconSelectBtn"
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:layout_marginRight "1.0dip"
android:layout_alignTop "@+id/iconSelect"
android:layout_alignRight "@+id/iconSelect"
android:layout_alignBottom "@+id/iconSelect"
android:background "@drawable/more_selector"
ImageButton
android:id "@+id/login"
android:layout_width "40px"
android:layout_height "40px"
android:layout_marginLeft "5dip"
android:layout_alignTop "@+id/iconSelectBtn"
android:layout_toRightOf "@+id/iconSelectBtn"
android:layout_alignBottom "@+id/iconSelectBtn"
android:background "@drawable/btn_in_selector"
RelativeLayout
android:layout_width "fill_parent"
android:layout_height "44dip"
android:layout_alignParentBottom "true"
android:background "#BB768e95"
LinearLayout
android:id "@+id/addLayout"
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:orientation "vertical"
android:layout_alignParentLeft "true"
android:gravity "center"
android:layout_marginTop "3px"
ImageButton
android:id "@+id/addIcon"
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:background "@drawable/add_selector"
TextView
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:textColor "#ffffff"
android:textSize "12px"
android:text "添加账号"
LinearLayout
android:id "@+id/exitLayout"
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:orientation "vertical"
android:layout_centerInParent "true"
android:gravity "center"
android:layout_marginTop "3px"
ImageButton
android:id "@+id/exitIcon"
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:background "@drawable/exit_selector"
TextView
android:layout_width "wrap_content"
android:layout_height "wrap_content"
android:textColor "#ffffff"
android:textSize "12px"
android:text "退出软件"
LinearLayout
android:id "@+id/delLayout"
android:layout_width "wrap_content"
andro
本文档为【Android开发我的新浪微博客户端-登录页面UI篇(可编辑)】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑,
图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。
本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。
网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。