Status Update
Comments
sg...@google.com <sg...@google.com>
gk...@ramp.com <gk...@ramp.com> #4
The release notes documentation has been edited to clarify this change in behavior for line height.
To support non-standard text sizes, we encourage users to follow the Material design system and use a different style = LocalTextStyle.current.copy(lineHeight = TextUnit.Unspecified)
, or create a custom Typography
entirely.
ap...@google.com <ap...@google.com> #5
sg...@google.com <sg...@google.com> #6
In my case, I have multiple font sizes in the same Text
(using SpanStyle
in AnnotatedString
). There are legitimate reasons for this. For example, when combining Chinese and English (phonetic) together (for language-learning purposes).
gk...@ramp.com <gk...@ramp.com> #7
Thanks so much for fixing! I wasn't aware that DateRangePicker was intended to be used in a full screen, as it doesn't included confirm / cancel buttons by default it made sense to me to wrap it in a DatePickerDialog which does provide those. Appreciate your help here!
na...@google.com <na...@google.com> #8
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.3.0-alpha02
androidx.compose.material3:material3-android:1.3.0-alpha02
androidx.compose.material3:material3-desktop:1.3.0-alpha02
Description
Jetpack Compose component used: DateRangePicker
Android Studio Build: Android Studio Build: Android Studio Hedgehog | 2023.1.1
Build #AI-231.9392.1.2311.11076708, built on November 9, 2023
Kotlin version: 1.7.20
Material3 version: androidx.compose.material3:material3:1.2.0
If you put a DateRangePicker within a DatePickerDialog, the Confirm button seems to be hidden by default, I think being overlapped / pushed off by the DateRangePicker content. Manually adding a Modifier.weight(1f) to the DateRangePicker seems to fix this. Probably this Modifier should be included by default within the SDK to avoid this problem.
Sample Code:
```
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
ComposeTestV2Theme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
DatePickerTest()
}
}
}
}
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun DatePickerTest() {
val state = rememberDateRangePickerState()
Column {
DatePickerDialog(
onDismissRequest = {},
confirmButton = {
TextButton(onClick = { Log.d("DatePicker", "Confirm button clicked") }) {
Text("Confirm")
}
},
) {
DateRangePicker(
// modifier = Modifier.weight(1f),
state = state,
)
}
}
}
```