Android Robert C.C. Huang Oscar F.Y. Liu Peter C.L. Hsieh 2011/03/21

Similar documents
Microsoft Word - 第1章 Android基本概念.docx

中 文 摘 要 智 慧 型 手 機 由 於 有 強 大 的 功 能, 以 及 優 渥 的 便 利 性, 還 能 與 網 路 保 持 隨 時 的 鏈 結 與 同 步 更 新, 因 此 深 受 廣 大 消 費 者 喜 愛, 當 然, 手 機 遊 戲 也 成 為 現 代 人 不 可 或 缺 的 娛 樂 之

<4D F736F F D20BBF9D3DA416E64726F6964C6BDCCA8B5C4B5E7D7D3C5C4C2F4CFB5CDB32E646F63>

111

Microsoft Word zw

<4D F736F F F696E74202D20C8EDBCFEBCDCB9B9CAA6D1D0D0DEBDB2D7F92E707074>

Important Notice SUNPLUS TECHNOLOGY CO. reserves the right to change this documentation without prior notice. Information provided by SUNPLUS TECHNOLO

epub83-1

目次 

Learning Java

Abstract Today, the structures of domestic bus industry have been changed greatly. Many manufacturers enter into the field because of its lower thresh

第 15 章 程 式 編 写 語 言 15.1 程 式 編 写 語 言 的 角 色 程 式 編 寫 語 言 是 程 式 編 寫 員 與 電 腦 溝 通 的 界 面 語 法 是 一 組 規 則 讓 程 式 編 寫 員 將 字 詞 集 合 起 來 電 腦 是 處 理 位 元 和 字 節 的 機 器, 與

mvc

Java 1 Java String Date

CC213

目 錄 版 次 變 更 記 錄... 2 原 始 程 式 碼 類 型 之 使 用 手 冊... 3 一 安 裝 軟 體 套 件 事 前 準 備... 3 二 編 譯 流 程 說 明

软 件 工 程 专 业 习 指 南 目 录 一 软 件 工 程 专 业 设 置 背 景 与 发 展 前 景... 3 二 软 件 工 程 专 业 实 践 教 条 件... 4 三 软 件 工 程 专 业 课 程 类 型 及 核 方 式 软 件 工 程 专 业 课 程 类 型...7

untitled

Value Chain ~ (E-Business RD / Pre-Sales / Consultant) APS, Advanc

藍牙網路在資訊家電的應用

Olav Lundström MicroSCADA Pro Marketing & Sales 2005 ABB - 1-1MRS755673

CANVIO_AEROCAST_CS_EN.indd

南京市人才服务中心

A Preliminary Implementation of Linux Kernel Virus and Process Hiding

WebSphere Studio Application Developer IBM Portal Toolkit... 2/21 1. WebSphere Portal Portal WebSphere Application Server stopserver.bat -configfile..

1 目 錄 1. 簡 介 一 般 甄 試 程 序 第 一 階 段 的 準 備 第 二 階 段 的 準 備 每 間 學 校 的 面 試 方 式 各 程 序 我 的 做 法 心 得 及 筆 記 結 論..

CH01.indd

1.ai

Eclipse C C++, or

政府機關資訊通報第295期(5月)

UDC Empirical Researches on Pricing of Corporate Bonds with Macro Factors 厦门大学博硕士论文摘要库

附录J:Eclipse教程

WTO

声 明 本 公 司 及 全 体 董 事 监 事 高 级 管 理 人 员 承 诺 不 存 在 任 何 虚 假 记 载 误 导 性 陈 述 或 重 大 遗 漏, 并 对 其 真 实 性 准 确 性 完 整 性 承 担 个 别 和 连 带 的 法 律 责 任 本 公 司 负 责 人 和 主 管 会 计 工

Microsoft Word 記錄附件

基于用户行为的笔记本电脑输入模式研究和设计

Microsoft PowerPoint - ch6 [相容模式]

2 第 章 绪 论 Internet 2.0 使 得 消 费 型 电 子 产 品 用 户 可 以 通 过 多 种 不 同 的 数 据 网 络 访 问 互 联 网 内 容 用 户 可 以 使 用 便 携 式 消 费 型 电 子 设 备, 如 智 能 手 机 触 屏 平 板 电 脑 电 子 书, 甚 至

Windows XP

Basic System Administration

ltu

Microsoft PowerPoint - Big Data rc Sharing掃盲時間.ppt [相容模式]

財金資訊-83期.indd

中南大学第二届软件创新大赛

1. 2. Flex Adobe 3.

IP505SM_manual_cn.doc

epub 61-2

Android Android Android SDK iv

区 域 活 动 进 入 中 班 我 们 区 域 的 设 置 和 活 动 材 料 都 有 所 变 化, 同 时 也 吸 引 孩 子 们 积 极 的 参 与 学 习 操 作 区 的 新 材 料 他 们 最 喜 欢, 孩 子 们 用 立 方 块 进 行 推 理 操 作 用 扑 克 牌 进 行 接 龙 游

豐佳燕.PDF

<4D F736F F D20312D3120D5D0B9C9CBB5C3F7CAE9A3A8C9EAB1A8B8E5A3A92E646F63>

<4D F736F F D20312D3120D5D0B9C9CBB5C3F7CAE9A3A8C9CFBBE1B8E5A3A92E646F63>

(Microsoft Word - 11\244T\246\342\277\337\260l\302\334.doc)

59 1 CSpace 2 CSpace CSpace URL CSpace 1 CSpace URL 2 Lucene 3 ID 4 ID Web 1. 2 CSpace LireSolr 3 LireSolr 3 Web LireSolr ID


Microsoft PowerPoint - ARC110_栾跃.ppt


PowerPoint Presentation

<4D F736F F D C9CFB0EBC4EACFB5CDB3BCAFB3C9CFEEC4BFB9DCC0EDCAA6C9CFCEE7CAD4BEED>

,2(1) 基 礎 上, 各 種 數 據 均 以 圖 形 化 方 式 表 達, 因 此 各 級 分 析 結 果 均 可 以 隨 時 檢 驗 另 外, 由 於 系 統 是 以 網 站 形 式 發 佈, 任 何 用 戶 均 可 通 過 網 絡 查 詢 瀏 覽 系 統 中 的 數 據, 因

XXX专业本科人才培养方案

國立臺灣科技大學

ebook140-9

Microsoft Word - H6800BM_translation base_Update_1_2014_ doc

Symantec™ Sygate Enterprise Protection 防护代理安装使用指南

Junos Pulse Mobile Security R1 2012, Juniper Networks, Inc.

申 请 者 的 承 诺 : 我 承 诺 对 本 人 填 写 的 各 项 内 容 的 真 实 性 负 责, 保 证 没 有 知 识 产 权 争 议 如 获 准 立 项, 本 表 为 有 约 束 力 的 协 议, 遵 守 广 东 省 教 育 科 学 规 划 领 导 小 组 办 公 室 的 有 关 规 定

ASP.NET MVC Visual Studio MVC MVC 範例 1-1 建立第一個 MVC 專案 Visual Studio MVC step 01 Visual Studio Web ASP.NET Web (.NET Framework) step 02 C:\M

128 ( ) ( ) [ 1 ] [2] [3] (1) (2) (3) [1] [2] [3] 10 2 ( ) (1997.6) ( ) 64

1


A API Application Programming Interface 见 应 用 程 序 编 程 接 口 ARP Address Resolution Protocol 地 址 解 析 协 议 为 IP 地 址 到 对 应 的 硬 件 地 址 之 间 提 供 动 态 映 射 阿 里 云 内


151225_154448

声 明 本 公 司 及 全 体 董 事 监 事 高 级 管 理 人 员 承 诺 不 存 在 虚 假 记 载 误 导 性 陈 述 或 重 大 遗 漏, 并 对 其 真 实 性 准 确 性 完 整 性 承 担 个 别 和 连 带 的 法 律 责 任 本 公 司 负 责 人 和 主 管 会 计 工 作 的


GoFlex Home UG Book.book

5B_sasaki.pdf

麻 省 理 工 學 院 是 在 西 元 2013 年 12 月 3 日 推 出 MIT App Inventor 2 網 站, 提 供 免 費 的 雲 端 服 務, 使 用 者 可 以 透 過 瀏 覽 器 來 開 發 Android 裝 置 應 用 程 式, 該 網 站 的 網 址 為 : http

<4D F736F F D20C8EDBCFEA1B A1B33136BAC5A3BAB9D8D3DAB7A2B2BC C4EAC8EDBCFEB9A4B3CCCAB5D1B5D6AED0A3C4DABFC6D1D0CFEEC4BFB5C4CDA8D6AA2E646F63>

APP 103 學 年 度 嶺 東 科 技 大 學 資 訊 網 路 系 專 題 研 究 報 告 嶺 東 中 華 民 國 一 四 年 五 月 1

1 C++ 2 Bjarne Stroustrup C++ (system programming) 6 (infrastructure) C++ 7 Herb Sutter 8 C++ (efficiency) (flexibility) 9 (abstraction) (productivity

Microsoft Word - template.doc

第 一 章 UI 概 述 单 元 设 计 : 课 题 名 称 :UI 综 述 教 学 任 务 :1 UI 是 什 么? 2 UI 设 计 师 是 做 什 么 的? 3 UI 在 中 国 的 现 状 如 何? 4 数 据 时 代 的 用 户 体 验 (APP 视 觉 设 计 艺 术 ) 教 学 方 式

1.3

EK-STM32F

Microsoft Word - 11月電子報1130.doc

2/14 Buffer I12, /* x=2, buffer = I 1 2 */ Buffer I243, /* x=34, buffer = I 2 43 */ x=56, buffer = I243 Buffer I243I265 code_int(int x, char *buffer)

OOAD PowerDesigner OOAD Applying PowerDesigner CASE Tool in OOAD PowerDesigner CASE Tool PowerDesigner PowerDesigner CASE To

版权页.indd

2_ Bridegroom fast 1 - v1

内 容 提 要 将 JAVA 开 发 环 境 迁 移 到 Linux 系 统 上 是 现 在 很 多 公 司 的 现 实 想 法, 而 在 Linux 上 配 置 JAVA 开 发 环 境 是 步 入 Linux 下 JAVA 程 序 开 发 的 第 一 步, 本 文 图 文 并 茂 地 全 程 指

indd

13 A DSS B DSS C DSS D DSS A. B. C. CPU D. 15 A B Cache C Cache D L0 L1 L2 Cache 16 SMP A B. C D 17 A B. C D A B - C - D

WTO

晶体结构立体模型建构软件-Diamond的使用

Microsoft Word - CX VMCO 3 easy step v1.doc

On/Off/ FlexiClip HFC FlexiClip

ebook140-8

Microsoft Word - A _ doc

Transcription:

Android Robert C.C. Huang Oscar F.Y. Liu Peter C.L. Hsieh 2011/03/21

Outlines for Today Future Planning Review System Architecture Dev. Tools & Making the First App Project Structure & File Details Application Components Activity : a brief look & life cycle Brief introduction to UI elements

Schedule of Learning 3/21: Review & Ch3 Ch4 Ch5 3/28: Ch6 Ch7 4/4: Ch8 Ch9 4/11: Ch10 4/18: Ch11 Ch12 4/25: Ch13 Ch14

Textbook

Review

System Architecture We will introduce it in a Top-Down order.

System Architecture Applications Top layer Dalvik App App Market App

System Architecture Application Framework Second layer Google API Application View System, Activity System, etc.

System Architecture Libraries Part of the third layer Java ( NDK ) C/C++

System Architecture Android Runtime Part of the third layer Core Libraries Java Dalvik Virtual Machine.dex(Dalvik EXcutable) binary

Dalvik? Dalvik Virtual Machine Android Dalvik Dalvik Java Java Bytecode Java bytecode Dalvik VM dex(dalvik EXcutable).dex dex Dalvik bytecode Java bytecode Java VM JIT Android 2.2.java -> javac ->.class -> dx ->.dex

Linux Kernel(Based on 2.6 series) Bottom layer Android Linux (e.g. ) GPL

Development Tool JDK(Java Development Kit) Eclipse IDE ADT(Android Development Tools plugin) Android SDK

Demo

Making the First App!... BMI Step.1 Describe (Graphic) User Interface...

Making the First App! Step.2 Design User Interface res/layout/xxx.xml Step.3 Access Identifiers res/values/xxx.xml & gen/r.java

Making the First App! Step.4 Design Program Procedure(Flow control) UI src/xxx.java Step.5 Build.apk & Testing

Project Structure

Project Structure src/.java source files gen/ auto-generated files res/ resources(pic, layout, etc.) AndroidManifest.xml App settings

src/ source files Java.java Activity.java Java Class source file

gen/ Auto-generated Java File Eclipse/ADT.java Android XML XML R.java

gen/r.java A project's R.java file is an index into all the resources defined in the file. You use this class in your source code as a sort of shorthand way to refer to resources you've included in your project. This is particularly powerful with the codecompletion features of IDEs like Eclipse because it lets you quickly and interactively locate the specific reference you're looking for. The important thing to notice for now is the inner class named "layout", and its member field "main". The Eclipse plugin noticed that you added a new XML layout file and then regenerated this R.java file. As you add other resources to your projects you'll see R.java change to keep up.

res/ drawable/ layout/ xml values/ XML xml/ XML raw/

Demo

Application Components Activity Service Broadcast receivers Content providers

Activity Android android.app.activity Activity C# Web Activity Android Life Cycle Activity Intent 5 ANR(Android is Not Response) Service

Activity - Active( ) activity activity activity (Active) (Running) Paused( ) activity ex. Stopped( ) activity Activity Stopped activity notification Dead( ) activity finish activity

Android Activity Life Cycle oncreate() onstart() onresume() onpause() onstop() ondestroy()

Activity : (Create/Destroy) (Create) (Destroy) (Start/ReStart/Stop) activity Start activity activity Stop activity activity (Destroy) ReStart Start (Resume/Pause) activity Pause activity Resume

iphone View Life Cycle viewdidload viewwillappear viewdidappeared viewwilldisappear viewdiddisappeared viewdidunload

Activity

Intent Intent (action) Activity Intent Android Intent Intent intent-filter Intent Activity

Service Activity Service Handle 5 ANR /

Broadcast Receivers Intent sendbroadcast(), 5sec Activity or Service or Android,,,,,

Content Providers, Contact content://contacts/people/45 ( : 45 ) content://contacts/people/ ( : )

AndroidManifest.xml Activity

UI Elements AlertDialog Toast Notification Menu Layout

Demo

Thank you!