《基于Android的简单聊天通信软件设计》课程设计报告_第1页
《基于Android的简单聊天通信软件设计》课程设计报告_第2页
《基于Android的简单聊天通信软件设计》课程设计报告_第3页
《基于Android的简单聊天通信软件设计》课程设计报告_第4页
《基于Android的简单聊天通信软件设计》课程设计报告_第5页
已阅读5页,还剩35页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、简单聊天通信软件1. 题目基于Android的简单聊天通信软件设计(1)欢迎界面(2)登录界面,登录界面中选择对方的IP地址和端口号(3)与对方实现连接。实现点对点的通信。即点对点的聊天。(4)聊天界面中,包括显示对方信息、聊天内容显示框、聊天内容输入框,以及发送按钮等(5)扩展1:实现表情的发送和显示,或者实现图片的发送和显示。(5)扩展2:实现多人聊天。1.1 需求分析设计一个基于安卓系统的简单聊天通信软件,软件要实现点对点的通信。UI:自己设计好符合软件的界面,使软件成熟化。拓展:如有能力可使软件实现多人聊天,发生图片等。1. 概要设计2.1 流程图欢迎界面账号密码登陆接受信息输入判断是

2、否正确主菜单进行相对应操作点对点聊天退出软件1.2 详细设计main.xml: 欢迎界面,延迟2秒左右自动跳转。Hello.java为其响应目录。 password.xml: 登录界面,验证用户输入信息,错误时用户可重新输入,正确后方可进password.java为其响应目录。findpassword.xml: 在登录界面中点击“忘记密码”后的跳转页面,可通过注册时的邮箱找回密码,但此功能目前还未实现,只有界面。findpassword.java为其响应目录。create_id.xml: 在登录界面中点击“创建新账号”后的跳转页面,也还未实现其功能。create_id为其应目录。main_me

3、nu.xml: 登录后的主菜单,包括“聊天”、“联系人”、“查找”等功能,均为图片按main_menu.java为其响应目录。chat.xml: 在主菜单中点击“聊天”后的聊天界面,输入IP地址后联系,可与进入相同服务器的用户聊天,聊天内容显示在对话框中。chat.java为其响应目录。 profile.xml: 在主菜单中点击“我的资料”的跳转页面,显示用户的一些信息。profile.java为其响应目录。feedback.xml: 在主菜单中点击“反馈我们”的跳转页面,用户可在此页面告诉我们一些意见,但此功能目前还未实现。feedback.java为其响应目录。about.xml: 在主菜

4、单中点击“关于”的跳转页面,显示一些版本信息。about.java为其响应目录。setting.xml: 在主菜单中点击设置按钮后的跳转页面,其内容包括“切换账号”和“退出”。setting.java为其响应目录。2.3操作界面软件图标:欢迎界面:登录界面:忘记密码界面:主菜单界面:聊天界面:正在聊天:反馈界面:设置界面:关于界面:附 录源程序main.xml:欢迎界面代码<?xml version="1.0" encoding="utf-8"?> android:orientation="vertical" androi

5、d:layout_width="fill_parent" android:layout_height="fill_parent"><ImageView android:id="+id/helloimage" android:src="drawable/welcome" android:layout_width="fill_parent" android:layout_height="fill_parent"/> </LinearLayout> p

6、assword.xml:登录界面代码<?xml version="1.0" encoding="utf-8"?> android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="drawable/login" > <EditText android:id="+i

7、d/name" android:layout_width="300dp" android:layout_height="45dp" android:textSize="16sp" android:layout_centerHorizontal="true" android:layout_alignParentRight="true" android:layout_marginRight="10dip" android:layout_marginTop="1

8、70dip" android:hint="点滴号/手机号/邮箱地址" /><EditText android:id="+id/password" android:layout_width="300dp" android:layout_height="45dp" android:textSize="16sp" android:layout_below="id/name" android:layout_alignRight="id/name&quo

9、t; android:inputType="textPassword" android:hint="密码" /> <Button android:id="+id/login" android:layout_width="100dp" android:layout_height="45dp" android:textSize="16sp" android:textColor="#1d5972" android:layout_below="

10、;id/password" android:layout_alignRight="id/name" android:text="登录" /><CheckBox android:id="+id/showpassword"android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_toLeftOf="id/login" android:layo

11、ut_alignLeft="id/name" android:layout_alignBottom="id/login" android:textSize="14sp"android:text="显示密码" /> <Button android:id="+id/forgetpassword" android:layout_width="wrap_content" android:layout_height="wrap_content" andr

12、oid:textSize="14sp" android:layout_below="id/login" android:layout_alignLeft="id/name" android:layout_marginTop="5dip" android:background="android:color/transparent" android:text="忘记密码?" /> <Button android:id="+id/createid"

13、android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:layout_below="id/forgetpassword" android:layout_alignLeft="id/name" android:layout_marginTop="5dip" android:background="android:co

14、lor/transparent" android:text="创建新账号" /> </RelativeLayout>findpassword.xml:忘记密码界面代码<?xml version="1.0" encoding="utf-8"?> android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent&qu

15、ot; android:background="#1d5972" > <EditText android:id="+id/enteremail" android:layout_width="300dp" android:layout_height="45dp" android:textSize="15sp" android:layout_alignParentLeft="true" android:layout_marginLeft="10dip&quo

16、t; android:layout_marginTop="65dp" android:hint="请输入你的注册邮箱" /> <TextView android:id="+id/reset_text" android:layout_width="300dp" android:layout_height="45dp" android:textSize="15sp" android:layout_below="id/enteremail" andr

17、oid:layout_alignParentLeft="true" android:layout_marginLeft="10dip" android:background="android:color/transparent" android:text="密码重置连接将发送到你注册的邮箱,如未能收取邮件,请检查“垃圾邮件”。" /> <Button android:id="+id/reset" android:layout_width="300dp" andro

18、id:layout_height="45dp" android:textSize="16sp" android:layout_below="id/reset_text" android:layout_alignParentLeft="true" android:layout_marginLeft="10dip" android:layout_marginTop="10dp" android:textColor="#1d5872" android:text=

19、"重置密码"/> </LinearLayout> create_id.xml:创建新账号界面代码<?xml version="1.0" encoding="utf-8"?> android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#1d5972&quo

20、t; > <TextView android:id="+id/zhuce" android:layout_width="300dp" android:layout_height="wrap_content" android:textSize="15sp" android:gravity="center" android:layout_alignParentLeft="true" android:layout_marginLeft="10dp"

21、android:layout_marginTop="65dp" android:background="android:color/transparent" android:text="由于程序员技术不成熟,如需注册请上:" /> <TextView android:layout_width="300dp" android:layout_height="wrap_content" android:textSize="15sp" android:gravity=&q

22、uot;center" android:layout_below="id/zhuce" android:layout_alignParentLeft="true" android:layout_marginLeft="10dp" android:background="android:color/transparent" /> </LinearLayout>main_menu.xml:主菜单界面代码<?xml version="1.0" encoding=&qu

23、ot;utf-8"?> android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="drawable/background" > <Button android:id="+id/setting" android:layout_width="50dp" androi

24、d:layout_height="32dp" android:layout_alignParentLeft="true" android:layout_marginLeft="261dp" android:layout_marginTop="9dp" android:background="drawable/setting" /><Button android:id="+id/chat" android:layout_width="250dp"

25、 android:layout_height="32dp" android:layout_centerHorizontal="true" android:layout_marginTop="85dp" android:background="drawable/chat" /> <Button android:id="+id/contract" android:layout_width="250dp" android:layout_height="32dp

26、" android:layout_below="id/chat" android:layout_centerHorizontal="true" android:layout_marginTop="20dp" android:background="drawable/contract" /> <Button android:id="+id/find" android:layout_width="250dp" android:layout_height=&q

27、uot;32dp" android:layout_below="id/contract" android:layout_centerHorizontal="true" android:layout_marginTop="20dp" android:background="drawable/find" /> <Button android:id="+id/profile" android:layout_width="250dp" android:layou

28、t_height="32dp" android:layout_below="id/find" android:layout_centerHorizontal="true" android:layout_marginTop="20dp" android:background="drawable/profile" /> <Button android:id="+id/feedback" android:layout_width="250dp" an

29、droid:layout_height="32dp" android:layout_below="id/profile" android:layout_centerHorizontal="true" android:layout_marginTop="20dp" android:background="drawable/feedback" /> <Button android:id="+id/about_button" android:layout_width=&

30、quot;250dp" android:layout_height="32dp" android:layout_below="id/feedback" android:layout_centerHorizontal="true" android:layout_marginTop="20dp" android:background="drawable/about_button" /> </RelativeLayout>chat.xml:聊天界面代码<?xml ve

31、rsion="1.0" encoding="utf-8"?> android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="drawable/chat_bg" > <Button android:id="+id/return_button" android

32、:layout_width="50dp" android:layout_height="32dp" android:layout_alignParentLeft="true" android:layout_marginLeft="9dp" android:layout_marginTop="9dp" android:background="drawable/return_button" /> <EditText android:id="+id/edit0

33、" android:layout_width="135dp" android:layout_height="40dp" android:textSize="13sp" android:layout_below="id/return_button" android:layout_alignParentLeft="true" android:layout_marginTop="15dp" android:hint="IP地址" /> <E

34、ditText android:layout_width="135dp" android:layout_height="40dp" android:textSize="13sp" android:layout_below="id/return_button" android:layout_toRightOf="id/edit0" android:layout_marginTop="15dp" android:hint="用户名" android:id=&q

35、uot;+id/edit1" /> <Button android:id="+id/button1" android:layout_width="fill_parent" android:layout_height="40dp" android:textSize="13sp" android:textColor="#1d5972" android:layout_below="id/return_button" android:layout_toRight

36、Of="id/edit1" android:layout_marginTop="15dp" android:text="连接" /> <EditText android:layout_width="fill_parent" android:layout_height="wrap_content" android:textSize="15sp" android:text="" android:layout_below="id/edit0

37、" android:background="android:color/transparent" android:id="+id/edit3" /> <EditText android:layout_width="270dp" android:layout_height="40dp" android:textSize="13sp" android:layout_alignParentLeft="true" android:layout_alignPare

38、ntBottom="true" android:text="" android:id="+id/edit2" /> <Button android:layout_width="50dp" android:layout_height="40dp" android:textColor="#1d5972" android:layout_alignParentRight="true" android:layout_alignParentBottom=&

39、quot;true" android:text="发送" android:id="+id/button2" /></RelativeLayout>profile.xml:我的资料界面代码<?xml version="1.0" encoding="utf-8"?> android:orientation="vertical" android:layout_width="fill_parent" android:layout_height=

40、"fill_parent" android:background="drawable/profile_bg" ><Button android:id="+id/return_button" android:layout_width="50dp" android:layout_height="32dp" android:layout_alignParentLeft="true" android:layout_marginLeft="9dp" an

41、droid:layout_marginTop="9dp" android:background="drawable/return_button" /><ImageView android:id="+id/myphoto" android:layout_width="100dp" android:layout_height="100dp"/> android:layout_below="id/return_button" android:layout_alig

42、nParentLeft="true" android:layout_marginLeft="10dip" android:layout_marginTop="25dip" android:src="drawable/myphoto" /> <TextView android:id="+id/myname" android:layout_width="300dp" android:layout_height="wrap_content" andr

43、oid:textSize="15sp" android:textColor="#1d5972" android:layout_below="id/myphoto" android:layout_alignParentLeft="true" android:layout_marginLeft="10dip" android:text="昵称 Never" /> <TextView android:id="+id/mysex" android:la

