Status Update
Comments
xx...@gmail.com <xx...@gmail.com> #2
an...@elkroom.com <an...@elkroom.com> #3
Hi
Currently our focus is on correctness of the existing features and the API. I wouldn't expect this feature to be implemented in the next few months.
an...@google.com <an...@google.com>
an...@google.com <an...@google.com> #4
Branch: androidx-main
commit 1c6a17a061e7b4a70047224e8f31d3eecb66b5ef
Author: Qingqing Deng <qqd@google.com>
Date: Tue Jun 01 15:45:51 2021
Cursor Handle.
Bug:173016579
Test: ./gradlew test
Test: ./gradlew compose:foundation:foundation:connectedAndroidTest
Test: Manullay tested.
RelNote: Add Cursor Handle.
Change-Id: I07a8217c8ecbcd1c84c1a8df20c6e8b07d409148
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
A compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text/AndroidCursorHandle.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt
A compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/text/DesktopCursorHandle.desktop.kt
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManagerTest.kt
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit d47f1fe5b05eb9cc19c1b44dabbb4b0f34145817
Author: Haoyu Zhang <haoyuchang@google.com>
Date: Tue Jul 13 03:10:55 2021
Refactor selection handle
- Removed unnecessary parameters from SelectionHandle composable to avoid unnecessary recompose.
- Avoid using Path to draw selection handle for better performance.
- Reused the painting logic of selection handle in cursor handle.
Bug: 173016579
Test: ./gradlew test
Test: ./gradlew compose:foundation:foundation:connectedAndroidTest
Change-Id: I0a9f197913e78fd67289182b4704d69979f5b35a
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/SelectionHandlePopupPositionTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/SelectionHandlesTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/selection/TextSelectionColorsScreenshotTest.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text/AndroidCursorHandle.android.kt
M compose/foundation/foundation/src/androidMain/kotlin/androidx/compose/foundation/text/selection/AndroidSelectionHandles.android.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionContainer.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionHandles.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionManager.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/TextFieldSelectionManager.kt
M compose/foundation/foundation/src/desktopMain/kotlin/androidx/compose/foundation/text/selection/DesktopSelectionHandles.desktop.kt
na...@google.com <na...@google.com> #6
Branch: androidx-main
commit 3d5628e3d8ba223533646945e5e55b3c43f514e7
Author: Haoyu Zhang <haoyuchang@google.com>
Date: Thu Jul 15 16:23:04 2021
Hide cursor when input is from physical keyboard
Also simplified the logic to hide cursor when text get changed from
software keyboard.
Bug: 173016579
Test: ./gradlew test
Change-Id: Ibe242728c8aec7cccdfc29ac137dceb0f587bc14
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldKeyInput.kt
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?