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
Shibuya.apk#46 余白の作り方
Search
みやゆ星
January 19, 2024
Programming
400
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Shibuya.apk#46 余白の作り方
みやゆ星
January 19, 2024
More Decks by みやゆ星
See All by みやゆ星
一時的なスライド
yuchan2215
0
30
AI Agentを利用したAndroid開発について
yuchan2215
0
830
Other Decks in Programming
See All in Programming
エンジニアにデザインハーネスを 〜デザインプロセスを規定するためのハーネス〜 / Design harness from an engineer's perspective
rkaga
2
1.8k
php-fpmのプロセスが枯渇した日-調査・対処・そして本当にやるべきだったこと-
shibuchaaaan
0
160
AI時代、エンジニアはどう育つのか -未経験エンジニアの成長を間近で見て考えたこと-
thasu0123
0
190
Lean は証明の正しさを確認するためだけのツールって思ってませんか?
inoueasei
1
120
改善しないと、タスクが回らない。 “てんこ盛りポジション” を引き継いだ情シスの、入社3ヶ月の業務改善録
krm963
0
210
霧の中の代数的エフェクト
funnyycat
1
440
Terraform標準の組織で AWS CDKをどう使うか
mu7889yoon
1
400
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
270
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
150
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
430
【やさしく解説 設計編 #1】「ドメイン駆動」と「実装駆動」ってなに? 〜設計の考え方を、たとえ話で学ぼう〜
panda728
PRO
1
140
ソフトウェア設計に溶けるインフラ ― AWS CDK のインフラ認識論
konokenj
3
680
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
180
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
240
Git: the NoSQL Database
bkeepers
PRO
432
67k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Designing Experiences People Love
moore
143
24k
Raft: Consensus for Rubyists
vanstee
141
7.6k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Building Applications with DynamoDB
mza
96
7.1k
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
390
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
400
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.3k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
670
Transcript
Shibuya.apk#46 みやゆ星 余白の 作り方
Modifier Padding Layout WindowInsetsPadding Arrangement.spacedBy Spacer Constraint Layout 余白の つくりかた
一番ベーシックなモディファイア (主観) 周りに空間をあける NowInAndroid: 58回出現 Padding
そのまんま。スペーサー。 NowInAndroid: 17回出現 Spacer
Android Viewでは多用 要素と要素の間の依存関係を 細かく設定できる 美しいコードが書けない印象 なので、あまり使われていない? NowInAndroid: 0回出現 Constraint Layout
カスタムレイアウトの作成 (位置・サイズを細かく指定できる) NowInAndroid: 1回出現 Layout
Now In Android 使用例(おまけ)
ColumnやRowで要素間の間隔をあける。 NowInAndroid: 16回出現 Arrangement. spacedBy
WindowInsets システムバーなどのウィンドウインセットに応じてパディングを適用するもの 引用:https://developer.android.com/jetpack/compose/layouts/insets?hl=ja →なのでちょっと特殊
WindowInsets 項目 説明 statusBars(IgnoringVisibility) ステータスバーのインセット(通知アイコンなどを含む上部のシステムUIバー) navigationBars(IgnoringVisibility) ナビゲーションバーのインセット(デバイスの左右下部のシステムUIバー) captionBar(IgnoringVisibility) キャプションバー(フリーフォームウィンドウのトップタイトルバーなど)のインセット systemBars(IgnoringVisibility)
全てのシステムバー(ステータスバー、ナビゲーションバー、キャプションバー)の合計インセット ime ソフトウェアキーボードが占有する下部スペースのインセット imeAnimationSource キーボードアニメーション前のソフトウェアキーボードの占有スペースのインセット imeAnimationTarget キーボードアニメーション後のソフトウェアキーボードの占有スペースのインセット tappableElement(IgnoringVisibility) タップ可能なナビゲーションUI要素のインセット systemGestures システムジェスチャーのインターセプト範囲のインセット mandatorySystemGestures 常にシステムが処理する必須のシステムジェスチャーのインセット displayCutout ディスプレイのカットアウト(ノッチやピンホール)を避けるためのインセット waterfall ウォーターフォールディスプレイの曲線領域を表すインセット https://developer.android.com/jetpack/compose/layouts/insets?hl=ja
消費できる Modifier#windowInsetsPadding 消費できた分の間隔をあける Modifier#consumeWindowInsets 消費のみ
🤔
None
要素 使用シナリオ Modifier #padding ボタンやテキストなどのコンポーネントに余白を設定する場合に使用 Spacer 水平または垂直なレイアウト内でコンポーネント間に 特定の空白を作成したい場合などに使用 Arrangement #spacedBy
同一方向上に並べられた複数のコンポーネント間に均等な間隔を設定する場合に使用 Modifier #windowInsets ステータスバーなどのシステムUIとの間に余白を設定する必要がある場合に使用 Constraint Layout 複数のコンポーネントを相対的に配置する必要がある場合や、 複雑なレイアウトを作成する場合に使用 Modifier#layout 標準的なレイアウトオプションで要件を満たせない場合に、 カスタムレイアウトを定義するために使用
Thank You ご清聴ありがとうございました!! @yuu1111main