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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
みやゆ星
January 19, 2024
Programming
390
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
28
AI Agentを利用したAndroid開発について
yuchan2215
0
820
Other Decks in Programming
See All in Programming
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
6
1.4k
Claspは野良GASの夢をみるか
takter00
0
200
ECSアプリログをFireLensでコスト削減しようとしたけど諦めた話 in Fargate×Node.js
akihisaikeda
2
4.2k
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
200
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
160
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
7k
JJUG CCC 2026 Spring: JSpecify で実現する Kotlin フレンドリーな Java API 設計
ternbusty
1
180
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
580
New "Type" system on PicoRuby
pocke
1
980
決定論的オーケストレーションの設計と実装 / Design and Implementation of Deterministic Orchestration
nrslib
4
1.4k
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.3k
ローカルLLMでどこまでコードが書けるか -拡張版 / How much code can be written on a local LLM Extended
kishida
11
4.3k
Featured
See All Featured
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.7k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Test your architecture with Archunit
thirion
1
2.3k
Chasing Engaging Ingredients in Design
codingconduct
0
220
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Docker and Python
trallard
47
3.9k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
160
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
140
Odyssey Design
rkendrick25
PRO
2
700
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
210
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