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
今時のProgress indicator / Replacing ProgressDialo...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
punchdrunker
October 06, 2018
Programming
760
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
今時のProgress indicator / Replacing ProgressDialog with ProgressBar
punchdrunker
October 06, 2018
More Decks by punchdrunker
See All by punchdrunker
Kotlin2.0以降の新機能
punchdrunker
0
73
DnD in Compose
punchdrunker
0
370
what's new in Material Design で気になったトピック
punchdrunker
1
670
7カ国語に対応したサービスでの翻訳管理システムの改善事例
punchdrunker
1
1.7k
Java Bytecode Vertical Tasting
punchdrunker
2
1.6k
getting started with dark theme
punchdrunker
2
1.1k
Practical Activity Transition in Android
punchdrunker
0
1.3k
レビュー評価4.7の秘密 / The Secret To A Better Reputation
punchdrunker
2
2.1k
Dynamic Feature Modules 入門
punchdrunker
2
2.8k
Other Decks in Programming
See All in Programming
Kotlinの15年とServer-Side Kotlin
n_takehata
1
170
自サークルのIdPからログアウトできるようになるまで
taiseiue
1
150
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
200
Seven New Principles of Software Engineering
yegor256
0
320
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
370
Modernizing iOS Apps
seyfoyun
0
120
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
200
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.2k
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
130
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
240
Railsバージョンを4倍にした話
optim
0
730
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
23k
Building the Perfect Custom Keyboard
takai
2
920
Site-Speed That Sticks
csswizardry
13
1.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
How to Ace a Technical Interview
jacobian
280
24k
Believing is Seeing
oripsolob
1
250
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
540
Prompt Engineering for Job Search
mfonobong
0
540
Music & Morning Musume
bryan
48
7.5k
The SEO Collaboration Effect
kristinabergwall1
1
600
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
420
Transcript
ࠓ࣌ͷProgress indicator by punchdrunker
ࣗݾհ ‣ ߴߍଔۀ·Ͱࡳຈࡏॅ ‣ 2010ʙ iOS/AndroidͷΞϓϦΛॻ͍ͯΈΔ ‣ 2011ʙ ϛΫγΟ ‣
ՈΞϧόϜ ΈͯͶ ‣ DroidKaigiͱ͔shibuya.apkӡӦ
՝ ‣ 11݄·ͰʹtargetSdk26ʹ͠ͳ͍ͱ ‣ ProgressDialogAPI26͔Βඇਪʹ ‣ ͱΓ͋͑ͣஔͨ͠DialogFragment IllegalStateException ‣ ͦͦMaterial
Designʹ४ڌ͢Δ ͖
༻ޠͷઆ໌ ‣ ProgressDialog ‣ ͔ͭͯར༻͞Ε͍ͯͨΫϧΫϧDialogΫϥε ‣ ProgressBar ‣ ࠓ࠷ར༻͞Ε͍ͯͦ͏ͳΫϧΫϧΛදࣔ͢ΔΫϥε ‣
Progress indicators ‣ Material Design Guidelineʹग़ͯ͘Δ໊শͰɺ୯ʹ ʮਐḿΛදࣔ͢Δ෦ʯ
എܠ ެࣜͷϦϑΝϨϯεͰɺAPI Level26͔ΒProgressDialog ެࣜʹඇਪͱ͞Εɺ ProgressBar ௨ Λͬͯਐ ḿΛදࣔ͢Δ͖ɺͱ͍͏هࡌ
ProgressDialogͷޭࡑ ‣ ToastϥΠΫʹؾܰʹදࣔͰ͖Δ ‣ ίϐϖ͞Ε͕ͪ ‣ දࣔதʹը໘ͷૢ࡞ΛېࢭͰ͖Δ ‣ Ϣʔβʹͱͬͯෆࣗ༝ʹײ͡Δ ‣
DialogFragmentͰྨࣅ࣮Ͱ͖Δ ‣ ϥΠϑαΠΫϧʹؾΛ͚ͳ͍ͱ...
MDCతΫϧΫϧ (Progress indecators) ༻్ ͪ࣌ؒ/ॲཧ࣌ؒͷදݱΛ͢ΔͨΊͷͷ छྨ Linear ͱ Circular ͷ2ͭ
material.ioΑΓ
Linear ͱ Circular ͷ2ͭಉ͡ProgressBarͰɺstyleΛࢦఆ ͢ΔࣄͰܗΛม͑Δࣄ͕ग़དྷΔ ͲͬͪΛ͍͍͚ͬͯͲɺͲͪΒ͔ʹ౷Ұͨ͠ํ͕ྑ͍
ਐḿදࣔͷͨΊͷݪଇ ‣ Informative: ͨͩͷ০Ͱͳ͘ҙຯͷ͋Δදࣔ ‣ Animated: ҙΛҾ͘ඞཁ͕͋Δ ‣ Consistent: Ұ؏ੑ
ஔ ॲཧ௨৴͕ྃͨ࣌͠ʹදࣔ͞ΕΔ෦ʹຒΊࠐ·Εͯ ͍Δ͖ɻ Ϧετ͕දࣔ͞ΕΔ༧ఆͷॴʹຒΊࠐΜͩΓɺબͨ͠ itemʹԊͬͯදࣔ͢ΔͳͲɻ
None
None
දࣔΛͭදݱॻ͍ͯ͋Δ͚Ͳɺߋ৽ܥ? (Ϣʔβʔͷߘฤूૢ࡞ͳͲ)
༗໊ͳΞϓϦͷࣄྫ ‣ twitter ‣ facebook ‣ gmail ‣ airbnb
༗໊ͳΞϓϦͷࣄྫ ߘɺฤूɺআͦͦॲཧதදࣔͤͣʹɺྃͨ͠ ϑϦΛͯ͠ΤϥʔʹͳͬͨΒ௨͢Δ͜ͱ͕ଟ͍ ௨৴͢Δ͔Βͱ͍ͬͯɺશͯͷ௨৴ॲཧͰProgressBarΛද ࣔ͢Δඞཁͳ͍
ProgressBarΛग़݅͢ Ͳ͏ͯ͠ϢʔβʔΛͨͤͳ͍ͱ͍͚ͳ͍ͱ͜ΖͰ͏ Α͏ʹͨ͠ํ͕Ϣʔβʔʹ༏͍͠ ৽͍͠ใͷऔಘ௨৴ͳͲͷॲཧ͕ऴΘΒͳ͍ͱදࣔͰ ͖ͳ͍͕ɺͦΕҎ֎ͷૢ࡞جຊతʹ͝·͔ͤΔɻ
ஔ͖͕͑໘ͳύλʔϯ ‣ ϘλϯΛλοϓ ‣ ԿΒ͔ͷ௨৴ॲཧ ‣ ޭͨ͠Β࣍ͷը໘ʹҾΛ͠ͳ͕ΒભҠ σʔλΛද͖ࣔ͢ॴʹindicatorΛஔ͠ͳ͍ͱ͍͚ͳ ͘ͳͬͨͷͰɺ ը໘ભҠ͔ͯ͠Β௨৴Λߦ͍ɺProgressDialogΛ
͓·͚: ࣌ؒͷ͔͔Δॲཧͷදݱ
None
͜ΜͳUIඪ४Ͱ༻ҙ͞Εͯͳ͍...
࡞Ζ͏ ButtonΛܧঝͯ͠ɺViewΛࣗલͰΰχϣΰχϣ͢Εग़དྷ ͦ͏ɻ ໘ͳͷͰࠓճConstrainLayoutΛܧঝͯ͠ɺClickableͳ CustomViewΛ࡞ͬͨɻ Layoutͷ࣮Ͱ͋ΕxmlͰϨΠΞτΛఆٛͰ͖ͯ؆୯ ʹݟͨΛ͍͡Δ͜ͱ͕ग़དྷΔɻ
ϨΠΞτ(େମ) TextViewͱProgressBarͷvisibilityΛΓସ͑ΕΑͦ͞ ͏ɻ ࠓճ͚ͩͰͳ͘ɺσʔλΛදࣔ͢Δ༧ఆͷॴʹindicator Λஔ͘߹visibilityͷΓସ͕͑؆୯ͦ͏ɻ <androidx.constraintlayout.widget.ConstraintLayout ...> <TextView android:text="Tap!" ...
/> <ProgressBar android:visibility="gone" ... /> </androidx.constraintlayout.widget.ConstraintLayout>
࣮ ίϯετϥΫλͰ inflateͯ͠ɺOnClickListenerͱλονΠ ϕϯτΛࣗલͰϋϯυϦϯά
࣮ class CustomButton(context: Context, attrs: AttributeSet?) : ConstraintLayout(context, attrs) {
var cListener: OnClickListener? = null constructor() { ... // inflate} override fun setOnClickListener(listener: OnClickListener?) { cListener = listener } override fun dispatchTouchEvent(ev: MotionEvent): Boolean { ... // ACTION_UPͰonClickΛinvoke } // Activity͔ΒݺͿ fun toggle() { ... // visibilityߋ৽ } }
Activityଆ binding.customButton.setOnClickListener { button -> (button as CustomButton).toggle() }
Demo ࣮ͪ͜Β https://github.com/punchdrunker/hocho/pull/42
FIN