




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、基于Android的扬州大学系统软件扬州大学信息工程学院基于Android的扬州大学APP姓名:滕玲 班级:物联1301 学号:131408119 日期:2015.12.10 目 录一、系统设计31.1系统名称31.2系统总体功能3二、系统开发及运行环境3三、创建项目3四、系统界面及程序主要代码64.1系统主页64.2学校概况104.3学院部门114.4招生就业12五、运行项目14六、将程序安装到Android手机上15七、设计总结与收获167.1 常见问题与解决方法167.2 收获与小结16八、附录(部分源代码)16一、 系统设计 1.1 系统名称 基于安卓的扬州大学APP1.2 系统总体功
2、能 (1) 能够阅读关于扬州大学的相关信息 (2) 能打开相关网页链接 (3) 能正常启动,退出 (4) 能够在手机上使用该系统二、 系统开发及运行环境 本系统的软件开发环境及运行环境具体如下:操作系统:Windows 7。JDK环境:Java SE Development KET(JDK) version 6。开发工具:Eclipse 3.7.1+Android 4.0.3。开发语言:Java、XML。数据库管理软件:SQLite 3。运行平台:Windows、Linux各版本。分辨率:最佳效果1024×768像素。三、 创建项目(1)启动Ecl
3、ipse,在菜单栏中依次选择“文件”/“新建”/Android Project命令。 (2)弹出New Android Project窗口中,首先输入项目名称YDAPP,并选择项目存放路径,然后单击“下一步”按钮,进入Select Build Target界面,从中选择Android版本。 (3)单击“下一步”按钮,进入Application Info界面。(4)单击“完成”按钮。四、 系统界面及程序主要代码4.1 系统主页<?xml version="1.0" encoding="utf-8"?> <RelativeLayout xm
4、lns:android=" android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="drawable/background" android:orientation="vertical" > <ImageView android:id="+id/ydxhimg" android:layout_width="wrap_content&qu
5、ot; android:layout_height="wrap_content" android:layout_marginLeft="30dp" android:src="drawable/logo28" /> <Button android:id="+id/xxgk" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLef
6、t="33dp" android:layout_marginRight="10dp" android:layout_marginTop="100dp" android:background="#00000000" android:onClick="onclick" android:text="string/xxgk" /><Button android:id="+id/xybm" android:layout_width="wrap_
7、content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_marginTop="100dp" android:layout_toRightOf="+id/xxgk" android:background="#00000000" android:onClick="
8、onclick" android:text="string/xybm" /><Button android:id="+id/zsjy" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_margin
9、Top="100dp" android:layout_toRightOf="+id/xybm" android:background="#00000000" android:onClick="onclick" android:text="string/zsjy" /><Button android:id="+id/rcpy" android:layout_width="wrap_content" android:layout_height=&q
10、uot;wrap_content" android:layout_below="+id/xxgk" android:layout_marginLeft="33dp" android:layout_marginRight="10dp" android:background="#00000000" android:onClick="onclick" android:text="string/rcpy" /><Button android:id="+
11、id/szdw" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="+id/xybm" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_toRightOf="+id/rcpy" android:background
12、="#00000000" android:onClick="onclick" android:text="string/szdw" /><Button android:id="+id/xkky" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="+id/zsjy" android:layout_margin
13、Left="10dp" android:layout_marginRight="10dp" android:layout_toRightOf="+id/szdw" android:background="#00000000" android:onClick="onclick" android:text="string/xkky" /><Button android:id="+id/hzjl" android:layout_width="
14、;wrap_content" android:layout_height="wrap_content" android:layout_below="+id/rcpy" android:layout_marginLeft="33dp" android:layout_marginRight="10dp" android:background="#00000000" android:onClick="onclick" android:text="string/h
15、zjl" /><Button android:id="+id/xyfw" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="+id/szdw" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_toRig
16、htOf="+id/hzjl" android:background="#00000000" android:onClick="onclick" android:text="string/xyfw" /><Button android:id="+id/xywh" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_belo
17、w="+id/xkky" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:layout_toRightOf="+id/xyfw" android:background="#00000000" android:onClick="onclick" android:text="string/xywh" /><ImageButton android:i
18、d="+id/xigk" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignLeft="+id/ydxhimg" android:layout_alignParentBottom="true" android:src="drawable/img04" /><ImageButton android:id="+id/ydxl
19、" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_toRightOf="+id/xigk" android:src="drawable/img03" /><ImageButton android:id="+id/bgxt" android:layo
20、ut_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_toRightOf="+id/ydxl" android:src="drawable/img08" /><ImageButton android:id="+id/bgxt" android:layout_width="wrap
21、_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_toRightOf="+id/ydxhimg" android:src="drawable/img01" /><ImageButton android:id="+id/rczp" android:layout_width="wrap_content" a
22、ndroid:layout_height="wrap_content" android:layout_above="+id/xigk" android:layout_alignRight="+id/ydxl" android:src="drawable/img02" /><ImageButton android:id="+id/bgxt" android:layout_width="wrap_content" android:layout_height="
23、;wrap_content" android:layout_above="+id/xigk" android:layout_alignLeft="+id/xigk" android:src="drawable/img06" /><ImageButton android:id="+id/bgxt" android:layout_width="wrap_content" android:layout_height="wrap_content" android
24、:layout_alignTop="+id/rczp" android:layout_toRightOf="+id/xyfw" android:src="drawable/img05" /><ImageButton android:id="+id/bgxt" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignRight="
25、;+id/xyfw" android:layout_alignTop="+id/rczp" android:src="drawable/img07" /></RelativeLayout>4.2 学校概况<?xml version="1.0" encoding="utf-8"?><ScrollView xmlns:android=" android:layout_width="fill_parent" android:layout_heig
26、ht="fill_parent" android:scrollbars="vertical" android:fadingEdge="vertical"> <LinearLayout xmlns:android=" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:backgroun
27、d="color/white"><WebView android:id="+id/webView1" android:layout_width="match_parent" android:layout_height="match_parent" /> <ImageView android:id="+id/imgview1" android:layout_width="wrap_content" android:layout_height="
28、wrap_content" /><TextView android:id="+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="color/black" /></LinearLayout></ScrollView>4.3 学院部门<?xml version="1.0" encod
29、ing="utf-8"?><ScrollView xmlns:android=" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbars="vertical" android:fadingEdge="vertical"> <LinearLayout xmlns:android=" android:orientation="
30、;vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="color/white" > <WebView android:id="+id/webView2" android:layout_width="match_parent" android:layout_height="match_parent" /&
31、gt; <ImageView android:id="+id/imgview2" android:layout_width="wrap_content" android:layout_height="wrap_content" /><TextView android:id="+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" andro
32、id:textColor="color/black" /></LinearLayout></ScrollView>4.4 招生就业<?xml version="1.0" encoding="utf-8"?><ScrollView xmlns:android=" android:layout_width="fill_parent" android:layout_height="fill_parent" android:scrollbars=
33、"vertical" android:fadingEdge="vertical"> <LinearLayout xmlns:android=" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="color/white" > <WebView and
34、roid:id="+id/webView3" android:layout_width="match_parent" android:layout_height="match_parent" /> <ImageView android:id="+id/imgview3" android:layout_width="wrap_content" android:layout_height="wrap_content" /><TextView android
35、:id="+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="color/black" /></LinearLayout></ScrollView>五、 运行项目模块设计及代码编写完成之后,单击Eclipse开发工具的工具栏中的运行键,或者在菜单栏中选择“运行”/“运行”命令,运行该项目,显示扬州大学APP登录窗口,如下图所示
36、。进入扬大APP的主窗体,然后用户可以单击主窗体中的各个功能图标,以便调用其各个子模块。例如,在主窗体中单击“校园文化”按钮,显示校园文化的相关内容,如下图所示。该窗口中,用户可以打开相应的网页。六、 将程序安装到Android手机上使用adb命令将此软件安装到Android模拟器的步骤如下:(1) 开发完扬大系统软件后,在Eclipse中运行该程序,会在项目文件的bin文件下自动生成一个apk文件,如图,将该文件复制到AndroidSDK安装路径下的platform-tools文件夹中。(2) 在“开始”菜单中打开cmd命令提示窗口,首先把路径切换到Android SDK安装路径的platf
37、orm-tools文件夹,然后使用adb install命令将YDAPP.apk文件夹安装到Android模拟器上。如果要将文件安装到SD卡,则使用adb install-s命令,如图、(3) 安装成功后,显示Success成功信息,打开Android模拟器,可以看到安装的扬州大学系统软件,如图所示。七、 设计总结与收获7.1 常见问题与解决方法(1)问题描述:我有一款HTC的智能手机,为什么下载安装该程序后无法运行?解决方法:该错误是由于Android版本低造成的,由于家庭理财通系统使用的是Android 4.0版本开发的,所以需要在装有Android 4.0以上版本的手机上运行,你可以联系
38、供应商升级Android到最新版本,然后再安装使用。 (2)问题描述:在Eclipse开发环境中修改完代码,重新运行程序时,出现如下图所示的错误提示。 解决方法:该错误是由于Android版本低造成的,由于家庭理财通系统使用的是Android 4.0版本开发的,所以需要在装有Android 4.0以上版本的手机上运行,你可以联系供应商升级Android到最新版本,然后再安装使用。7.2 收获与小结在此次课程设计中,我不仅了解到了android的有关知识,而且学习了Java语言以及eclipse等硬件环境。有几点需要特别注意:(1) 要明确课程设计的要求,想好系统应该包含哪些功能模块。否则,在软
39、件设计的后期,再想添加新的功能就需要花费大量的时间。(2) 要对android系统有一定的了解。在软件设计过程中,大量的用到了android系统的四大组件:Activity(提供可视化的界面)、Service(运行在后台的服务程序)、Broadcast Receiver(广播事件处理机制)、Content Provider(使应用程序相互访问数据)。只有对这些组件熟练掌握后,才能够真正设计出稳健搞笑的多媒体播放器。(3) 要对Java语言熟练掌握。Android软件开发都是用Java语言写的,而Java又是由类组成的。而Java语言本身又含有众多机制,只有深刻理解这些机制后,才能轻松地实现自己
40、想要的功能。(4) 要对界面设计有一定的了解。Android所有的布局都放在了res/layout中,而所有的菜单选项都放在了res/menu中。(5) 要具备快速上网查资料的能力。网上的很多现成的资料都可借鉴、学习。在熟练理解了别人的应用程序的基础上,再做二次开发。八、 附录(部分源代码)MainActivity.javapackage ;import android.app.Activity;import android.content.Intent;import android.os.Bundle;import android.view.KeyEvent;import android.v
41、iew.View;import android.view.ViewGroup;import android.widget.Button;import android.widget.ProgressBar;import android.widget.TextView;import android.widget.Toast;public class Mainactivity extends Activity Button button1 = null;Button button2 = null;Button button3 = null;Button button4 = null;Button b
42、utton5 = null;Button button6 = null;Button button7 = null;Button button8 = null;Button button9 = null;private long exitTime;public void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState); setContentView(R.layout.main); button1 = (Button)findViewById(R.id.xxgk); button1.setOnClick
43、Listener(new Button.OnClickListener() public void onClick(View v) Intent intent = new Intent(); intent.setClass(Mainactivity.this,Xxgkactivity.class); startActivity(intent); ); button2 = (Button)findViewById(R.id.xybm); button2.setOnClickListener(new Button.OnClickListener() public void onClick(View
44、 v) Intent intent = new Intent(); intent.setClass(Mainactivity.this,Xybmactivity.class); startActivity(intent); ); button3 = (Button)findViewById(R.id.zsjy); button3.setOnClickListener(new Button.OnClickListener() public void onClick(View v) Intent intent = new Intent(); intent.setClass(Mainactivity
45、.this,Zsjyactivity.class); startActivity(intent); ); button4 = (Button)findViewById(R.id.rcpy); button4.setOnClickListener(new Button.OnClickListener() public void onClick(View v) Intent intent = new Intent(); intent.setClass(Mainactivity.this,Rcpyactivity.class); startActivity(intent); ); button5 = (Button)findViewById(R.id.szdw); button5.setOnClickListener(new Butto
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025安徽省安全员《A证》考试题库及答案
- 九龙坡楼顶防水施工方案
- 辽宁节能环氧漆施工方案
- 2025年江苏省安全员C证考试(专职安全员)题库及答案
- 2025重庆市安全员C证考试(专职安全员)题库及答案
- 三年级口算题库大全1000道
- 产品定价合同范本
- 劳务队合同范本
- 保险公司司机合同范本
- 医疗设备开发采购合同范本
- 新苏教版科学六年级下册全册教案(含反思)
- 高速公路桥头跳车判别和处治
- 勃利县大四站镇侵蚀沟治理工程施工组织设计
- 汽车电子技术专业人才培养方案样本
- 血栓风险评估及个体化干预(遗传性易栓症风险基因检测)
- 血透患者的健康宣教课件
- 医院舆情应对处置预案
- 普通高中历史课程标准(2022年版2023年修订)解读
- 《统计学原理贾俊平》课件
- 2024电力储能电站钠离子电池技术条件
- 方法验证报告方案
评论
0/150
提交评论