Compose 从 View 系统迁移

From Views to Compose: Where can I start?

迁移基于 View 的现有应用

在团队中使用 Compose

已有一个使用 View 构建的现有应用?了解如何采用增量方式进行迁移。

1. Migration Strategy

2. Adopt Compose in new features

New Feature in a New Screen

New Feature in an Existing Screen

3. Create a module of common UI components

buttons, app bars, chips, and so on.

dialogs, cards, and so on.

4. Incrementally migrate existing features one screen at a time

Rely on UI testing to prevent regressions.

5. Fragments

Once all the contents are in Compose.

Remove Fragments and replace them with a corresponding screen level composable.

Use Navigation Compose to navigate and pass data between these screen-level composables.

相关推荐
四岁半儿1 小时前
常用css
前端·css
你的人类朋友2 小时前
说说git的变基
前端·git·后端
姑苏洛言2 小时前
网页作品惊艳亮相!这个浪浪山小妖怪网站太治愈了!
前端
字节逆旅2 小时前
nvm 安装pnpm的异常解决
前端·npm
GIS之路2 小时前
2025年 两院院士 增选有效候选人名单公布
前端
四岁半儿2 小时前
vue,H5车牌弹框定制键盘包括新能源车牌
前端·vue.js
烛阴3 小时前
告别繁琐的类型注解:TypeScript 类型推断完全指南
前端·javascript·typescript
gnip3 小时前
工程项目中.env 文件原理
前端·javascript
JefferyXZF3 小时前
Next.js Server Actions 详解: 无缝衔接前后端的革命性技术(八)
前端·全栈·next.js