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
punchdrunker
October 06, 2018
Programming
750
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
64
DnD in Compose
punchdrunker
0
350
what's new in Material Design で気になったトピック
punchdrunker
1
650
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
巨大モノリシックアプリ モダン化大作戦
ktcryomm
0
440
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.4k
DynamoDBの基礎を振り返りながらベクトル検索機能を理解する
musan
3
280
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
130
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
330
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
140
新人はどこまで自力でやり、どこからAIに頼るべきか/エンジニア育成に向き合う_先輩たちの悩みと知見共有会
toppan_digital_dev
1
590
アクセシビリティから考える情報設計
high_g_engineer
0
350
Intent as Code
shoppingjaws
4
710
Hono + Inertia + React で LP を構築した話
oukayuka
2
220
業務時間外もAIに働いてもらう話
colorful12
3
10k
Featured
See All Featured
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.3k
Producing Creativity
orderedlist
PRO
348
41k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Agile that works and the tools we love
rasmusluckow
331
22k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
490
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.5k
Speed Design
sergeychernyshev
33
2.1k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
400
Navigating Weather and Climate Data
rabernat
0
510
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