0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

の続き

UIを微調整する

  • Surfaceコンポーザブルでラップ(内包)することにより、背景に色を設定できるようになる
  • Surfaceはレイアウトコンポーザブル(またはコンテナコンポーザブル)であり、UI要素(Textやボタン)を内包し、レイアウトやスタイルを適用する関数
  • MaterialTheme.colorSchemeはTheme.ktで指定されている、アプリケーション全体のカラーパレットを定義するオブジェクト
  • Surface内にあるコンポーザブルはSurfaceで設定した背景色の上に描画される
  • 自動的にテキストが白くなるが、これはandroidx.compose.material3.Surface などのマテリアル コンポーネントが自動的に変更している

修飾子(modifier)

  • ほとんどの Compose UI 要素は、省略可能な modifier パラメータを受け入れる
  • UI 要素に対して親レイアウト内での配置、表示、動作を指示する
  • パディング修飾子は Modifier.padding() で作成できる
  • さまざまな修飾子がある
    • 位置揃え
    • アニメーション化
    • 配置
    • 変換
    • クリック可能 / スクロール可能
    • Compose 修飾子のリストに詳細が記載されている
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?