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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Denix
September 14, 2017
Programming
54
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
310
你所不知道所得分配的事
denishsieh
0
82
Git 教學簡報
denishsieh
0
300
Database 教學簡報
denishsieh
0
77
Other Decks in Programming
See All in Programming
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
1.9k
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
150
AI時代の仕事技芸論〜ソフトウェア開発で「遊ぶように働く」職人的熟達のすすめ(スクフェス仙台 2026バージョン)
kuranuki
0
670
霧の中の代数的エフェクト
funnyycat
1
410
アルゴリズムは何を圧縮しているのか ─ Haskell から育った「圧縮代数」というメンタルモデル
naoya
16
3.5k
フィードバックで育てるAI開発
kotaminato
1
120
はてなアカウント基盤 State of the Union
cockscomb
1
1.3k
SLOをサービス品質の共通言語にするために 取り組んできたこと
wakana0222
0
520
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
300
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
130
AIを活用したE2Eテスト実装効率化のあゆみ / ebisu-mobile-14-kotetu
kotetuco
0
170
共通化で考えるべきは、実装より公開する型だった
codeegg
0
250
Featured
See All Featured
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
610
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6k
Making the Leap to Tech Lead
cromwellryan
135
10k
Design in an AI World
tapps
1
260
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.4k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
WENDY [Excerpt]
tessaabrams
11
38k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Mobile First: as difficult as doing things right
swwweet
225
10k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
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