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
43
目指せKotlin 100%
sakebook
1
2.3k
Make full use of Chrome Custom Tabs
sakebook
3
3.1k
Chrome Custom Tabsを使いこなそう
sakebook
1
2.4k
1ヶ月でAndroidカメラアプリ開発(1/4)
sakebook
1
1.8k
1ヶ月でAndroidカメラアプリ開発(3/4)
sakebook
0
1k
1ヶ月でAndroidカメラアプリ開発(4/4)
sakebook
0
950
Other Decks in Programming
See All in Programming
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
受け取る人から提供する人になるということ
little_rubyist
0
250
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
280
Jakarta EE meets AI
ivargrimstad
0
730
ローコードSaaSのUXを向上させるためのTypeScript
taro28
1
630
CSC509 Lecture 13
javiergs
PRO
0
110
Quine, Polyglot, 良いコード
qnighy
4
650
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
350
Nurturing OpenJDK distribution: Eclipse Temurin Success History and plan
ivargrimstad
0
1k
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
710
C++でシェーダを書く
fadis
6
4.1k
Featured
See All Featured
Visualization
eitanlees
145
15k
Fireside Chat
paigeccino
34
3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Testing 201, or: Great Expectations
jmmastey
38
7.1k
Designing for Performance
lara
604
68k
Done Done
chrislema
181
16k
Optimizing for Happiness
mojombo
376
70k
Bash Introduction
62gerente
608
210k
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 • Ұॹʹ͍͖ͬͯ·͠ΐ͏ɻ