Android简单的登陆界面的设计开发.docx

上传人:b****7 文档编号:9331812 上传时间:2023-02-04 格式:DOCX 页数:24 大小:21.16KB
下载 相关 举报
Android简单的登陆界面的设计开发.docx_第1页
第1页 / 共24页
Android简单的登陆界面的设计开发.docx_第2页
第2页 / 共24页
Android简单的登陆界面的设计开发.docx_第3页
第3页 / 共24页
Android简单的登陆界面的设计开发.docx_第4页
第4页 / 共24页
Android简单的登陆界面的设计开发.docx_第5页
第5页 / 共24页
点击查看更多>>
下载资源
资源描述

Android简单的登陆界面的设计开发.docx

《Android简单的登陆界面的设计开发.docx》由会员分享,可在线阅读,更多相关《Android简单的登陆界面的设计开发.docx(24页珍藏版)》请在冰豆网上搜索。

Android简单的登陆界面的设计开发.docx

Android简单的登陆界面的设计开发

通信实训报告

-Android移动平台开发

学院:

信息工程学院

班级:

学号:

姓名:

实训内容:

一.1.Andriod的简介

Android一词的本义指“机器人”,同时也是Google于2007年11月5日宣布的基于Linux平台的开源手机操作系统的名称,该平台由操作系统、中间件、用户界面和应用软件组成,号称是首个为移动终端打造的真正开放和完整的移动软件。

目前,最新版本为Android2.4Gingerbread和Android3.0Honeycomb。

Android是基于Linux开放性内核的操作系统,是Google公司在2007年11月5日公布的手机操作系统。

Android早期由原名为"Android"的公司开发,谷歌在2005年收购"Android.Inc"后,继续对Android系统开发运营,它采用了软件堆层(softwarestack,又名软件叠层)的架构,主要分为三部分。

底层Linux内核只提供基本功能,其他的应用软件则由各公司自行开发,部分程序以Java编写。

2011年初数据显示,仅正式上市两年的操作系统Android已经超越称霸十年的塞班系统,使之跃居全球最受欢迎的智能手机平台。

现在,Android系统不但应用于智能手机,也在平板电脑市场急速扩张,在智能MP4方面也有较大发展。

采用Android系统主要厂商包括台湾的HTC,(第一台谷歌的手机G1由HTC生产代工)美国摩托罗拉,SE等,中国大陆厂商如:

魅族(M9),华为、中兴、联想、蓝魔等。

2.Android构架图

二.1软件下载

AndroidSDK,网址是c:

\iknow\docshare\data\cur_work\_blank.

JDK的下载地址c:

\iknow\docshare\data\cur_work\_blank。

Eclipse的下载网址是c:

\iknow\docshare\data\cur_work\_blank

2.Android开发环境搭建

第一步:

下载AndroidSDK

网址是c:

\iknow\docshare\data\cur_work\_blank./sdk/index.html。

Android1.5之前Google提供了AndroidSDK开发的完整下载,在Android1.6之后Google只提供了安装工具在线安装。

单击“android-sdk-windows.zip”链接进行SDK下载,下载该文件后解压该文件到操作系统的任意目录下。

打开目录找到SDKSetup.exe可执行文件,双击执行该文件。

选择"AvailablePackages",选择想安装的版本(我是全选了,省事),然后单击“InstallSelected”->选择“AcceptAll”,再单击“InstallAccepted”就可以在线安装了。

提示:

如果你的“AvailablePackages”右侧的地址不能打开,请选择左侧列表的“Setting”选项,在右侧的设置中勾选“Forehttps:

//......”

第二步:

安装JDK

A下载JDK。

AndroidSDK需要JDK5以上的版本。

JDK6的下载地址c:

\iknow\docshare\data\cur_work\_blank。

B安装JDK。

下载完成后进行正常双击、安装,这里就不说了。

C配置Java环境变量

1配置JavaHome。

复制Java的安装路径,右键单击“我的电脑”->“属性”->“高级”—>“环境变量”中新建环境变量java_home,变量值为java安装路径。

2配置Path。

右键单击“我的电脑”->“属性”->“高级”—>“环境变量”,在“系统环境变量”中编辑Path便来了个,添加Java的bin目录到其中。

变量与变量中间使用分号“;”分隔。

3配置classpath。

右键单击“我的电脑”->“属性”->“高级”—>“环境变量”,在“系统环境变量”中新建一个系统变量名称为“classpath”,变量值为半角句号“.”

第三步:

下载Eclipse