44、yout_width="300dp" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#1d5972" android:layout_below="id/myname" android:layout_alignParentLeft="true" android:layout_marginLeft="10dip" android:text=&quo

45、t;性别 女" /> <TextView android:id="+id/mycity" android:layout_width="300dp" android:layout_height="wrap_content" android:textSize="15sp" android:textColor="#1d5972" android:layout_below="id/mysex" android:layout_alignParentLeft=&qu

46、ot;true" android:layout_marginLeft="10dip" android:text="地区 广西" /> </RelativeLayout>feedback.xml:反馈我们界面代码<?xml version="1.0" encoding="utf-8"?> android:orientation="vertical" android:layout_width="fill_parent" android:la

47、yout_height="fill_parent" android:background="drawable/feedback_bg" > <Button android:id="+id/return_button" android:layout_width="50dp" android:layout_height="32dp" android:layout_alignParentLeft="true" android:layout_marginLeft=&quo

48、t;9dp" android:layout_marginTop="9dp" android:background="drawable/return_button" /> <TextView android:id="+id/suggestion" android:layout_width="300dp" android:layout_height="wrap_content" android:textSize="15sp" android:layout_b

49、elow="id/return_button" android:layout_alignParentLeft="true" android:layout_marginLeft="10dip" android:layout_marginTop="15dp" android:background="android:color/transparent" android:hint="告诉我们你的意见" /> <EditText android:id="+id/w

50、hitesuggestion" android:layout_width="300dp" android:layout_height="330dp" android:textSize="15sp" android:layout_below="id/suggestion" android:layout_alignParentLeft="true" android:layout_marginLeft="10dip" android:text="" /

51、> <Button android:id="+id/suggestionsend" android:layout_width="300dp" android:layout_height="45dp" android:textSize="16sp" android:layout_below="id/whitesuggestion" android:layout_alignParentLeft="true" android:layout_marginLeft=&quo

52、t;10dip" android:textColor="#1d5872" android:text="发送"/> </LinearLayout>about.xml:关于点滴界面代码<?xml version="1.0" encoding="utf-8"?> android:orientation="vertical" android:layout_width="wrap_content" android:layout_height=&q

53、uot;wrap_content" android:background="drawable/about" > <Button android:id="+id/return_button" android:layout_width="50dp" android:layout_height="32dp" android:layout_alignParentLeft="true" android:layout_marginLeft="9dp" android

54、:layout_marginTop="9dp" android:background="drawable/return_button" /></LinearLayout>setting.xml:设置界面代码<?xml version="1.0" encoding="utf-8"?> android:orientation="vertical" android:layout_width="wrap_content" android:layout_h

55、eight="wrap_content" android:background="drawable/background" ><Button android:id="+id/return_button" android:layout_width="50dp" android:layout_height="32dp" android:layout_alignParentLeft="true" android:layout_marginLeft="9dp&q

56、uot; android:layout_marginTop="9dp" android:background="drawable/return_button" /><Button android:id="+id/changeaccount" android:layout_width="250dp" android:layout_height="32dp" android:layout_centerHorizontal="true" android:layout_m

57、arginTop="85dp" android:background="drawable/changeaccount" /> <Button android:id="+id/logout" android:layout_width="250dp" android:layout_height="32dp" android:layout_below="id/changeaccount" android:layout_centerHorizontal="tru

58、e" android:layout_marginTop="20dp" android:background="drawable/logout" /> </RelativeLayout>hello.java:欢迎界面(main.xml)响应代码public class hello extends Activity /* Called when the activity is first created. */ Override public void onCreate(Bundle savedInstanceState) sup

59、er.onCreate(savedInstanceState); new Handler().postDelayed(new Runnable() Override public void run() Intent intent = new Intent(); intent.setClass(hello.this, password.class); startActivity(intent); ,2500); ;password.java:登录界面(password.xml)响应代码public class password extends Activity public void onCreate(Bundle savedInstanceState) s

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论