Status Update
Comments
xx...@gmail.com <xx...@gmail.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
an...@elkroom.com <an...@elkroom.com> #3
an...@google.com <an...@google.com>
an...@google.com <an...@google.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit b79eaa2f9c0171e192dd14a8e958a3b0a1920d04
Author: Andrei Shikov <ashikov@google.com>
Date: Tue Mar 21 23:29:25 2023
Support arrangement for LazyGrid cells
Update grid measure logic to support custom arrangements of columns in vertical grid or rows in horizontal one.
Test: LazyGrid tests
Fixes: 235121277
Fixes: 267942510
Relnote: """Added support for fixed size cells in LazyGrid and arranging them with cross axis arrangement."""
Change-Id: I83ed9c6fa41d500ab049726b85373fade65a7ccc
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/ListDemos.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/grid/LazyArrangementsTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/lazy/grid/LazyGridTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGrid.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridDsl.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridMeasuredLine.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/grid/LazyGridMeasuredLineProvider.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/lazy/staggeredgrid/LazyStaggeredGridCells.kt
na...@google.com <na...@google.com> #6
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.5.0-alpha02
da...@gmail.com <da...@gmail.com> #7
as...@google.com <as...@google.com> #8
Arrangement.SpaceBetween
is supported and should work as expected.
Make sure to use GridCells.FixedSize
to allow space for arrangement. Other types of GridCells
take all available space by default, which might cause it to appear differently.
mu...@gmail.com <mu...@gmail.com> #9
This doesn't solve the OP.
I need Fixed
with Arrangement.SpaceBetween
. Currently it just stretches Fixed.count
amount without adding SpaceBetween.
as...@google.com <as...@google.com> #10
Fixed
is always stretched to fill all available space (and fills in spacing from arrangement in between). You want to use FixedSize
to ensure there's some space left instead.
le...@gmail.com <le...@gmail.com> #11
@Composable
fun SimpleGrid() {
LazyVerticalGrid(
columns = GridCells.FixedSize(200.dp),
horizontalArrangement = Arrangement.SpaceBetween
) {
items(items = (1..10).toList(), span = {index -> if(index==5) {GridItemSpan(maxLineSpan)} else {GridItemSpan(1)}}) {
Button(onClick = {}, Modifier.wrapContentWidth()) {
Text(text = "$it")
}
}
}
}
an...@google.com <an...@google.com> #12
Can you please share the screenshot of what you are getting with this code and explain what behavior do you expect instead? Thanks
Description
Jetpack Compose version: 1.2.0-beta02
Jetpack Compose component used: LazyVerticalGrid
Android Studio Build: Android Studio Dolphin | 2021.3.1 Beta 2
Kotlin version: 1.6.21
Steps to Reproduce or Code Sample to Reproduce:
I expect grid items are arranged by horizontalArrangement property. However, these items are always arranged like
SpaceAround
.This may be caused by
Density.arrange
inArrangement.Horizontal
doesn't called bycalculateItemsOffsets
inLazyGridMeasure.kt
when VerticalGrid.Is anything update planned?