Open Elaws opened 9 months ago
I didn't find another issue describing the same error. But I found out that there are 2 version of the code one with branches named starter, material and main, and others where they have the _e2e
suffix, meaning edge to edge.
Reviewing both versions of the code, I found out that edge to edge version has the following line:
WindowCompat.setDecorFitsSystemWindows(window, false)
which can be found in the setUpEdgeToEdge
function. And the description of the setDecorFitsSystemWindows
method says:
If set to false, the framework will not fit the content view to the insets and will just pass through the WindowInsetsCompat to the content view.
You can either remove that line or set the second argument as true
. I will just set it at true
.
But as I said, the branch that do not have the edge to edge config, is the one that they linked at the end of the pathway.
URL of codelab
Codelab link
In which task and step of the codelab can this issue be found?
Task 4. "Add color". Step "Add color palette to theme".
Describe the problem
When replacing
color.kt
andtheme.kt
by the requested ones, the app collides with status bar.theme.kt
given in starter code is completely different from the one given in solution code.These kind of errors make the learning experience a bit difficult, it would be nice to review them a bit.
Versions Android Studio version: Iguana 2023.2.1 API version of the emulator: API 34
Additional information