[AdvancedStateAndSideEffectsCodelab] injected Modifier in CraneTabBar not used
@dturner 已经在做这个了。
开始于 2025年10月27日。
评估
这个 Issue 还没有评估数据。
描述
You are injecting modifier - Row(modifier), and then you call Modifier.width(8.dp), Modifier.padding(8.dp) etc... instead of modifier.width(8.dp), modifier.padding(8.dp) etc.
Is it a typo, or it was intentional? If so, what's the benefit and why injecting Modifier at all (in this case)?
@Composable
fun CraneTabBar(
modifier: Modifier = Modifier,
onMenuClicked: () -> Unit,
children: @Composable (Modifier) -> Unit
) {
Row(modifier) {
// Separate Row as the children shouldn't have the padding
Row(Modifier.padding(top = 8.dp)) {
Image(
modifier = Modifier
.padding(top = 8.dp)
.clickable(onClick = onMenuClicked),
painter = painterResource(id = R.drawable.ic_menu),
contentDescription = stringResource(id = R.string.cd_menu)
)
Spacer(Modifier.width(8.dp))
Image(
painter = painterResource(id = R.drawable.ic_crane_logo),
contentDescription = null
)
}
children(
Modifier
.weight(1f)
.align(Alignment.CenterVertically)
)
}
}
- 主要语言
- Kotlin
- 星标
- 1.7k
- 派生
- 796
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
android/codelab-android-compose 的其他 Issue
-
Layout Inspector url broken可能重新可做 @MagicalMeghan 于 395 天前认领,目前没有进行中的 PR。 未关闭
android/codelab-android-compose#548 · 3 条评论 · 已指派 1 人 ·
-
Color.kt package name needs update可能重新可做 @MagicalMeghan 于 551 天前认领,目前没有进行中的 PR。 未关闭
android/codelab-android-compose#534 · 1 条评论 · 已指派 1 人 ·
-
Build issue with AdvancedStateAndSideEffectsCodelab in Android Studio Ladybug | 2024.2.1 Patch 2可能重新可做 @MagicalMeghan 于 693 天前认领,目前没有进行中的 PR。 未关闭
android/codelab-android-compose#514 · 1 条评论 · 2 个 reaction · 已指派 1 人 ·
-
Selected item in the list has the same color可能重新可做 @alexvanyo 于 395 天前认领,目前没有进行中的 PR。 未关闭
android/codelab-android-compose#505 · 1 条评论 · 已指派 1 人 ·
-
Material Theme Builder has been updated which does not match the Codelab: Theming in Compose with Material 3可能重新可做 @dturner 于 745 天前认领,目前没有进行中的 PR。 未关闭
android/codelab-android-compose#501 · 1 个 reaction · 已指派 1 人 ·
查看 android/codelab-android-compose 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 62/100
MetrolistGroup/Metrolist#5426 · 1 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
🐛 Type:Bug 📥 State:Awaiting Assignment 🚨 Priority: P0 - Critical
难度 2/5 1-3 小时 新手友好度 78/100
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 76/100
micronizationlab/glafira-ai-hub#785 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
sorsama/deepseek-harness-mobile#154 ·
维护者通常 1 天内回复
-
0. Needs triage enhancement
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复