ADT插件要求Eclipse的版本是3.3以上,Eclipse的下载网址是c:

\iknow\docshare\data\cur_work\_blank。

下载后解压可以直接使用。

下载安装ADT。

这里介绍通过Eclipse在线更新的方式安装。

1启动Eclipse,选择“Help”->“InstallNewSoftware.....”

2单击“Add.....”添加一个更新站点(注意:

站点http后面不要加s)否则可能连接失败。

(Name:

ADT0.9.5;Location:

c:

\iknow\docshare\data\cur_work\_blank)

3添加好后,勾选“DeveloperTools”单击“Next”进行更新安装。

三.基于JAVA平台的android的UI登陆界面的设计

1.SDK、JDK的界面以及使用。

2.Eclipse软件的使用。

3.Android编程方法。

4.UI界面的布局(layout)。

5.Button的使用。

6.Activity的生命周期。

7.Activity与另外多个Activity之间的界面跳转。

8.对按键(Button)的监听。

9.编写.JAVA和.XML文件。

实训目的:

1.学会并熟练使用Eclipse,SDK,JDK。

2.了解和掌握android移动平台开发的相关知识。

3.灵活运用android用户界面UI技术。

4.熟悉常用的UI组件,UI布局,UI元素。

5.能够简单的编写界面的布局(XML)文件。

6.能够简单的编写常用UI组件相关的JAVA代码。

7.最后根据所学习的知识自己可以编写一个有关登陆界面的程序。

设计流程:

流程图

首先分别编写五个activity的布局文件(XML)

Main.xml

xmlversion="1.0"encoding="utf-8"?

>

android:

id="@+id/widget0"

xmlns:

android=android:

layout_height="wrap_content"android:

layout_width="wrap_content">

android:

id="@+id/widget43"

android:

layout_width="243dp"

android:

layout_height="37dp"

android:

text="WelcomeToFIFA2012"

android:

textSize="22sp"

android:

textColor="#ff33cc00"

android:

layout_x="41dp"

android:

layout_y="35dp"/>

android:

id="@+id/widget44"

android:

layout_width="62dp"

android:

layout_height="23dp"

android:

background="#ffcccccc"

android:

text="邮箱"

android:

textSize="16sp"

android:

textStyle="bold"

android:

textColor="#ff000000"

android:

layout_x="31dp"

android:

layout_y="107dp"/>

android:

id="@+id/widget45"

android:

layout_width="wrap_content"

android:

layout_height="24dp"

android:

background="#ffcccccc"

android:

text="登录密码"

android:

textSize="16sp"

android:

textStyle="bold"

android:

textColor="#ff000000"

android:

layout_x="29dp"

android:

layout_y="156dp"/>

android:

id="@+id/widget46"

android:

layout_width="168dp"

android:

layout_height="39dp"

android:

textSize="18sp"

android:

layout_x="120dp"

android:

layout_y="101dp"/>

android:

id="@+id/widget47"

android:

layout_width="169dp"

android:

layout_height="39dp"

android:

textSize="18sp"

android:

layout_x="119dp"

android:

layout_y="150dp"/>

android:

id="@+id/button1"

android:

layout_width="111dp"

android:

layout_height="45dp"

android:

text="忘记密码?"

android:

textStyle="bold"

android:

layout_x="25dp"

android:

layout_y="199dp"/>

android:

id="@+id/button2"

android:

layout_width="83dp"

android:

layout_height="44dp"

android:

text="登陆"

android:

textStyle="bold"

android:

layout_x="134dp"

android:

layout_y="200dp"/>

android:

id="@+id/button3"

android:

layout_width="77dp"

android:

layout_height="44dp"

android:

text="注册"

android:

textStyle="bold"

android:

layout_x="215dp"

android:

layout_y="200dp"/>

android:

id="@+id/widget51"

android:

layout_width="138dp"

android:

layout_height="46dp"

android:

text="记住密码"

android:

textStyle="bold"

android:

layout_x="25dp"

android:

layout_y="254dp"/>

layout_width="331dp"android:

id="@+id/photo"android:

src="@drawable/kaka"android:

layout_height="476dp"android:

layout_x="0dp"android:

layout_y="170dp">

Oneactivity_layout.xml

xmlversion="1.0"encoding="utf-8"?

>

android:

id="@+id/widget0"

android:

layout_width="fill_parent"

android:

layout_height="fill_parent"

xmlns:

android=>

android:

id="@+id/widget32"

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="新鲜事"

android:

textSize="16sp"

