[AdvancedStateAndSideEffectsCodelab] injected Modifier in CraneTabBar not used
@dturner is already working on this.
Since Oct 27, 2025.
Assessment
This issue has not been assessed yet.
Description
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)
)
}
}
- Dominant language
- Kotlin
- Stars
- 1.7k
- Forks
- 796
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/codelab-android-compose
-
Layout Inspector url brokenMay be free again @MagicalMeghan claimed this 395 days ago, and no pull request is open. Open
android/codelab-android-compose#548 · 3 comments · 1 assignee ·
-
Color.kt package name needs updateMay be free again @MagicalMeghan claimed this 551 days ago, and no pull request is open. Open
android/codelab-android-compose#534 · 1 comment · 1 assignee ·
-
Build issue with AdvancedStateAndSideEffectsCodelab in Android Studio Ladybug | 2024.2.1 Patch 2May be free again @MagicalMeghan claimed this 693 days ago, and no pull request is open. Open
android/codelab-android-compose#514 · 1 comment · 2 reactions · 1 assignee ·
-
Selected item in the list has the same colorMay be free again @alexvanyo claimed this 395 days ago, and no pull request is open. Open
android/codelab-android-compose#505 · 1 comment · 1 assignee ·
-
Material Theme Builder has been updated which does not match the Codelab: Theming in Compose with Material 3May be free again @dturner claimed this 745 days ago, and no pull request is open. Open
android/codelab-android-compose#501 · 1 reaction · 1 assignee ·
All issues in android/codelab-android-compose
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
MetrolistGroup/Metrolist#5426 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
🐛 Type:Bug 📥 State:Awaiting Assignment 🚨 Priority: P0 - Critical
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
micronizationlab/glafira-ai-hub#785 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sorsama/deepseek-harness-mobile#154 ·
Maintainers usually reply within 1 day
-
0. Needs triage enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day