Status Update
Comments
jo...@google.com <jo...@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
jo...@google.com <jo...@google.com> #3
After some discussions we have decided that including a Modifier is most likely not the correct approach here, however we are considering different API designs to make restricting the width possible, in addition to implementing a max-width by default.
ma...@google.com <ma...@google.com> #4 Restricted
ap...@google.com <ap...@google.com> #5
Branch: androidx-main
commit 9c998e555f3145c64cd7b092918dc39a80d4162d
Author: Jossi Wolf <jossiwolf@google.com>
Date: Mon Dec 05 17:41:56 2022
Restrict ModalBottomSheetLayout's sheet width to 640dp
This provides a better large screen experience in accordance to Material Design guidelines.
Test: modalBottomSheet_wideScreen_sheetRespectsMaxWidth, modalBottomSheet_narrowScreen_sheetRespectsMaxWidth
Relnote: A `ModalBottomSheetLayout`'s sheet now has a maximum width of 640 dp.
Bug:
Change-Id: I71a4f015f303a2d20c0e8bf5b54ded56533c9701
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/ModalBottomSheetTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
jo...@google.com <jo...@google.com> #6
This change will be included in the next release from now.
na...@google.com <na...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material:material:1.4.0-alpha04
se...@gmail.com <se...@gmail.com> #8
On non-compose view, you can override the max width by defining attributes (MaxModalBottomSheetWidth
value which is a private value of 640.dp?
ga...@gmail.com <ga...@gmail.com> #9
I am having the same problem. When the user uses landscape mode, the screen is not displayed normally due to the MaxModalBottomSheetWidth
value.
Hopefully, the next update will fix this issue.
se...@outlook.de <se...@outlook.de> #10
Please let us override the maximum width of the inner ModalBottomSheet, the scrim should go over the whole content.
Just like a dialogue.
jo...@google.com <jo...@google.com> #11
Hi, we currently do not have any work planned on this. Material is opinionated about the max width of the sheet, and Compose Material provides implementations of components adhering to Material specifications.
#9, #10, what you are describing sounds like a bug, please file a separate issue.
sh...@gmail.com <sh...@gmail.com> #12
Hi,
I understand the opinionated part. Please check my patch proposal (attached):
- Default stays the same
- Developers can customize the maximum width.
Seems like an easy change that would give a lot of devs a better option than forking the whole compose.
Description
Jetpack Compose version: 1.2.0-beta02 Jetpack Compose component used: androidx.compose.material.ModalBottomSheetLayout Android Studio Build: 2022.1.1 Kotlin version: 1.6.20
Steps to Reproduce or Code Sample to Reproduce:
This makes it not possible to meet the quality guidelines for large screen apps in T2-1 / LS-U2: