Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Learning Android
Search
Denix
September 14, 2017
Programming
0
47
Learning Android
CMRDB Android 讀書會, 2014 Winter
Denix
September 14, 2017
Tweet
Share
More Decks by Denix
See All by Denix
Android_Scalable_Modularized_Testable_Architecture.pdf
denishsieh
0
290
你所不知道所得分配的事
denishsieh
0
71
Git 教學簡報
denishsieh
0
270
Database 教學簡報
denishsieh
0
68
Other Decks in Programming
See All in Programming
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
300
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.5k
15年続くIoTサービスのSREエンジニアが挑む分散トレーシング導入
melonps
2
170
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
690
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
960
Lambda のコードストレージ容量に気をつけましょう
tattwan718
0
110
フルサイクルエンジニアリングをAI Agentで全自動化したい 〜構想と現在地〜
kamina_zzz
0
400
Kotlin Multiplatform Meetup - Compose Multiplatform 외부 의존성 아키텍처 설계부터 운영까지
wisemuji
0
190
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
Featured
See All Featured
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
160
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
180
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Six Lessons from altMBA
skipperchong
29
4.1k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.8k
Building AI with AI
inesmontani
PRO
1
680
Art, The Web, and Tiny UX
lynnandtonic
304
21k
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
72
The Curse of the Amulet
leimatthew05
1
8.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
300
Transcript
CMRDB 靜宜大學行雲者研發基地 與使用者互動- 事件處理 謝宗翰 Android 讀書會 2014 Winter
2 事件處理機制 button 產生onClick 事件 program
3 來源與監聽物件 ◎來源物件 Ø 事件發生的來源(ex: 按鈕) ◎監聽物件(Listener) Ø 處理該事件 Ø
先登錄à來源物件
4 Interface of Java ◎要成為特定事件的Listener, 必須符合該事 件的規範。 Ø Android à
Interface ü 介面Interface != 使用者介面UI
5 Interface of Java ◎介面(附錄A-20) Ø 一份method的『規格書』 ü 方法的名稱 ü
方法的參數 ü 方法的回傳值 介面 I 類別 C implements 類別 C 具有 介面 I 的功能 methods ….名稱 ….參數 ….回傳值 methods ….內容
6 Implement ◎撰寫符合該介面的method Ø 按一下 onClick() ? ü 在OnClickListener介面已定義 ◎向來源登錄自己成為該事件的Listener
7 Implement public class MainActivity extends Activity implements OnClickListener{ …
protected void onCreate(…){ … Button btn= findViewById(…); btn.setOnClickListener(this); } public void onClick(View v){ … } } 可處理『按一 下』事件 撰寫『按一下』 事件處理方法 取得按鈕 物件 以this向 btn登錄 button 登錄 呼叫
8 The End