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
68
DnD in Compose
punchdrunker
0
360
what's new in Material Design で気になったトピック
punchdrunker
1
660
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
dotNET_vulnclicker_intro.pdf
deka_morita
0
130
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
450
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.9k
そのリトライ、死んだコネクションを使い回していませんか ── GoのHTTPクライアントとHTTP/2を実プロダクト障害から学び直す
myus4a
1
410
最近”作らせてる” ローカルAIアプリの話
akit37
0
430
JRuby: Past, Present, and Future
headius
0
230
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
160
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
910
The Rails Doctrine Decade
koic
2
540
Workers Cache を知る
syumai
0
350
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
カツオ、ご期待ください
suneo3476
0
160
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
Writing Fast Ruby
sferik
630
63k
Amusing Abliteration
ianozsvald
1
330
Chasing Engaging Ingredients in Design
codingconduct
0
350
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
270
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
720
4 Signs Your Business is Dying
shpigford
187
23k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Code Reviewing Like a Champion
maltzj
529
40k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
2
940
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