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
67
Other Decks in Programming
See All in Programming
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
930
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
430
Denoのセキュリティに関する仕組みの紹介 (toranoana.deno #23)
uki00a
0
270
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
500
Spinner 軸ズレ現象を調べたらレンダリング深淵に飲まれた #レバテックMeetup
bengo4com
1
220
CSC307 Lecture 07
javiergs
PRO
0
530
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
190
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
160
IFSによる形状設計/デモシーンの魅力 @ 慶應大学SFC
gam0022
1
280
Fragmented Architectures
denyspoltorak
0
140
[AI Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
2
600
.NET Conf 2025 の興味のあるセッ ションを復習した / dotnet conf 2025 quick recap for backend engineer
tomohisa
0
120
Featured
See All Featured
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
210
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
290
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
190
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
230
The Pragmatic Product Professional
lauravandoore
37
7.1k
Music & Morning Musume
bryan
47
7.1k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Claude Code のすすめ
schroneko
67
210k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
0
100
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
270
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