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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
71
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
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
300
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
120
すこし踏み込む CancellationToken
htkym
2
1.7k
動作中のプログラムの中身をリアルタイムに覗く / Realtime Debugger for CSharp with Roslyn
prota
1
1.9k
contenteditable と日本語入力に向き合う
colorful12
0
200
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
160
sbt 2.0: takeoff
eed3si9n
0
160
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.6k
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
610
Featured
See All Featured
Paper Plane
katiecoart
PRO
5
54k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
Un-Boring Meetings
codingconduct
0
460
Bash Introduction
62gerente
615
220k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3.1k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Exploring anti-patterns in Rails
aemeredith
4
540
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
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