Status Update
Comments
cl...@google.com <cl...@google.com>
po...@google.com <po...@google.com> #2
Branch: androidx-main
commit 9082f62682f853ad5251a1c79dde9eccba7abdd9
Author: Max Alfonso-Ying <maxying@google.com>
Date: Thu Apr 18 00:34:40 2024
[M2 text field] Apply background to decoration box
...instead of to the BasicTextField, so changing the
backgroundColor will properly change the decoration
box's background color.
Fixes:
Test: added unit tests
Relnote: "Fix backgroundColor not applying to
TextFieldDecorationBox and OutlinedTextFieldDecorationBox.
Decoration boxes now accept a `shape` parameter."
Change-Id: I371c26718597cb36ac537e9412ce476532afb40d
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/TextFieldDecorationBoxDemos.kt
M compose/material/material/src/androidInstrumentedTest/kotlin/androidx/compose/material/textfield/TextFieldDecorationBoxTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/OutlinedTextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextField.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldDefaults.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/TextFieldImpl.kt
ch...@google.com <ch...@google.com> #3
Yeah, I could use onPositioned
on the icon, then offset
but that feels like a lot of work :)
I'm not sure the current positioning is to spec:
po...@google.com <po...@google.com>
fa...@google.com <fa...@google.com> #4
Thanks, Mihai! I agree with Chris. In the use case in
A couple additional notes from
- In general, a dropdown menu is positioned relative to both the element that generates it and the edges of the screen or browser. It can open in different ways adapting to the space available--for example, with long menus to avoid scrolling, it may be positioned as it is in the attached screenshot.
- Specifically, however, the dropdown menu's default position per spec is still below the element that generates it.
Assigning back to Mihai. Lmk if you have any questions!
ap...@google.com <ap...@google.com> #5
Branch: androidx-master-dev
commit 75c7797014451a1cecf6afcf488b3519283cb6a9
Author: Mihai Popa <popam@google.com>
Date: Thu Dec 03 13:37:04 2020
Fix positioning of DropdownMenu
Relnote: The positioning behaviour of DropdownMenus was slightly changed according to the Material spec.
Fixes: 168594123
Test: MenuTest
Change-Id: I34c721d5c6a710161af31bf131c7751740fb966c
M compose/material/material/integration-tests/material-demos/src/main/java/androidx/compose/material/demos/MenuDemo.kt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/MenuTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Menu.kt
Description
See the attached screenshot. The toggle is the overflow icon button, and the menu is opened with it's right top edge == bottom left edge of the button.
Ideally I want the menu to overlap/cover the button (top right == top right), or at least have it's right edge in line with the right edge of the button.