Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Learning Android
Search
Denix
September 14, 2017
Programming
59
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Learning Android
CMRDB Android 讀書會, 2014 Winter
Denix
September 14, 2017
More Decks by Denix
See All by Denix
Android_Scalable_Modularized_Testable_Architecture.pdf
denishsieh
0
330
你所不知道所得分配的事
denishsieh
0
90
Git 教學簡報
denishsieh
0
310
Database 教學簡報
denishsieh
0
80
Other Decks in Programming
See All in Programming
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
contenteditable と日本語入力に向き合う
colorful12
0
200
SREの越境 / SRE Collaboration
y0hgi
2
310
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
210
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
380
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Agents on Rails - Rails at Scale 2026
irinanazarova
0
560
Simple Storage Service(S3) is not simple
iwatsukayura
0
290
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
phperだってパンチカードでコーディングしたい
o0h
PRO
0
330
Featured
See All Featured
Are puppies a ranking factor?
jonoalderson
2
4.1k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.7k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
The untapped power of vector embeddings
frankvandijk
2
1.9k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Everyday Curiosity
cassininazir
0
350
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
1
280
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