Commit 05eb3e1
authored
Fix DatePickerDialog confirmButton and dismissButton inconsistent position for platforms by impl of skiko (#3048)
Fix DatePickerDialog confirmButton and dismissButton at inconsistent
position in skiko implementation (on iOS, JVM desktop, JS and Wasm)
Following the upsteam androidx/androidx's fix for Android
androidx@5e5fbcc
Fixes
https://youtrack.jetbrains.com/issue/CMP-10091/iOS-Material3-dialogs-render-confirmButton-and-dismissButton-in-inconsistent-positions
## Testing
### Code snippits
```xml
<string name="common_action_ok">OK</string>
<string name="common_action_cancel">Cancel</string>
```
```kotlin
DatePickerDialog(
onDismissRequest = { /* close */ },
confirmButton = {
TextButton(onClick = { /* close */ }) {
Text(stringResource(Res.string.common_action_ok))
}
},
dismissButton = {
TextButton(onClick = { /* close */ }) {
Text(stringResource(Res.string.common_action_cancel))
}
}
) {
DatePicker(
state = datePickerState
)
}
```
### Steps
1. Made the modifications and published to mavenLocal
2. Change the project depends on this libs to refer version
9999.0.0-SNAPSHOT
3. Build and run project supported by skiko (iOS, JVM on macOS,
Kotlin/JS and Kotlin/wasm)
4. Confirm the confirmButton and dismissButton in DatePickerDialog on
these targets align to the Android (under LTR language, dismissButton at
left, confirmButton at right )
## Release Notes
### Fixes - Multiple Platforms
- Fix `DatePickerDialog`'s `confirmButton` and `dismissButton` display
order on iOS, Desktop, Kotlin/JS and Kotlin/Wasm not consistent with
Material Design guidance1 parent 37bd636 commit 05eb3e1
1 file changed
Lines changed: 1 addition & 1 deletion
File tree
- compose/material3/material3/src/skikoMain/kotlin/androidx/compose/material3
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | 107 | | |
| 108 | + | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| |||
0 commit comments