Fixed
Status Update
Comments
si...@google.com <si...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
so...@google.com <so...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
si...@google.com <si...@google.com> #4
deleted
so...@google.com <so...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit a736e803e286bc3326300d68a8af7daaaab2aa76
Author: Siyamed Sinir <siyamed@google.com>
Date: Fri Apr 02 07:31:08 2021
Prevent TextField.onValueChange to fire if no change
- Added TextFieldValue overload to compare previous and
new value
- Replaced string version calling into TextFieldValue
version in order to
a) prevent double string comparison
b) (minor) extra function call
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
Bug: 178510628
Change-Id: I961ed03d8d6b7e956e8c87e0cb3539890650c00a
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicTextField.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/TextFieldValue.kt
https://android-review.googlesource.com/1662698
Branch: androidx-main
commit a736e803e286bc3326300d68a8af7daaaab2aa76
Author: Siyamed Sinir <siyamed@google.com>
Date: Fri Apr 02 07:31:08 2021
Prevent TextField.onValueChange to fire if no change
- Added TextFieldValue overload to compare previous and
new value
- Replaced string version calling into TextFieldValue
version in order to
a) prevent double string comparison
b) (minor) extra function call
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
Bug: 178510628
Change-Id: I961ed03d8d6b7e956e8c87e0cb3539890650c00a
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicTextField.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/TextFieldValue.kt
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit 158980e5a32ea39d9d4ef50e69de059023b92456
Author: Siyamed Sinir <siyamed@google.com>
Date: Fri Apr 02 07:37:10 2021
Add tests for BasicTextField.onValueChange
Added tests to check when
- no change occurs in text, String overload does not
call onValueChange
- no change occurs in value, TextFieldValue overload
does not call onValueChange
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
RelNote: Added experimental performanTextInputSelection API
Bug: 178510628
Change-Id: I2dcbbbc0178b62c7a290a7e170e00b26b74d7237
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
M compose/ui/ui-test/api/public_plus_experimental_1.0.0-beta05.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/TextActions.kt
https://android-review.googlesource.com/1663121
Branch: androidx-main
commit 158980e5a32ea39d9d4ef50e69de059023b92456
Author: Siyamed Sinir <siyamed@google.com>
Date: Fri Apr 02 07:37:10 2021
Add tests for BasicTextField.onValueChange
Added tests to check when
- no change occurs in text, String overload does not
call onValueChange
- no change occurs in value, TextFieldValue overload
does not call onValueChange
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
RelNote: Added experimental performanTextInputSelection API
Bug: 178510628
Change-Id: I2dcbbbc0178b62c7a290a7e170e00b26b74d7237
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
M compose/ui/ui-test/api/public_plus_experimental_1.0.0-beta05.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/TextActions.kt
tj...@fieldwire.com <tj...@fieldwire.com> #9
Hi, look like a part of this bug still remains. When the CoreTextField
composable is disposed, onBlur
gets called inside TextFieldDelegate
. A copy of TextFieldValue object is created there editProcessor.toTextFieldValue().copy(composition = null)
When this happens onValueChanged will always get called since it will fail the if check
if (value != it) {
onValueChange(it)
}
I am seeing this on foundation:1.5.0-alpha01. Please fix thanks!
hr...@gmail.com <hr...@gmail.com> #10
The status is shown as 'Fixed'. I wonder if it is being looked into. If so, please help us tracking it.
I am facing issue where recomposition happens and the state is reset due to onValueChange() that is causing unnecessary and wrongful recomposition.
I am facing issue where recomposition happens and the state is reset due to onValueChange() that is causing unnecessary and wrongful recomposition.
Description
Click on TextField, lose focus and click again or put app in background and reopen, these focus changes calls the
onValueChange
callback of TextField even with no actual text changes. This is unexpected behaviour andonValueChange
callback should only be called when there's any actual change in the text.