Status Update
Comments
ma...@google.com <ma...@google.com>
si...@google.com <si...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Louis Pullen-Freilich <
Link:
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
Expand for full commit details
Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling
These APIs allow overscroll to have events dispatched to it by one component, and rendered in a separate component.
Fixes: b/266550551
Fixes: b/204650733
Fixes: b/255554340
Fixes: b/229537244
Test: OverscrollTest
Relnote: "Adds OverscrollEffect#withoutDrawing and OverscrollEffect#withoutEventHandling APIs - these APIs create a wrapped instance of the provided overscroll effect that doesn't draw / handle events respectively, which allows for rendering overscroll in a separate component from the component that is dispatching events. For example, disabling drawing the overscroll inside a lazy list, and then drawing the overscroll separately on top / elsewhere."
Change-Id: Idbb3d91546b49c1987a041f959bce4b2b09a9f61
Files:
- M
compose/foundation/foundation/api/current.txt
- M
compose/foundation/foundation/api/restricted_current.txt
- M
compose/foundation/foundation/integration-tests/foundation-demos/src/main/java/androidx/compose/foundation/demos/OverscrollDemo.kt
- M
compose/foundation/foundation/samples/src/main/java/androidx/compose/foundation/samples/OverscrollSample.kt
- M
compose/foundation/foundation/src/androidInstrumentedTest/kotlin/androidx/compose/foundation/OverscrollTest.kt
- M
compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Overscroll.kt
Hash: f64e25b7a473c757d080521e7dd97b3f6670f60d
Date: Fri Nov 01 18:43:56 2024
no...@google.com <no...@google.com> #3
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.8.0-alpha06
androidx.compose.foundation:foundation-android:1.8.0-alpha06
androidx.compose.foundation:foundation-jvmstubs:1.8.0-alpha06
androidx.compose.foundation:foundation-linuxx64stubs:1.8.0-alpha06
so...@google.com <so...@google.com> #4
Nona, Siyamed,
I think what we need for FilledTextField is a bit different - here is the ticket
no...@google.com <no...@google.com> #5
I pushed back the CL since it was not clear the expected behavior. We need to define the behavior first, or even we may drop maxLines from TextField.
si...@google.com <si...@google.com>
si...@google.com <si...@google.com> #6
si...@google.com <si...@google.com> #7
I checked the resources Anastasia pointed.
The following are use cases from the material perspective:
- single line Textfield (scrolls horizontally)
- multi-line and growing TextField (grows as text does not fit)
- multi-line fixed height TextField (scrolls)
I want to add the following to this list:
- multi-line growing TextField until a height is reached
I checked CSS a bunch, however the amount of attributes related to line clamp behavior is a lot. Some related attrbutes are
- whitespace
- line-clamp
- max-lines
As far I understood input(type=text) is single line, and textarea is multi line in html
- text-area has rows and cols attribute where rows match to height in terms of lines
One of concerns I have (applies to Text(maxLines) as well) is providing the maximum0 height in terms of line height can be done using a modifier
- option a: by converting max lines or lines to from sp to dp
- option b: by providing a modifier that does it for API user.
If we were to assume that sp will be converted to dp, we will need to make sure that the line height can be identified before the composition.
Some nites: From the perspective of TextField:
- single line is an important configuration since we also have to inform IME about this
- we can provide a "lines" attribute/modifier with the semantics of the visual height will be that many lines
- I am not sure if "lines=1" would be singleLine semantics
- we can provide a "maxLines" attribute/modifier with the semantics of the visual height will be at most that many lines
so...@google.com <so...@google.com> #8
comment copied from
FYI scrolling behaviour WIP CL
Please let me know if you're adding the scrolling behaviour, or whether I should continue working on my CL. As I don't want us to do the duplicate work :)
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #9
Branch: androidx-master-dev
commit d13d11623ff9d16ae7fdfb97acbe59e18a0f22df
Author: Siyamed Sinir <siyamed@google.com>
Date: Wed Oct 14 21:21:47 2020
Add maxLines to CoreTextField
Defines the CoreTextField height in terms of maximum visible
lines. Even if the final Composable height is constrained with
maxLines, it does not clip the result and lets the modifiers to
clip to the boundaries.
Test: added tests
Test: ./gradlew compose:foundation:foundation-text:test
Test: ./gradlew compose:foundation:foundation-text:connectedAndroidTest
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:connectedAndroidTest
Test: ./gradlew compose:material:material:test
Test: ./gradlew compose:material:material:connectedAndroidTest
RelNote: “Added maxLines to CoreTextField”
Bug: 143687793
Change-Id: Ibee58be1331d36bfce70a0b14e83ffb5c0cfa3a2
M compose/foundation/foundation-text/api/current.txt
M compose/foundation/foundation-text/api/public_plus_experimental_current.txt
M compose/foundation/foundation-text/api/restricted_current.txt
A compose/foundation/foundation-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/compose/foundation/text/demos/ComposeInputFieldMinMaxLines.kt
M compose/foundation/foundation-text/integration-tests/ui-text-compose-demos/src/main/java/androidx/compose/foundation/text/demos/TextDemos.kt
A compose/foundation/foundation-text/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/CoreTextFieldMinMaxLineTest.kt
M compose/foundation/foundation-text/src/commonMain/kotlin/androidx/compose/foundation/text/CoreTextField.kt
M compose/foundation/foundation-text/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldDelegate.kt
Description