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
73
Git 教學簡報
denishsieh
0
280
Database 教學簡報
denishsieh
0
69
Other Decks in Programming
See All in Programming
コーディングルールの鮮度を保ちたい / keep-fresh-go-internal-conventions
handlename
0
190
API Platformを活用したPHPによる本格的なWeb API開発 / api-platform-book-intro
ttskch
1
130
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
700
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
130
受け入れテスト駆動開発(ATDD)×AI駆動開発 AI時代のATDDの取り組み方を考える
kztakasaki
2
560
ポーリング処理廃止によるイベント駆動アーキテクチャへの移行
seitarof
3
1k
株式会社 Sun terras カンパニーデック
sunterras
0
2.1k
DevinとClaude Code、SREの現場で使い倒してみた件
karia
1
1k
エージェント開発初心者の僕がエージェントを作った話と今後やりたいこと
thasu0123
0
240
AIとペアプロして処理時間を97%削減した話 #pyconshizu
kashewnuts
1
220
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
15
3k
AIコーディングの理想と現実 2026 | AI Coding: Expectations vs. Reality 2026
tomohisa
0
1.2k
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Docker and Python
trallard
47
3.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.8k
4 Signs Your Business is Dying
shpigford
187
22k
Marketing to machines
jonoalderson
1
5k
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
110k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
300
Color Theory Basics | Prateek | Gurzu
gurzu
0
240
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
90
Everyday Curiosity
cassininazir
0
160
A Soul's Torment
seathinner
5
2.4k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.8k
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