android:

textStyle="bold"

android:

layout_x="26dp"

android:

layout_y="29dp"/>

android:

id="@+id/widget33"

android:

layout_width="59dp"

android:

layout_height="wrap_content"

android:

text="好友"

android:

textSize="16sp"

android:

textStyle="bold"

android:

layout_x="131dp"

android:

layout_y="31dp"/>

android:

id="@+id/widget34"

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="个人资料"

android:

textSize="16sp"

android:

textStyle="bold"

android:

layout_x="232dp"

android:

layout_y="30dp"/>

android:

id="@+id/widget35"

android:

layout_width="199dp"

android:

layout_height="39dp"

android:

text="发帖"

android:

textStyle="bold"

android:

layout_x="59dp"

android:

layout_y="141dp"/>

android:

id="@+id/widget36"

android:

layout_width="197dp"

android:

layout_height="42dp"

android:

text="留言"

android:

textStyle="bold"

android:

layout_x="60dp"

android:

layout_y="216dp"/>

Twoactivity_layout.xml

xmlversion="1.0"encoding="utf-8"?

>

android:

id="@+id/widget0"

android:

layout_width="fill_parent"

android:

layout_height="fill_parent"

xmlns:

android=>

android:

id="@+id/widget32"

android:

layout_width="112dp"

android:

layout_height="36dp"

android:

text="找回密码"

android:

textSize="22sp"

android:

textStyle="bold"

android:

textColor="#ffff0000"

android:

layout_x="111dp"

android:

layout_y="29dp"/>

android:

id="@+id/widget33"

android:

layout_width="wrap_content"

android:

layout_height="34dp"

android:

text="问题提示:"

android:

textSize="16sp"

android:

textStyle="bold"

android:

layout_x="18dp"

android:

layout_y="86dp"/>

android:

id="@+id/widget37"

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="你最喜欢的球星是谁?"

android:

textSize="16sp"

android:

textStyle="bold"

android:

layout_x="109dp"

android:

layout_y="87dp"/>

android:

id="@+id/widget38"

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="答案:"

android:

textSize="16sp"

android:

textStyle="bold"

android:

layout_x="49dp"

android:

layout_y="150dp"/>

android:

id="@+id/widget39"

android:

layout_width="168dp"

android:

layout_height="42dp"

android:

textSize="18sp"

android:

layout_x="109dp"

android:

layout_y="143dp"/>

android:

id="@+id/button4"

android:

layout_width="75dp"

android:

layout_height="47dp"

android:

text="OK"

android:

textStyle="bold"

android:

layout_x="53dp"

android:

layout_y="261dp"/>

android:

id="@+id/widget41"

android:

layout_width="72dp"

android:

layout_height="47dp"

android:

text="CANCLE"

android:

textStyle="bold"

android:

layout_x="194dp"

android:

layout_y="261dp"/>

Threeactivity_layout.xml

xmlversion="1.0"encoding="utf-8"?

>

android:

id="@+id/widget0"

android:

layout_width="fill_parent"

android:

layout_height="fill_parent"

xmlns:

android=>

android:

id="@+id/widget60"

android:

layout_width="wrap_content"

android:

layout_height="wrap_content"

android:

text="注册信息"

android:

textStyle="bold"

android:

layout_x="113dp"

android:

layout_y="32dp"/>

android:

id="@+id/widget61"

android:

layout_width="53dp"

android:

layout_height="30dp"

android:

text="姓名:"

android:

textSize="16sp"

android:

textStyle="bold"

android:

layout_x="27dp"

android:

layout_y="78dp"/>

android:

id="@+id/widget62"

android:

layout_width="56dp"

android:

layout_height="30dp"

android:

text="昵称:"

android:

textSize="16sp"

android:

textStyle="bold"

android:

layout_x="26dp"

android:

layout_y="127dp"/>

android:

id="@+id/widget63"

android:

layout_width="88dp"

android:

layout_height="25dp"

android:

text="证件号码:"

android:

textSize="16sp"

android:

textStyle="bold"

android:

layout_x="9dp"

android:

layout_y="174dp"/>

android:

id="@+id/widget64"

android:

layout_width="189dp"

android:

layout_height="39dp"

android:

textSize="18sp"

android:

layout_x="98dp"

android:

layout_y="72dp"/>

android:

id="@+id/widget65"

android:

layout_width="189dp"

android:

layout_height="41dp"

android:

textSize="18sp"

android:

layout_x="98dp"

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 高等教育 > 文学

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1