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
文字拡大されても怖くない レイアウト作りのコツ
Search
Tiphaine
July 14, 2023
Technology
4
2.9k
文字拡大されても怖くない レイアウト作りのコツ
Shibuya.apk #43
https://shibuya-apk.connpass.com/event/288211/
Tiphaine
July 14, 2023
Tweet
Share
More Decks by Tiphaine
See All by Tiphaine
Customize your Lottie animations
tahia910
0
65
2024年のナビゲーション・フォーカス対応:Composeでキーボード・ナビゲーションをサポートしよう
tahia910
0
600
Navigation Focus Support in 2024: Support Keyboard Navigation with Compose!
tahia910
0
100
Handling focus in 2024
tahia910
0
1.2k
Matomoを使ってみた
tahia910
0
2k
社内でできるアクセシビリティのはじめかた
tahia910
3
640
Raise accessibility awareness at work as an Android developer
tahia910
1
150
社内でのアクセシビリティ推進
tahia910
3
5.2k
Promoting mobile accessibility at work
tahia910
0
240
Other Decks in Technology
See All in Technology
マルチプロダクト開発の現場でAWS Security Hubを1年以上運用して得た教訓
muziyoshiz
2
2.1k
re:Invent をおうちで楽しんでみた ~CloudWatch のオブザーバビリティ機能がスゴい!/ Enjoyed AWS re:Invent from Home and CloudWatch Observability Feature is Amazing!
yuj1osm
0
120
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
110
UI State設計とテスト方針
rmakiyama
2
320
サイボウズフロントエンドエキスパートチームについて / FrontendExpert Team
cybozuinsideout
PRO
5
38k
Storage Browser for Amazon S3
miu_crescent
1
130
ずっと昔に Star をつけたはずの思い出せない GitHub リポジトリを見つけたい!
rokuosan
0
150
AWS re:Invent 2024 ふりかえり
kongmingstrap
0
130
OpenShift Virtualizationのネットワーク構成を真剣に考えてみた/OpenShift Virtualization's Network Configuration
tnk4on
0
130
KubeCon NA 2024 Recap / Running WebAssembly (Wasm) Workloads Side-by-Side with Container Workloads
z63d
1
240
AWS re:Invent 2024で発表された コードを書く開発者向け機能について
maruto
0
180
なぜCodeceptJSを選んだか
goataka
0
160
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
The Invisible Side of Design
smashingmag
298
50k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Music & Morning Musume
bryan
46
6.2k
Fireside Chat
paigeccino
34
3.1k
For a Future-Friendly Web
brad_frost
175
9.4k
Agile that works and the tools we love
rasmusluckow
328
21k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
A Philosophy of Restraint
colly
203
16k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Transcript
Shibuya.apk#43ɹ2023.7.14ɹTiphaineɹ จࣈ֦େ͞Εͯා͘ͳ͍ ϨΠΞτ࡞Γͷίπ
ࣗݾհ ✤ Tiphaine(ςΟϑΣϯ) ✤ AndroidΤϯδχΞ ✤ϝυϐΞגࣜձࣾ
จࣈ֦େʁ ✤ Ϣʔβʔิॿػೳ ✤ ϑΥϯτͱදࣔ྆ํͱ ✤ ʹΑͬͯσϑΥϧτͷ ઃఆͰ͋Δ͔
·͊ɺSPΛ͑ ͳΜͱ͔ͳΔͰ͠ΐ͏ …ͦͷͣͩͬͨ
STORY TIME
ʮܾఆϘλϯ͕ग़ͯͳ͍ Ͱ͚͢Ͳʔʯ
None
None
จࣈ֦େΛ͢Δͱ Ϙλϯ͕ݟ͑ͳ͍
͔͠ ͜ͷը໘͚ͩ͡Όͳ͍
😇
࠶ൃࢭରࡦͷͨΊʹ ࢀߟ͕ཉ͍͠
“ WCAG ୡج४1.4.4ɹςΩετͷαΠζมߋ (…)ςΩετɺ ίϯςϯπຢػೳΛଛͳ͏͜ͱͳ͘ɺ ࢧԉٕज़ͳ͠Ͱ200%·ͰαΠζมߋͰ͖Δɻ
➤ શͯͷςΩετΛ֦େͰ͖Δ ➤ શͯͷςΩετ͕ಡΊΔ ➤ શͯͷػೳ͕͑Δ ඪ
͍ͭಉ͡ʹͳΔ ࡞Δ࣌ʹରࡦͰ͖Δ
ؾΛ͚ͭΔ͖ϙΠϯτ 1⃣ εΫϩʔϧ 2⃣ Margin/Padding 3⃣ লུͱվߦ
1⃣ εΫϩʔϧ ✤ ΧελϜϨΠΞτɺ·ͨComposeΛ͏ͳΒɺ શମεΫϩʔϧग़དྷΔΑ͏ʹ͠Α͏ AμΠΞϩάʹ͍ͭͯ εΫϩʔϧͰ͖ͳ͍ ➡︎
1⃣ εΫϩʔϧ ✤ AlertDialog͍ςΩετΛsetTitleͰઃఆ͠ͳ͍ AμΠΞϩάʹ͍ͭͯ AlertDialog.Builder(this) .setTitle(“λΠτϧʹඇৗʹ…”) .setPositiveButton("ܾఆ", /*…*/) .setNegativeButton("Ωϟϯηϧ",
/*…*/) .show() ̎ߦͰলུ͞Εͯ͠·͏ ➡︎
AlertDialog.Builder(this) .setTitle(“λΠτϧʹඇৗʹ…”) .setPositiveButton("ܾఆ", /*…*/) .setNegativeButton("Ωϟϯηϧ", /*…*/) .show() AlertDialog.Builder(this) .setTitle(“λΠτϧʹඇৗʹ…”) .setMessage(“λΠτϧʹඇৗʹ…”)
.setPositiveButton("ܾఆ", /*…*/) .setNegativeButton("Ωϟϯηϧ", /*…*/) .show() 1⃣ εΫϩʔϧ ➡ setMessageΛ͓͏ AμΠΞϩάʹ͍ͭͯ
✤ ϢʔβʔͷखؒΛݮΒͨ͢Ίɺॏࢹ͍ͨ͠෦͚ͩΛ εΫϩʔϧൣғ͔Β֎ͦ͏ 1⃣ εΫϩʔϧ A෦తʹݻఆ͢Δ
A෦తʹݻఆ͢Δ 1⃣ εΫϩʔϧ ݻఆ෦ εΫϩʔϧ Մೳ෦
✤ εΫϩʔϧͰ͖ΔࣄΛ໌֬ʹ͍͔ͨ͠Βɺ Πϯδέʔλʔফ͑ͳ͍Α͏ʹ͢Δ ✤ Compose·ͩͰ͖ͳ͍😣 1⃣ εΫϩʔϧ AΠϯδέʔλʔΛදࣔ͢Δ android:fadeScrollbars="false" android:scrollbarAlwaysDrawVerticalTrack="true"
android:scrollbarSize="4dp" android:scrollbarThumbVertical=“@color/…” android:scrollbars="vertical"
1⃣ εΫϩʔϧ AΠϯδέʔλʔΛදࣔ͢Δ
2⃣ MARGIN / PADDING ✤ ࠨӈͷmarginΛΕͳ͍
2⃣ MARGIN / PADDING ✤ ࠨӈ/্ԼpaddingΕͳ͍ʢಛʹΧελϜϏϡʔʣ
✤ padding͕ޮ͘Α͏ʹɺඞͣ minHeight/minWidthΛ͓͏ 3⃣ লུͱվߦ AαΠζΛݻఆ͠ͳ͍ Modifier.defaultMinSize(minHeight = …) android:layout_height="wrap_content"
android:minHeight=“@dimen/…”
✤ λοϓͯ͠ଓ͖͕ಡΊΔจষܥͳΒ🆗 ✤ ΞΫγϣϯΛى͜͢Ϙλϯܥ🆖 ❌ ✅ ✅ ✅ ELLIPSISͷ͍ํ 3⃣
লུͱվߦ
✤ Horizontal LinearLayoutɺ·ͨComposeͷRow ෯ͷweightͳͲΛࢦఆ͠Α͏ ROWܥཁҙ ӈͷཁૉ͕֎ԡ͞Εͯ͠·͏ ⬆︎ 3⃣ লུͱվߦ
✤ ςΩετೖྗܥग़དྷΔ͚ͩϚϧνϥΠϯՄೳʹ͢Δ ✦ ʢจࣈ੍ݶͷӨڹͰແཧ͔😥ʣ ✦ ʢώϯτͷ͞ʹ߹Θͤͯվߦ͞Εͳ͍͔😭ʣ 3⃣ লུͱվߦ AςΩετೖྗʹ͍ͭͯ
⚠ ANDROID STUDIOͷϓϨϏϡʔ ✤ ࣮ػͱൺͯ෯͕͗͢Δ
ݕূʹ͋Εແఢɿ Β͘Β͘εϚʔτϑΥϯ
·ͱΊ ✤ ϑϨʔϜϫʔΫΛ৴༻͗͢͠ͳ͍ ✤ ͻͨ͢ΒεΫϩʔϧΛೖΕΔ ✤ εΫϩʔϧͰ͖Δ͜ͱΛ໌֬ʹ͢Δ ✤ EllipsisΛਖ਼͘͠͏ ✤
Ͱ͖Δ͚ͩϚϧνϥΠϯՄೳʹ͢Δ
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠ @tahia910ɹ