Skip to content

Conversation

@05Huang
Copy link

@05Huang 05Huang commented Oct 28, 2025

Summary

This PR improves the UI design and simplifies layout handling in MainActivity.kt.

Changes

  1. Added rounded corners and elevation to Card for a more modern Material3 appearance.
  2. Simplified WindowInsets padding by directly applying WindowInsets.safeDrawing.asPaddingValues(), which automatically respects layout direction.

Benefits

  • Cleaner and more idiomatic Compose code.
  • Better visual design following Material 3 guidelines.
  • Easier to read and maintain.

Tested on Pixel 7 emulator, Compose 1.7.0.

概括

此 PR 改进了 UI 设计并简化了“MainActivity.kt”中的布局处理。

变化

  1. 为“Card”添加圆角和立面,以获得更现代的 Material3 外观。
  2. 通过直接应用“WindowInsets.safeDrawing.asPaddingValues()”来简化“WindowInsets”填充,它会自动遵循布局方向。

好处

  • 更干净、更惯用的 Compose 代码。
  • 遵循 Material 3 指南更好的视觉设计。
  • 更易于阅读和维护。

在 Pixel 7 模拟器 Compose 1.7.0 上测试。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant