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
1ヶ月でAndroidカメラアプリ開発(2/4)
Search
sakebook
April 04, 2016
Programming
0
1.1k
1ヶ月でAndroidカメラアプリ開発(2/4)
Adobe Creative SDKを使った写真加工アプリの開発のスライドです。全4回。
sakebook
April 04, 2016
Tweet
Share
More Decks by sakebook
See All by sakebook
私とスクラム私とコミュニティ私とOST
sakebook
0
73
目指せKotlin 100%
sakebook
1
2.4k
Make full use of Chrome Custom Tabs
sakebook
3
3.3k
Chrome Custom Tabsを使いこなそう
sakebook
1
2.5k
1ヶ月でAndroidカメラアプリ開発(1/4)
sakebook
1
1.9k
1ヶ月でAndroidカメラアプリ開発(3/4)
sakebook
0
1k
1ヶ月でAndroidカメラアプリ開発(4/4)
sakebook
0
990
Other Decks in Programming
See All in Programming
🔨 小さなビルドシステムを作る
momeemt
2
540
令和最新版手のひらコンピュータ
koba789
14
8k
サイトを作ったらNFCタグキーホルダーを爆速で作れ!
yuukis
0
510
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
660
「リーダーは意思決定する人」って本当?~ 学びを現場で活かす、リーダー4ヶ月目の試行錯誤 ~
marina1017
0
240
Understanding Ruby Grammar Through Conflicts
yui_knk
1
140
AWS Serverless Application Model入門_20250708
smatsuzaki
0
130
【第4回】関東Kaggler会「Kaggleは執筆に役立つ」
mipypf
0
850
コンテキストエンジニアリング Cursor編
kinopeee
1
710
ゲームの物理
fadis
5
1.5k
ECS初心者の仲間 – TUIツール「e1s」の紹介
keidarcy
0
100
Langfuseと歩む生成AI活用推進
licux
3
300
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
For a Future-Friendly Web
brad_frost
179
9.9k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How to Ace a Technical Interview
jacobian
279
23k
Optimizing for Happiness
mojombo
379
70k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
110
20k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
53k
Transcript
̍ϲ݄Ͱ ANDROIDΧϝϥΞϓϦ։ൃ @Trunk ञຊ৳ 2016/3/20
ຊͷྲྀΕ • ϨΠΞτͷجຊࣝ • ActivityͷϥΠϑαΠΫϧ • ΠϕϯτϋϯυϦϯά • Widgetͷঢ়ଶཧ •
(Χϝϥݺͼग़͠) • (ը૾ड͚औΓ) • Aviaryઃఆ
ACTIVITY
ACTIVITY ≒ ը໘ • ActivityUIΛ࣋ͭը໘ʹඞਢ • ը໘xmlͰ࡞Δ • ಈతʹੜ͍ͨ͠ͷίʔυͰఆٛ •
ը໘Λߏ͢Δxml ϨΠΞτͱΟδΣοτͰΓཱͭ
LAYOUT
LAYOUT • WidgetViewΛҰఆͷنଇʹج͖ͮஔ͢Δ ͨΊͷͷ • ҰͭͷxmlʹϨΠΞτෳ͋ͬͯྑ͍ • ͷϨΠΞτඞͣҰͭ
͍͔ͭ͘հ • LinearLayout • ্͔ΒԼɺࠨ͔ΒӈͳͲɺॱংʹ٧Ίͯஔ͢ΔϨΠΞτ • RelativeLayout • ஔͨ͠ଞͷίϯϙʔωϯτͱͷҐஔؔΛఆٛ͠ͳ͕Β ஔ͢ΔϨΠΞτ
• FrameLayout • ࠨ্Λىͱͯ͠ɺࢠཁૉͰ͋Δͱ͖ લ໘ʹදࣔ͞ΕΔϨΠΞτ
XMLͷઃఆ • setContentView(Int id)
• εςʔλεόʔ • ΞΫγϣϯόʔ (πʔϧόʔ) • φϏήʔγϣϯόʔ ϨΠΞτ෦
None
None
WIDGET
WIDGET
ߴසग़ • Button • ϘλϯΛஔ͍ͨ͠ͱ͖ʹ͏ • TextView • ܾΊΒΕͨจࣈΛஔ͍ͨ͠ͱ͖ʹ͏ •
ImageView • ը૾Λද͍ࣔͨ͠ͱ͖ʹ͏
࣮श • ͕ࣗ࡞Γ͍ͨΞϓϦͷϨΠΞτΛߟ͑ ࣮ͯ͠ΈΔ
ϥΠϑαΠΫϧ
ϥΠϑαΠΫϧ • Activityಉ࢜ͷԁͳΓऔΓΛॿ͢Δ • ෳͷActivity • ϥΠϑαΠΫϧ ≒ ঢ়ଶભҠ
None
• onCreate • Activity͕ॳΊͯ ࡞ΒΕͨͱ͖ • onStart • Activity͕Ϣʔβʹ ݟ͑ΔΑ͏ʹͳΔલ
• onResume • Activity͕ දࣔ͞Εͨͱ͖ • onPause • ผͷActivity͕ දࣔ͞ΕΔͱ͖
• onStop • Activity͕ ݟ͑ͳ͘ͳͬͨ࣌ • onRestart • Activity͕ఀࢭͨ͠ޙ ࠶։࢝͞ΕΔલ
• onDestroy • Activity͕ ഁغ͞ΕΔલ • Activity͕ड͚औΔ ࠷ޙͷݺͼग़͠
ৄࡉ • http://dev.classmethod.jp/smartphone/android/ android-tips-21-activity-lifecycle/
ΠϕϯτϋϯυϦϯά
ΠϕϯτϋϯυϦϯά • Πϕϯτ • ϢʔβͷԿ͔͠Βͷߦಈ ෦ͷॲཧͷಛఆͷλΠϛϯά • ΠϕϯτΛదͳλΠϛϯάͰΩϟον͠ దͳॲཧΛߦ͏ɻ
ϘλϯΛΫϦοΫ • ButtonͷWidgetΛઃஔ • Button͕ΫϦοΫ͞Εͨ࣌ʹߦ͏ॲཧΛهड़ • ButtonͷΫϦοΫΠϕϯτΛϋϯυϦϯά
BUTTONͷWIDGETΛઃஔ • xml
BUTTON͕ΫϦοΫ͞Εͨ࣌ ʹߦ͏ॲཧΛهड़ • setOnClickListenerʹ࣮Λͯ͋͛͠Δ • Listener = Interface
࣮ ϋϯυϦϯά
ϋϯυϦϯά + ࣮
࣮? ϋϯυϦϯά
ผΫϥεͰ࣮ • MyCustomClick.class
࣮? ϋϯυϦϯά
ಉ͡ΫϥεͰ࣮ • ࣮͕هड़͞Ε͍ͯΔͷͰthis͕͑Δɻ
࣮͠·͢એݴ
SET_ON_CLICKҎ֎ͷϦεφʔ • setOn̋̋Ͱ༻ҙ͞Ε͍ͯΔɻ • ొ/ղআ͕ඞཁͳͷ add/remove register/unregister ͳͲɺ໋໊نଇͰผͰ͖Δ
࣮श • ͕ࣗ࡞Γ͍ͨΞϓϦͷ͍͔ͭ͘ͷwidgetͰ ΠϕϯτϋϯυϦϯάΛઃఆ͢Δ
WIDGETͷঢ়ଶ
BUTTON͕ΫϦοΫ͞Εͨ࣌ • ͳΜͲΫϦοΫͰ͖Δ • ΫϦοΫͰ͖͔ͨͲ͏͔Θ͔Βͳ͍ • ΫϦοΫՄೳͳঢ়ଶ͔ෆ໌
ͳΜͲΫϦοΫͰ͖Δ • ϝʔϧΛૹΔͳͲɺෳճ͞ΕͯࠔΔͷ ͕͋Δ • View#setEnabled(boolean) • Viewͷঢ়ଶΛɺ༗ޮ/ແޮʹ͢Δ
ΫϦοΫͰ͖͔ͨͲ͏͔ Θ͔Βͳ͍ ΫϦοΫՄೳͳঢ়ଶ͔ෆ໌ • ϢʔβʹϑΟʔυόοΫΛ༩͑Δ
ແޮͳঢ়ଶ ༗ޮͰ ԡ͞Ε͍ͯΔঢ়ଶ ༗ޮͰ ԡ͞Εͯͳ͍ঢ়ଶ
AVIARY
AVIARY • ΤσΟλʔػೳผSDK • https://creativesdk.adobe.com/docs/android/ #/articles/imageediting/index.html • Ұॹʹ͍͖ͬͯ·͠ΐ͏ɻ