ImageVerifierCode 换一换
格式:PPT , 页数:25 ,大小:856KB ,
资源ID:378396      下载积分:2000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-378396.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(Android GUI Project.ppt)为本站会员(刘芸)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

Android GUI Project.ppt

1、Android GUI Project,John Hurley CS 454,Android,1. Android Basics 2. Android Development 3. Android UI 4. Hello, World 5. My Project,Android Basics,Open source OS Uses Linux kernel Optimized for limited-resource environment Apps typically written in Java Apps run on the Dalvik Virtual Machine Not a J

2、VM, but works similarly from developers point of view Usually one app per DVM Each DVM runs under Linux as a separate user App permissions set at install time Possible to use C or C+ compiled to machine code, but still runs on VM. Its not clear to me how this works. Docs say it does not necessarily

3、improve performance.,Sams Teach Yourself AndroidApplication Development in 24 Hours (0321673352),Copyright 2010 Lauren Darcey and Shane Conder,FIGURE 5.6 Simplified Android platform architecture from a security perspective.,Android Development,Well-defined framework for app development Apps are typi

4、cally coded using Java syntax, but other parts of the Java platform are missing Some standard Java SE or ME APIs and class libraries are not included I will give examples when I find out!,Android Development,Standard development environment is Eclipse + Android Development Tools plugin + Android SDK

5、 Development requires either an Android OS device or an emulator Emulator has limitations: Performance is poor Camera, etc., simulated using your computers hardware No real phone calls or texts GPS data, battery readings, etc. must be simulated Real device is affected by specific hardware and softwa

6、re configuration,Android vs. Other Mobile OS,I was able to choose what kind of smart phone to get according to which platform I wanted to use to try mobile development Android: I had Java backend code ready to go for a first project Interesting platform: Familiar programming environment Currently th

7、e market leader Broad market, unlike more focused iOS, Blackberry, and (Palm) webOS Development tools are open source and are free even for commercial use, unlike Visual Studio,Android App vs. Mobile- Optimized RIA,Android Flash plugins available; Silverlight coming soon Could develop in JavaScript

8、and/or HTML5WWW App Easier for users to run; no need to install For a paid app, avoid the 30% App Store commission Easier to write cross-platform apps Android AppsFewer security hurdles Use APIs for access to built in GPS, camera, etc. Probably better performance; one layer less,Android Apps: Market

9、ing,Usually market apps through Android App Market There are other markets, also App store will dominate the market due to access through built in app Can set up for download directly on a website User must agree to “install apps from unknown sources”,Android Apps: Marketing,Revenue from app sales p

10、rices and/or advertising Conventional wisdom is that iOS users will pay for apps, but Android users wont 57% of Android App Store apps are free, vs. 28% for Apple App Store Android Market takes 30% commission Any purchase model other than one-time purchase must be homegrown, using Paypal or similar

11、service PPC ads My guess is that response to these is extremely low Probably need to be very aggressive with banner ads Sell to companies?,Android Deployment,Apps are packaged in .apk format, variant of .jar, then downloaded to device and installed .apks contain .dex files (bytecode), manifest and v

12、arious other files Manifest contains security and link info, hardware access info, minimum OS release info, etc.,Android UI,Activity: single screen with a UI, somewhat analogous to XAML / code behind pattern in .NET Email app might have one activity that shows a list of new emails, another activity

13、to compose an email, and another activity for reading emails Implement by subclassing Activity class View: drawable object Android UI View MVC View UI contains a hierarchy of Views View is a class, subclassed by the drawable objects in the UI,Android UI,Service: background operation play music in th

14、e background while the user is in a different application fetch data over the network without blocking user interaction with an activity Content Provider: DB or other data access Broadcast Receiver: responds to system messages Battery low,Android UI,UI construction can be done in three ways: Program

15、matic, like hand-coded Java desktop GUI construction Declarative hand-written, like Java web UI construction XML Declarative with a GUI builder, like .NET UI construction GUI builder generates the XML,Programmatic UI,package cs454.demo;import android.app.Activity; import android.widget.TextView; imp

16、ort android.os.Bundle;public class AndroidDemo extends Activity /* Called when the activity is first created. */Overridepublic void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState);/ Activity is a subclass of context, so the TextView takes this as a parameterTextView tv = new T

17、extView(this);tv.setText(“Hello, CS454“);setContentView(tv); ,Manual Declarative UI,main.xml Layout File:strings.xml resource file:Hello Again, CS454!CS454 AndroidDemo ,Manual Declarative UI,Java class: package cs454.demo; import android.app.Activity; import android.os.Bundle;public class AndroidDem

18、o extends Activity /* Called when the activity is first created. */Overridepublic void onCreate(Bundle savedInstanceState) super.onCreate(savedInstanceState);setContentView(R.layout.main); ,Whats R?,/* AUTO-GENERATED FILE. DO NOT MODIFY. This class was automatically generated by the* aapt tool from

19、the resource data it found. It should not be modified by hand. */package cs454.demo; public final class R public static final class attr public static final class drawable public static final int icon=0x7f020000;public static final class id public static final int textview=0x7f050000;public static f

20、inal class layout public static final int main=0x7f030000;public static final class string public static final int app_name=0x7f040001;public static final int hello=0x7f040000; ,UI With GUI Builder,Android Event Handlers,From the code file for the activity:Button ok = (Button) findViewById(R.id.butt

21、on1); ok.setOnClickListener(new View.OnClickListener() public void onClick(View v) CharSequence s = et.getText();tv.setText(“Welcome, “ + s); );,Sams Teach Yourself AndroidApplication Development in 24 Hours (0321673352),Copyright 2010 Lauren Darcey and Shane Conder,FIGURE 3.2 Important callback met

22、hods of the activity life cycle.,APIs for Android built-ins,Android OS ships with many built in apps Web Browser Google Maps Navigation Camera apps Built in access for these as well as TTS and Voice Recognition, etc.,Demo,My Project,Goats and Tigers is a board game, which we implemented in Java in C

23、S 460 last term. The objective in CS460 was to implement the minmax / alpha beta pruning algorithm for the automatic player, not to create a good UI My existing interface shows an ASCII art picture of the board and provides a JOptionPane menu of available moves I will develop an Android UI and use my existing backend code as much as possible,References,http:/ Conder and Darcey, Android Wireless Application Development, Addison-Wesley, 2010 Conder and Darcey, Sams Teach Yourself Android Application Development in 24 Hours, Sams, 2010,

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1