Носить композицию
Последнее обновление | Стабильный выпуск | Кандидат на выпуск | Бета-версия | Альфа-релиз |
---|---|---|---|---|
13 ноября 2024 г. | 1.4.0 | - | - | 1.5.0-альфа06 |
Объявление зависимостей
Чтобы добавить зависимость от Wear, вам необходимо добавить в свой проект репозиторий Google Maven. Для получения дополнительной информации прочтите репозиторий Google Maven .
Добавьте зависимости для нужных вам артефактов в файл build.gradle
для вашего приложения или модуля:
классный
dependencies { implementation "androidx.wear.compose:compose-foundation:1.4.0" // For Wear Material Design UX guidelines and specifications implementation "androidx.wear.compose:compose-material:1.4.0" // For integration between Wear Compose and Androidx Navigation libraries implementation "androidx.wear.compose:compose-navigation:1.4.0" // For Wear preview annotations implementation("androidx.wear.compose:compose-ui-tooling:1.4.0") // NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material. // androidx.wear.compose:compose-material is designed as a replacement // not an addition to androidx.compose.material:material. // If there are features from that you feel are missing from // androidx.wear.compose:compose-material please raise a bug to let us know. }
Котлин
dependencies { implementation("androidx.wear.compose:compose-foundation:1.4.0") // For Wear Material Design UX guidelines and specifications implementation("androidx.wear.compose:compose-material:1.4.0") // For integration between Wear Compose and Androidx Navigation libraries implementation("androidx.wear.compose:compose-navigation:1.4.0") // For Wear preview annotations implementation("androidx.wear.compose:compose-ui-tooling:1.4.0") // NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material. // androidx.wear.compose:compose-material is designed as a replacement // not an addition to androidx.compose.material:material. // If there are features from that you feel are missing from // androidx.wear.compose:compose-material please raise a bug to let us know. }
Дополнительные сведения о зависимостях см. в разделе Добавление зависимостей сборки .
Обратная связь
Ваши отзывы помогают сделать Jetpack лучше. Дайте нам знать, если вы обнаружите новые проблемы или у вас есть идеи по улучшению этой библиотеки. Пожалуйста, ознакомьтесь с существующими проблемами в этой библиотеке, прежде чем создавать новую. Вы можете добавить свой голос к существующей проблеме, нажав кнопку со звездочкой.
Дополнительную информацию см . в документации по системе отслеживания проблем .
Wear Compose Material3 Версия 1.0
Версия 1.0.0-альфа29
13 ноября 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha29
. Версия 1.0.0-alpha29 содержит эти коммиты .
Изменения API
- Мы обновили
TimeText
, чтобы предоставить содержимое по умолчанию, показывающее время. ( Id23b3 ) - Мы упростили
ScrollInfoProvider
дляPagerState
, удалив параметрorientation
, который больше не нужен. Новое поведение заключается в том, чтоTimeText
остается на месте как для горизонтального, так и для вертикального листания. ( I71767 ) -
LocalHapticFeedback
теперь предоставляет реализациюHapticFeedback
по умолчанию, когда API-интерфейс Vibrator указывает, что тактильные ощущения поддерживаются. ВHapticFeedbackType
были добавлены следующие параметры:Confirm
,ContextClick
,GestureEnd
,GestureThresholdActivate
,Reject
,SegmentFrequentTick
,SegmentTick
,ToggleOn
,ToggleOff
,VirtualKey
. Компоненты Wear Compose, активируемые при длительном нажатии, такие какButton
,IconButton
,TextButton
иCard
теперь выполняют тактильный эффектLONG_PRESS
, когда предоставлен обработчик длительного щелчка. ( I5083d )
Исправления ошибок
- Мы обновили предложение о подтверждениях. ( I04bff )
- Мы обновили минимальную зависимость API до 1.7.4 для библиотек Compose. ( I88b46 )
- Для диалога
OpenOnPhone
было добавлено новое движение. ( I1e10a ) - Мы исправили ошибку в
LevelIndicator
, и теперь он корректно отображается с нулевым уровнем. ( Ie95a4 ) - Мы обновили анимации
HorizontalPageIndicator
иVerticalPageIndicator
. ( I5c8f3 ) - Мы добавили анимацию сжатия в точку к неопределенному
ArcProgressIndicator
. ( I9fd51 )
Версия 1.0.0-альфа28
30 октября 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha28
. Версия 1.0.0-alpha28 содержит эти коммиты .
Изменения API
- Мы добавили вариант дуги неопределенного кругового индикатора прогресса ( I2efc1 ).
- Мы опубликовали составные элементы
AlertDialogContent
иDialog
, составляющие APIAlertDialog
, чтобы при необходимости можно было добавить настройку (например, настройку анимацииAlertDialog
сохраняя при этом рекомендуемый макет содержимого). Кроме того, мы добавили параметрыModifier
иColor
к членамEdgeButton
,ConfirmButton
иDismissButton
изAlertDialogDefaults
. ( I4eb71 ) - Мы обновили API-интерфейс
Placeholder
следующим образом: переименовалиPlaceholderState.startPlaceholderAnimation
вPlaceholderState.animatePlaceholder
,PlaceholderState.isShowContent
вPlaceholderState.isHidden
иPlaceholderDefaults.shape
вPlaceholderDefaults.Shape
; переименовал параметрpainter
вpainterWithPlaceholderOverlayBackgroundBrush
вoriginalPainter
; изменил видимостьPlaceholderState.placeholderProgression
с публичного на внутренний и переименовал его вplaceholderShimmerProgression
; добавлены константы продолжительности анимации заполнителя вPlaceholderDefaults
. ( Ie5a59 ) - Мы обновили API
EdgeButton
следующим образом: переименовали параметр вScreenScaffold
сbottomButton
наedgeButton
; сделалEdgeButtonSize
классом значений. ( Ииф15 ) - Мы изменили видимость
copy()
на public в классах Wear Material3 Colors ( I0287f ).
Исправления ошибок
- Добавлена минимальная продолжительность анимации для
IconToggleButton
иTextToggleButton
при нажатии ( Ieb333 ). - Добавлена минимальная продолжительность анимации фигур
IconButton
иTextButton
( Iebcee ). - Исправлено состояние опции повтора
DatePicker
. ( I3587c ) - Добавлено движение для диалогов оповещения и подтверждения. ( I173b1 )
Версия 1.0.0-альфа27
16 октября 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha27
. Версия 1.0.0-alpha27 содержит эти коммиты .
Изменения API
- Мы обновили
ScreenScaffold
иScrollIndicator
после переименования Wear Compose FoundationLazyColumn
вTransformingLazyColumn
. ( I0608b ) - Параметр
preferredHeight
EdgeButton
был переименован вbuttonSize
, и его значение можно выбрать только из четырех констант в недавно представленном классе значенийEdgeButtonSize
. ( Icdd70 ) - Мы изменили название
ListSubheader
наListSubHeader
и добавили общедоступные значения по умолчанию дляListHeader
иListSubHeader
. ( I96730 ) - Мы добавили новые компоненты
HorizontalPagerScaffold
иVerticalPagerScaffold
для Wear, которые обеспечивают новую анимацию и координацию между текстом времени и компонентами индикатора страницы. ( Iff7d0 ) - Мы добавили поддержку поворота в
HorizontalPagerScaffold
иVerticalPagerScaffold
, что позволяет пользователям перемещаться по пейджерам с помощью поворотных устройств ввода. ( I9770d ) - Мы внесли изменения в API
MotionScheme
, чтобы упростить использование и повысить согласованность. Удалены встроенные функции запоминания и перемещены встроенные схемы движения в специальный сопутствующий объект MotionScheme.standardMotionScheme
иexpressiveMotionScheme
переименованы в стандартные и выразительные. ( I5fd45 ) - Мы добавили поддержку динамической цветовой схемы на основе системных цветов. ( I073e9 )
- Мы обновили Stepper до последних спецификаций UX. ( I622bb )
Исправления ошибок
- Мы обновили типографику и отступы для компонентов карты. ( I3ae48 )
- Мы изменили отступы в
AlertDialog
между кнопками «Подтвердить/Отклонить» и остальным содержимым с 8dp на 12dp в соответствии со спецификациями UX ( Ie55f0 ). - Мы обновили непрозрачность цвета для компонента «Ползунок». ( Идб383 )
Версия 1.0.0-альфа26
2 октября 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha26
. Версия 1.0.0-alpha26 содержит эти коммиты .
Изменения API
- Мы обновили API и внешний вид
HorizontalPageIndicator
и добавилиVerticalPageIndicator
для использования сVerticalPager
( Ic9309 ). -
AlertDialog
теперь поддерживает возможность исключить нижнюю кнопку по умолчанию из варианта стека кнопок для пользовательских макетов, в которых EdgeButton не требуется. ( I34fa9 ) - Мы добавили компонент
SwipeToReveal
для Wear Material 3 ( Ic38b2 ). - Мы добавили поддержку двунаправленного пролистывания в
SwipeToReveal
для редких случаев, когда текущий экран не поддерживает пролистывание для закрытия. По умолчанию по-прежнему используется смахивание для открытия только при пролистывании справа налево, и настоятельно рекомендуется соблюдать поведение по умолчанию, чтобы избежать конфликта с пролистыванием для закрытия. ( Ифак04 ) - Мы переименовали параметр
buttonHeight
EdgeButton
вpreferredHeight
. ( I4fab3 ) - Версия Kotlin обновлена до 1.9 ( I1a14c ).
- Мы переименовали
OpenOnPhoneDialogDefaults.Icon
вOpenOnPhoneDialogDefaults.OpenOnPhoneIcon
, чтобы избежать конфликта сIcon
( I0f391 ). - Мы добавили поддержку
ScrollIndicator
вLazyColumn
. ( Я546а ) - Мы обновили значения по умолчанию для
TextToggleButton
иIconToggleButton
. ( I7aaa9 ) - Мы упростили API
Picker
иPickerGroup
. ( Ид0653 ) - Мы добавили
CardDefaults.Shape
иCardDefaults.Height
, которые (будучи токенами) в противном случае были частными для разработчиков, использующих библиотеку. ( I1594a , б/347649765 ) - Мы переименовали параметр прогресса для двоичного сегментированного кругового индикатора прогресса в
segmentValue
. ( Ib72d9 ) - Мы обновили цвета и макет слайдера. ( Ic3eec )
Исправления ошибок
- Мы обновили анимацию значка
openOnPhone
( I66f85 ). - Теперь мы используем значки символов Google в
Slider
,TimePicker
иDatePicker
. ( I46c7c ) - Мы обновили отступы в
Confirmation
иOpenOnPhoneDialog
. ( Iaa82e )
Версия 1.0.0-альфа25
18 сентября 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha25
. Версия 1.0.0-alpha25 содержит эти коммиты .
Изменения API
- Мы добавили индикатор неопределенного кругового прогресса. ( I427a7 )
- Мы добавили поддержку переполнения прогресса (прогресс>100%) как для
CircularProgressIndicator
, так и дляSegmentedCircularProgressIndicator
. Когда прогресс превысит 1,0, это будет обозначено новым цветомoverflowTrack
. ( Иааа3d ) - Круглые
IconToggleButton
иTextToggleButton
теперь поддерживают новый вариант анимации фигур, в котором разные фигуры представляют отмеченное, неотмеченное и нажатое состояния. Предыдущий вариант анимированной формы для только что нажатого состояния продолжает поддерживаться. ( I29f03 ) - Мы удалили поддержку использования
EdgeButton
сColumn
из-за необходимости явно указывать высотуEdgeButton
вScreenScaffold
. ( Ie353d ) - Мы добавили поддержку Wear Compose
LazyColumn
с помощью нашегоScreenScaffold
(и добавили реализациюScrollInfoProvider
дляLazyColumnState
). ( Ib8d29 ) - Мы объединили
LocalTextMaxLines
,LocalTextAlign
,LocalTextOverflow
в единую локальную композициюLocalTextConfiguration
, чтобы обеспечить более масштабируемое решение в будущем. ( I5edbc ) - Мы добавили большую дугу в качестве дополнительной шкалы шрифта, зарезервированной для коротких текстовых строк заголовков в самом верху или внизу экрана, как в наложениях подтверждения. ( I60e3e )
- Мы добавили в Button параметры по умолчанию для рекомендуемых больших и очень больших размеров значков и заполнения содержимого. ( I84675 )
Исправления ошибок
- Мы обновили цвета
IconButton
иTextButton
. ( I48324 ) - Мы изменили базовые перегрузки Button, чтобы они были выровнены по центру по вертикали для согласованности с другими перегрузками. Чтобы восстановить предыдущее поведение, используйте
Modifier.align
изRowScope
. ( I66e57 )
Версия 1.0.0-альфа24
4 сентября 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha24
. Версия 1.0.0-alpha24 содержит эти коммиты .
Изменения API
- Мы добавили схему движения в тему Material3. Это будет использоваться компонентами библиотеки для применения характеристик анимации, таких как пружины для выразительного движения. ( I54ff3 )
- Мы добавили компоненты
AppScaffold
иScreenScaffold
в библиотеку Material3, которые включают в себя функциональные возможности для координации слоев и переходовTimeText
иScrollIndicator
.AppScaffold
предоставляет верхний уровень компонентов scaffold, которые располагаются поверх всех экранов. Таким образом, добавлениеTimeText
вAppScaffold
позволяет ему оставаться на месте при перелистывании между экранами. Экраны сами могут переопределять или скрывать текст времени.ScreenScaffold
предоставляет слот дляScrollIndicator
и автоматически анимирует индикатор прокрутки при прокрутке, включая время ожидания, чтобы скрыть индикатор прокрутки после бездействия. ( I047d6 ) - Мы добавили
ScrollIndicator
с новым дизайном Material3. Он имеет фиксированный размер большого пальца, основанный на исходном содержимом списка, чтобы избежать изменений размера при отложенной загрузке содержимого в список. ( Ic228d ) - Мы изменили API
ScrollAway
таким образом, чтоScreenStage
является классом значения, а не классом перечисления, чтобы можно было добавлять дополнительные этапы по мере необходимости в будущем. ( I48c93 ) - Мы добавили
EdgeButton
— специальную кнопку, специфичную для Wear, форма которой повторяет кривизну нижней части экрана ( I16369 ). - Мы добавили в
ScreenScaffold
новый слот для нижней кнопки (например,EdgeButton
), которая будет отображаться и изменять размер в зависимости от прокручиваемого содержимого ( I032eb ). - Мы добавили
Modifier.scrollTransform
иModifier.targetMorphingHeight
, чтобы добавить эффекты движения Material3 к элементам вLazyColumn
. ( Ie229a ) - Мы добавили
SegmentedCircularProgressIndicator
как вариантCircularProgressIndicator
. Сегментированный вариант либо показывает одно значение прогресса для всех сегментов, либо показывает, что каждый сегмент включен или выключен. ( I6e059 ) - Мы добавили
LinearProgressIndicator
в качестве альтернативы существующемуCircularProgressIndicator
. ( I89182 ) - Мы добавили
AlertDialog
, предоставляющий макеты для отображения важных подсказок пользователю. Варианты включены либо для пары кнопок подтверждения/отключения, либо для одной нижней кнопки (обычно EdgeButton) под стопкой опций. В обоих вариантах есть слоты для значка, заголовка и дополнительного текста для предоставления дополнительной информации. ( Ieb873 ) - Мы добавили
OpenOnPhoneDialog
, который следует использовать для указания действия, которое будет продолжено на телефоне пользователя.OpenOnPhoneDialog
закрывается по истечении указанного времени ожидания. ( I978fd ) - Мы добавили
Confirmation
, компонент диалогового окна, в котором есть слоты для значков и изогнутого или линейного текста. Для сообщений об успехе/неуспехе предусмотрены конкретные варианты. Подтверждения автоматически отклоняются по истечении времени ожидания. ( Ib43e8 ) - Мы добавили фон в
TimeText
чтобы устранить проблемы, при которых базовый контент иTimeText
перекрывались и скрывали время. ( Ia11fd ) - Мы добавили
LevelIndicator
, который показывает значение такого параметра, как громкость, и может использоваться с существующим компонентомStepper
для создания экрана громкости.LevelIndicator
похож наScrollIndicator
, но отображается на противоположной стороне экрана и по умолчанию имеет более широкую ширину штриха и другой цвет индикатора. ( I8a4ac ) - Мы добавили
TimePicker
с макетами для 24-часового времени (с секундами или без них) или 12-часового времени с выбором до/после полудня. ( Я5124 ) - Мы добавили
DatePicker
с настройкой порядка столбцов (т. е. день-месяц-год, месяц-день-год или год-месяц-день) и дополнительными минимальными/максимальными датами. ( Ibf13b ) - Мы добавили параметр веса в
text
функциюTimeText
. В тех случаях, когда TimeText состоит из более чем одного текстового элемента, это позволяет контролировать распределение пространства. ( I36700 ) - Мы добавили
RadioButton
иSplitRadioButton
— эти компоненты упрощают предыдущий API, объединяя как (Split)SelectableButton
, так и дочерний радиоуправление ( If7ae8 ). - Мы добавили
CheckboxButton
иSplitCheckboxButton
— эти компоненты упрощают предыдущий API, объединяя как (Split)ToggleButton
, так и дочерний элемент управления Checkbox ( Ia8f70 ). - Мы добавили
SwitchButton
иSplitSwitchButton
— эти компоненты упрощают предыдущий API, объединяя как(Split)ToggleButton
так и дочерний элемент управления Switch ( I0d349 ). - Мы обновили документацию
AnimatedText
чтобы объяснить поведение выхода за пределы. ( Iff30a ) - Мы добавили
ButtonGroup
для объединения 2 или 3 кнопок, чтобы нажатие кнопок создавало скоординированную анимацию. ( Ie27db ) - Мы добавили дополнительную анимацию формы для
IconButton
иTextButton
при нажатии. ( Иффка5 ) - Мы добавили дополнительный вариант цвета
FilledVariant
дляButton
,IconButton
,TextButton
,CompactButton
иEdgeButton
( I65fc3 ). - Мы добавили параметр
forcedSize
вImageWithScrimPainter
, так что фон изображения кнопки теперь сохраняет размер своего компонента по умолчанию. УстановкаforcedSize = null
вместо этого принимаетPainter.instrinsicSize
. ( Ic57af ) - Мы добавили долгое нажатие в кнопки ( Ib613d ).
- Поддержка длительного нажатия также была добавлена в
IconButton
иTextButton
. ( I38891 ) - В «Карточки» добавлена поддержка длительного нажатия. ( I305d5 )
- Мы добавили
LocalTextMaxLines
,LocalTextAlign
,LocalTextOverflow
в качествеCompositionLocals
и использовали их в качестве параметров по умолчанию дляText
. Локальные параметры композиции теперь могут использоваться такими компонентами, какCheckboxButton
,SwitchButton
,RadioButton
для реализации рекомендаций UX, но при необходимости параметры могут быть переопределены разработчиками. ( Iab841 ) - Мы добавили
Placeholder
, который помогает маскировать содержимое таких компонентов, как кнопки и карточки, до загрузки данных. ( I1a532 ) - Мы добавили
IconToggleButtonColors
иTextToggleButtonColors
вместо удаленныхToggleButtonColors
. ( Ie0bf1 )
Исправления ошибок
- Мы обновили
Button
,FilledTonalButton
,OutlinedButton
,ChildButton
,CompactButton
чтобы использовать новыеCompositionLocals
LocalTextMaxLines
,LocalTextAlign
,LocalTextOverflow
для реализации рекомендаций по UX — при необходимости эти параметры могут быть переопределены разработчиками непосредственно в Text ( Ie51f7 ). - Мы изменили ширину обводки
LevelIndicator
по умолчанию на6dp
чтобы отличать ее отScrollIndicator
, ширина обводки которого равна4dp
. ( Если6f63 ) - Мы исправили проблему в
TimeText
, чтобы поддерживать большие углы развертки. ( Ie489f ) - Исправлена проблема во время рекомпозиции
EdgeButton
. ( I4cdca ) - Исправлены макеты разделенных кнопок переключения при предоставлении настраиваемого заполнения контента. ( Ia33d3 )
- Небольшие значения прогресса округлены как минимум до ширины линии индикатора прогресса. ( I3bd84 )
Версия 1.0.0-альфа23
14 мая 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha23
. Версия 1.0.0-alpha23 содержит эти коммиты .
Изменения API
- Мы обновили API-интерфейсы
ToggleButton
иRadioButton
, чтобы можно было настроить отключенные цвета. ( Если13а7 ) - Мы добавили новый
CircularProgressIndicator
для Material3. ( Ib3bd7 )
Исправления ошибок
- Мы исправили ошибку, из-за которой выбираемые кнопки объявляли двойное нажатие для переключения, если они уже выбраны. ( I7ed88 )
Версия 1.0.0-альфа22
1 мая 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha22
. Версия 1.0.0-alpha22 содержит эти коммиты .
Изменения API
- Мы обновили
ColorScheme
Material3. ( I7b2b8 ) - Мы обновили переключатель Material3 — помимо некоторых изменений цвета, галочка теперь соответствует галочке, используемой для флажка. ( Icac7b )
Исправления ошибок
- Обновите все демо-версии интеграции, чтобы использовать новый модификатор
rotaryScrollable
. ( I25090 )
Версия 1.0.0-альфа21
17 апреля 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha21
. Версия 1.0.0-alpha21 содержит эти коммиты .
- Этот выпуск был запущен из-за технической проблемы в предыдущем выпуске, которая привела к отсутствию файлов исходного кода. В этом выпуске нет новых коммитов.
Версия 1.0.0-альфа20
3 апреля 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha20
. Версия 1.0.0-alpha20 содержит эти коммиты .
Исправления ошибок
- Мы скорректировали альфа-каналы нажатого и сфокусированного состояния Ripple для контраста. ( I59f0a )
- Мы добавили расстояние между основными и дополнительными метками в
Button
,ToggleButton
иRadioButton
в соответствии с последними изменениями в стилях оформления и высоте строк. ( I2c0ba )
Версия 1.0.0-альфа19
6 марта 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha19
. Версия 1.0.0-alpha19 содержит эти коммиты .
Изменения API
- Мы добавили
TimeText
в библиотеку Wear Compose Material3. Этот компонент показывает текущее время (и дополнительный статус) вверху экрана. Новый лаконичный API Material3 позволяет избежать дублирования линейного и изогнутого контента. ( I4d7c3 ) - Мы обновили имена параметров с
onSelected
наonSelect
дляRadioButton
. ( I1a971 ) - Токенизировать
RadioButton
иSplitRadioButton
, а также провести рефакторинг существующих методов, чтобы уменьшить объем поискаCompositionLocal
, добавив кэшированные экземпляры цветов и сделав методыRadioButtonColors
иSplitRadioButtonColors
внутренними. ( I02b33 )
Версия 1.0.0-альфа18
21 февраля 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha18
. Версия 1.0.0-alpha18 содержит эти коммиты.
Изменения API
- Мы переработали шаблон по умолчанию для
CardColors
,ToggleButtonColors
иSplitToggleButtonColors
, создав внутренние кэшированные экземпляры и сократив использованиеCompositionLocal
. ( Если3fec )
Версия 1.0.0-альфа17
7 февраля 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha17
. Версия 1.0.0-alpha17 содержит эти коммиты.
Изменения API
- Мы обновили API кнопок, чтобы использовать
buttonColors
по умолчанию, и удалили дубликатыfilledButtonColors
. ( I4fe3b ) - Мы реорганизовали шаблоны по умолчанию для
ButtonColors
,IconButtonColors
иTextButtonColors
создав внутренний кэшированный экземпляр и сократив использованиеCompositionLocal
. ( I5f51c ) - Мы устранили накладные расходы на
rememberUpdatedState
в классах цветов, специфичных для компонентов, и пометили методы доступа внутри классов цветов как внутренние. ( Если6571 )
Исправления ошибок
- Мы обновили
Modifier.minimumInteractiveComponentSize
для использованияModifier.node
. ( Iba6b7 )
Версия 1.0.0-альфа16
24 января 2024 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha16
. Версия 1.0.0-alpha16 содержит эти коммиты.
Новые возможности
- Мы добавили
CompactButton
, который может использовать те же цвета заливки, тона и контура, что и Button. ( I05df0 ).
Изменения API
- Мы добавили
RadioButton
/SplitRadioButton
в качестве контейнеров для элементов управления выбором, таких как элемент управления Radio. Он отличается от существующегоToggleButton
тем, чтоRadioButton
можно выбирать (и он работает внутри группы выбора), тогда какToggleButton
можно переключать (и он независим). ( I61275 ) - Мы удаляем
LocalContentAlpha
из библиотеки Wear Compose Material3 для согласованности с библиотекой Compose Material3. ( I49a0a ) - Компоненты Wear Material и Wear Material3, предоставляющие
MutableInteractionSource
в своих API, были обновлены и теперь предоставляютMutableInteractionSource
с нулевым значением, значение которого по умолчанию равно нулю. Здесь нет никаких семантических изменений: передача null означает, что вы не хотите подниматьMutableInteractionSource
, и при необходимости он будет создан внутри компонента. Изменение значения на null позволяет некоторым компонентам никогда не выделятьMutableInteractionSource
, а другим компонентам — только лениво создавать экземпляр, когда это необходимо, что повышает производительность этих компонентов. Если вы не используетеMutableInteractionSource
который передаете этим компонентам, рекомендуется вместо этого передать значение null. Также рекомендуется внести аналогичные изменения в ваши собственные компоненты. ( Ib90fc , б/298048146 ) - Добавляет новый API-интерфейс Ripple в библиотеки
wear:compose-material
иwear:compose-material3
который заменяет устаревшийrememberRipple
. Также добавляется временныйCompositionLocal
,LocalUseFallbackRippleImplementation
, чтобы вернуть компоненты Material к использованию устаревших APIrememberRipple/RippleTheme
. Это будет удалено в следующем стабильном выпуске и предназначено только для временного облегчения миграции в тех случаях, когда вы предоставляете собственныйRippleTheme
. Посетите сайт Developer.android.com для получения информации о миграции и дополнительной информации об этом изменении. ( af92b21 ) - Мы внесли небольшие улучшения в API
HorizontalPageIndicator
и его документацию. ( I60efc ) - Мы обновили
ColorScheme
, сделав его неизменяемым, что сделало отдельные обновления цветов менее эффективными, но сделало более эффективным более частое использование цветов. Причина этого изменения заключается в том, что большинство приложений не будут использовать обновление отдельных цветов в качестве основного варианта использования. Это все еще возможно, но при этом потребуется больше перекомпоновок, чем раньше. В свою очередь, мы значительно уменьшим количество государственных подписок на весь материальный код и повлияем на стоимость инициализации и времени выполнения для более стандартных вариантов использования. ( Ibc2d6 ) - Обновлены API-интерфейсы
ToggleButton
иSplitToggleButton
позволяющие настраивать отключенные цвета. Кроме того, токены Material Design теперь используются для значений цвета и типографики. ( Если087c ) - Обновлены цвета фона изображения кнопки для использования жетонов Material Design. ( Иба215 )
- Мы изменили компоненты
Checkbox
,Switch
иRadioButton
чтобы они были доступны только для отображения, удалив обработку щелчков. Ожидается, что эти компоненты будут использоваться в(Split)ToggleButton
, который обрабатывает щелчок, поэтому теперь компоненты более четко обозначаются как предназначенные только для отображения (и не предназначены для автономного использования на Wear). ( I2322e )
Исправления ошибок
- Мы добавили токены для значений длительности и замедления движения в Wear Compose Material 3. ( I437cd )
- Мы исправили ошибку в
ToggleButton
,SplitToggleButton
,Checkbox
,Switch
иRadioButton
чтобы объявления о доступности не повторялись (ранее семантические роли дублировались). ( Ica281 ) - Мы удалили слой MaterialCore для
CompactButton
чтобы повысить производительность. ( 7902858 )
Версия 1.0.0-альфа15
15 ноября 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha15
. Версия 1.0.0-alpha15 содержит эти коммиты.
Изменения API
- Мы переименовали
SwipeToDismissBox
базового уровня вBasicSwipeToDismissBox
. Это делает различие между компонентом уровня Foundation иSwipeToDismissBox
уровня Material3. Последний извлекает цвета изMaterialTheme
для использования в скримах и делегирует оставшуюся реализациюBasicSwipeToDismissBox
. ( Ибекфк )
Исправления ошибок
- Мы удалили слой Material-Core для кнопки Material3, чтобы улучшить производительность. ( I55555 )
Версия 1.0.0-альфа14
18 октября 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha14
. Версия 1.0.0-alpha14 содержит эти коммиты.
Изменения API
- Мы удалили параметр
indicatorStyle
из Material3HorizontalPageIndicator
— вместо этого он будет следовать форме экрана устройства (линейной или круглой). ( I83728 ) - Мы отделили цвета для
SplitToggleButton
от цветов дляToggleButton
, добавив новый классSplitToggleButtonColors
. ( I78bee )
Версия 1.0.0-альфа13
4 октября 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha13
. Версия 1.0.0-alpha13 содержит эти коммиты.
Изменения API
- Мы добавили необязательное поле «Субтитры» в
TitleCard
. ( Ифк45а ) - Мы добавили цветные токены Material Design для
TextButton
. ( I769dc )
Версия 1.0.0-альфа12
20 сентября 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha12
. Версия 1.0.0-alpha12 содержит эти коммиты.
Изменения API
- Мы обновили
IconButton
для использования токенов Material Design. ( I3f137 ) - Мы обновили
IconToggleButton
для использования токенов Material Design. ( I7d263 ) - Мы обнародовали конструкторы
CheckboxColors
,RadioButtonColors
,SwitchColors
. ( I82b73 )
Версия 1.0.0-альфа11
6 сентября 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha11
. Версия 1.0.0-alpha11 содержит эти коммиты.
Исправления ошибок
- Мы обновляем типографику для карточек Material3 до
TitleMedium
. ( I597bd ) - Мы обновили типографику и выравнивание для
ListHeader
иListSubheader
Material3. ( Ib5ceb )
Версия 1.0.0-альфа10
23 августа 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha10
выпущен. Версия 1.0.0-alpha10 содержит эти коммиты.
Новые возможности
- Добавьте
HorizontalPageIndicator
в библиотеку Wear Material3. ( Ифи99 )
Изменения API
- Обновите код кнопок, чтобы использовать токены дизайна Material3. ( I92fe4 )
- Объявление API-интерфейсов Wear Material 3 Stepper и Slider экспериментальными, поскольку детали пользовательского интерфейса все еще дорабатываются. ( I84d54 )
- Мы удалили размеры
ExtraSmall
из круглыхTextButton
иTextToggleButton
, поскольку этот размер применяется только кIconButton
. ( Ibc7d5 )
Исправления ошибок
- Мы обновили руководство по типографике для TextToggleButton, чтобы использовать LabelLarge для LargeButtonSize ( Ib10fa ).
- Мы обновили руководство по типографике для TextButton, чтобы использовать LabelLarge для LargeButtonSize ( I8f3a7 ).
- Для обеспечения доступности мы установили минимальное значение касания карты на уровне 48 dp. ( Ieb9b1 )
- Добавьте AppCard с демо-изображением, удалив AppCard с демо-изображением в фоновом режиме ( Id735f ).
- Исправлена ошибка в круглых кнопках, из-за которой модификаторы не были правильно связаны. ( I5e162 )
Версия 1.0.0-альфа09
9 августа 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha09
. Версия 1.0.0-alpha09 содержит эти коммиты.
Новые возможности
- Мы добавили
ToggleButton
для материала3 ( I6bed6 ).
Изменения API
- Мы включили аннотацию
FloatRange
в качестве ограничений API, о которых ранее говорилось в комментариях. ( Icb401 ) - Мы обновили типографику Wear Material3, чтобы она соответствовала последним рекомендациям Material3. ( I1bad6 )
Исправления ошибок
- Мы обновили цвета
Button
,IconButton
иTextButton
в соответствии с дизайном Material3. ( Ib2495 ) - Мы исправили видимость галочки в отключенном состоянии. ( Ib25bf )
Версия 1.0.0-альфа08
26 июля 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha08
. Версия 1.0.0-alpha08 содержит эти коммиты.
Новые возможности
- Мы добавили следующие элементы управления выбором для Material3 —
Switch
,Checkbox
,RadioButton
. ( Ib918c ) - Мы добавили
IconToggleButton
иTextToggleButton
в Material3, круглую кнопку-переключатель с одним слотом для значка и текста соответственно. Для разных размеровToggleButton
мы рекомендуем использоватьModifier.touchTargetAwareSize
с размерами, указанными в соответствующих кнопках переключения. ( I9f015 ) - Мы добавили
ListHeader
иListSubheader
к нашим компонентам Material3. ( Ибаефе ) - Мы добавили Material3
SwipeToDismissBox
, который вызывает новый FoundationSwipeToDismissBox
и предоставляет значения цвета по умолчанию из своей темы. ( I275fb ) - Мы добавили
InlineSlider
Material3 в Wear Compose. Это позволяет пользователям делать выбор из диапазона значений. Диапазон выбора отображается в виде полосы между минимальным и максимальным значениями диапазона, из которого пользователи могут выбрать одно значение.InlineSlider
идеально подходит для настройки таких параметров, как громкость или яркость. ( I7085f )
Изменения API
- Мы обновили тему «Фигуры в Wear Material 3», чтобы использовать ее на основе
RoundedCornerShape
вместо Shape. ( Идб133 ) - Мы сделали константы высоты для Button общедоступными ( Idbfde ).
- Обновлены файлы API для подавления аннотаций совместимости ( I8e87a , b/287516207 ).
- Мы обновили
InlineSliderColors
в Wear Compose Material 3, чтобы иметь открытый конструктор и общедоступные свойства. ( I6b632 ) - Мы обновили все цветовые классы в Wear Compose Material 3, чтобы иметь общедоступные конструкторы и общедоступные свойства. ( I17702 )
- Мы сделали константы горизонтального и вертикального заполнения Button общедоступными. ( Ieeaf7 )
Исправления ошибок
- Кнопка теперь будет регулировать свою высоту, чтобы вместить контент, который увеличился из-за больших шрифтов для обеспечения доступности, когда это необходимо ( Iaf302 ).
- Мы обновили несколько демонстрационных версий Button для решения проблем с доступностью. ( I61ce9 )
-
Stepper
иInlineSlider
теперь поддерживают повторные нажатия при длительном нажатии, так что вы можете быстро увеличивать/уменьшать значениеStepper
иInlineSlider
удерживая кнопки + или - ( I27359 ).
Версия 1.0.0-альфа07
21 июня 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha07
. Версия 1.0.0-alpha07 содержит эти коммиты.
Новые возможности
- Мы добавили компонент
Stepper
в нашу библиотеку Compose for Wear OS Material 3. Это похоже на предыдущую версию Material, но по умолчанию не учитывает семантику диапазона, согласно отзывам разработчиков. Мы предоставляемModifier.rangeSemantics
в тех случаях, когда требуется семантика диапазона. ( Ic39fd ) - Мы добавили
curvedText
в нашу библиотеку Compose for Wear OS Material 3. ( Ia8ae3 )
Исправления ошибок
- Мы обновили
wear.compose.foundation
, чтобы он стал API-зависимостьюwear.compose.material3
( I72004 , b/285404743 ).
Версия 1.0.0-альфа06
7 июня 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha06
. Версия 1.0.0-alpha06 содержит эти коммиты.
Исправления ошибок
- Мы обновили
TextButton
, чтобы использовать функцию расширенияtoDisabledColor
для корректных отключенных альфа-значений. ( I814c8 )
Версия 1.0.0-альфа05
24 мая 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha05
. Версия 1.0.0-alpha05 содержит эти коммиты.
Новые возможности
- Мы добавили
TextButton
в Material3 — круглую кнопку с одним слотом для текста. Для разных размеровTextButton
мы рекомендуем использоватьModifier.touchTargetAwareSize
иExtraSmallButtonSize
,SmallButtonSize
,DefaultButtonSize
иLargeButtonSizeIcon
представленные вTextButtonDefaults
.TextButton
по умолчанию не имеет рамки и имеет прозрачный фон для действий с низким акцентом. Для действий, требующих особого внимания, используйтеfilledTextButtonColors
; для среднего выделения, выделенногоTextButton
, установите границу наButtonDefaults.outlinedButtonBorder
; в качестве золотой середины между обведенным и заполненным используйтеfilledTonalTextButtonColors
. ( I667e4 ) - Мы добавили
Card
,OutlinedCard
,AppCard
иTitleCard
в библиотеку Wear Compose Material3.AppCard
иTitleCard
также можно придать контурный вид с помощьюCardDefaults.outlinedCardColors
иCardDefaults.outlinedCardBorder
( I80e72 ).
Изменения API
- Мы переместили параметр метки кнопки в конец, чтобы поддерживать конечный синтаксис лямбда-выражений, и удалили параметр роли (поскольку его можно переопределить с помощью
Modifier.semantics
). КонструкторыButtonColors
теперь общедоступны. ( Ie1b6d )
Версия 1.0.0-альфа04
10 мая 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha04
. Версия 1.0.0-alpha04 содержит эти коммиты.
Новые возможности
- Мы добавили
IconButton
в Material3, круглую кнопку с одним слотом для значка/изображения. Существует четыре варианта:IconButton
,FilledIconButton
,FilledTonalIconButton
иOutlinedIconButton
. Для разных размеровIconButton
мы рекомендуем использоватьModifier.touchTargetAwareSize
иExtraSmallButtonSize
,SmallButtonSize
,DefaultButtonSize
иLargeButtonSizeIcon
представленные вIconButtonDefaults
. Мы также предоставляемIconButtonDefaults.iconSizeFor
чтобы определить рекомендуемый размер значка для данного размера кнопки. ( I721d4 )
Версия 1.0.0-альфа03
19 апреля 2023 г.
Выпущен androidx.wear.compose:compose-material3:1.0.0-alpha03
. Версия 1.0.0-alpha03 содержит эти коммиты.
Изменения API
- Мы добавили компонент «Кнопка материала 3» — это наша кнопка в форме стадиона, которая раньше называлась «Чип» в библиотеке материалов Wear Compose (она была переименована в «Кнопка» для согласованности с библиотекой Compose Material 3). Кнопка по умолчанию имеет заполненный фон, и существуют изменения кнопок для
FilledTonal
(приглушенный фон), изложенные (прозрачные с тонкой границей) и дочерний (прозрачный фон и без границы, используемые для дополнительных действий с наименьшим количеством известности). Круглые кнопки для простых значков и текстового контента будут следовать в будущем. ( IA6942 )
Версия 1.0.0-альфа02
5 апреля 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha02
выпускается. Версия 1.0.0-alpha02 содержит эти коммиты.
Исправления ошибок
- Мы добавили
DefaultTextStyle
, чтобы носить сочинение материала 3, который по умолчанию по умолчанию ThePlatformTextStyle.includeFontPadding
true (текущая настройка). Это позволит нам по умолчанию синхронизировать отключение подготовки шрифтов с библиотеками Compose в будущем (см. Fix Padmadd Padding в Compose для фона ). ( I7e461 )
Версия 1.0.0-альфа01
22 марта 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha01
выпускается. Версия 1.0.0-alpha01 содержит эти коммиты.
Новые возможности
Материал 3 является следующей эволюцией дизайна материала и включает в себя обновленные тематические и переработанные компоненты. Материал 3 на износ Compose предназначен для сплоченного с библиотекой Material 3 Compose на Android. Этот первый альфа -выпуск содержит ранние функциональные реализации следующего:
Мы будем продолжать разработать износной материал (
androidx.wear.compose:compose-material
) и носить материал 3 (androidx.wear.compose:compose-material3
) параллельно. Future Material3 Выпуски расширят набор виджетов, чтобы включать другие знакомые компоненты из Compose для износной ОС, таких как кнопки, сборщики и ползунки.Библиотеки износа и носитель 3 библиотеки являются взаимоисключающими и не должны смешивать в одном и том же приложении, в первую очередь потому, что они ссылаются на различные темы, что приведет к неожиданным несоответствиям.
Носить композицию версии 1.5
Версия 1.5.0-Alpha06
13 ноября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha06
выпускается. Версия 1.5.0-Alpha06 содержит эти коммиты .
Изменения API
- Мы упростили
ScrollInfoProvider
дляPagerState
, удалив параметрorientation
, который больше не требуется. Новое поведение заключается в том, чтобыTimeText
оставался на месте как для горизонтальной, так и для вертикальной пейджинг. ( I71767 ) -
TransformingLazyColumn
был введен в более ранних выпусках. Сейчас мы снимаем псевдонимы WearLazyColumn
(которые перенаправлялись вTransformingLazyColumn
) в пользу нового названияTransformingLazyColumn
. Мы также удалили свойствоheight
TransformingLazyColumnVisibleItemInfo
- пожалуйста, используйте вместо этогоmeasuredHeight
. ( I0ea1e ) - Мы изменили
PagerDefaults.snapFlingBehavior
snapAnimationSpec
сTween
наSpring
. ( I10d02 , b/349781047 , b/303807950 ) - Мы способствовали
LocalReduceMotion
CompositionLocal
в стабильном ( IA6F32 )
Исправления ошибок
- Мы обновили
Modifier.rotaryScrollable
для использованияfocusTargetWithSemantics
для лучшей поддержки семантики в Ротари. ( IEF0A0 ) - Мы обновили минимальную зависимость API до 1,7.4 для сочинения библиотек. ( I88b46 )
- Мы отключили ширину в
TransformingLazyColumn
в качестве обходного пути к обрезанной ошибке. ( I3dfb8 ) - Мы исправили ошибку, которая вызвала исчезающие предметы после перепроверчика с
TransformingLazyColumn
( ID7668 ) - Мы добавили
LazyLayoutSemantics
дляTransformingLazyColumn
. ( IA8F56 )
Версия 1.5.0-Alpha05
30 октября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha05
выпускается. Версия 1.5.0-Alpha05 содержит эти коммиты .
Изменения API
- Мы добавили поддержку для
animateScrollTo
наTransformingLazyColumnState
чтобы прокрутка до элемента могла быть анимирована. ( I4097d ) - Мы добавили
requestScrollTo
наTransformingLazyColumnState
отложить прокрутку на следующее измерение. ( I20a5e ) - Мы добавили поддержку
contentPadding
вTransformingLazyColumn
. ( I3a69c )
Исправления ошибок
- Мы исправили ошибку в визуализации
TransformingLazyColumn
, когда высота содержания короче высоты экрана. ( I6c3e1 ) -
ScrollInfoProvder
дляTransformingLazyColumn
теперь правильно отслеживает первый элемент. ( I1e4a3 ) -
TransformingLazyColumnState
теперь сохраняет свое состояние (anchorItemIndex
иanchorItemScrollOffset
). ( I3d265 )
Версия 1.5.0-Alpha04
16 октября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha04
выпускается. Версия 1.5.0-Alpha04 содержит эти коммиты .
Изменения API
- Мы переименовали Fore Compose Foundation
LazyColumn
вTransformingLazyColumn
так что это различие является более четким между этим и FoundationLazyColumn
. ( I0608b ) - Добавлена ротационная опора для горизонтальных/вертикальных пейджеров, позволяющая пользователям ориентироваться в пейджерах с помощью вращающихся входных устройств. ( I970d )
- Мы обновили новый
PagerDefaults
, чтобы ясно дал понять, что пейджер по умолчанию будет разыграть. ( Iff7d0 ) -
TransformingLazyColumnItemScrollProgress
в настоящее время является классом стоимости, который должен улучшить производительность. ( IC399E ) -
TransformingLazyColumn
теперь поддерживает Ротари из коробки. ( I05206 ) -
TransformingLazyColumnState
теперь поддерживаетscrollToItem
. ( I507b3 ) - Удален
@ExperimentalWearFoundationApi
изSwipeToReveal
API ( I34A66 )
Версия 1.5.0-Alpha03
2 октября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha03
выпускается. Версия 1.5.0-Alpha03 содержит эти коммиты .
Изменения API
- Мы добавили поддержку для двухнаправленного смахивания в
SwipeToReveal
, для редких случаев, когда текущий экран не поддерживает смахивание для увольнения. . По умолчанию по-прежнему можно провести откровение только при ударах правого на лето, и настоятельно рекомендуется уважать поведение по умолчанию, чтобы избежать конфликта с увольнением. ( Ifac04 ) - Мы обновили
LazyColumnState
, чтобы переопределитьcanScrollForward
иcanScrollBackward
- это теперь перестает прокручивать, когда первый или последний элемент находится в центре экрана. ( IA77D7 ) - Мы добавили новые компоненты
HorizontalPager
иVerticalPager
, которые решают общие проблемы, такие как обработка фокуса и взаимодействие с ударами системы с увольнением, которое может произойти при износе. ( I2902b ) - Мы добавили поддержку
LazyColumn
чтобы разоблачитьkey
иcontentType
клиента черезlayoutItems
. ( I1bd9c )
Исправления ошибок
- Мы обновили изогнутые текстовые анимации, чтобы быть более гладкой, используя флаги краски. ( I73a15 )
- Мы обновили документацию «Материал», чтобы отразить, что
onDismissRequest
не называется после того, как флаг Show установлен на false. ( Ifd8d6 ) - Мы исправили ошибку с анимацией виньетки в диалоговом окне материала ( I126BF )
Версия 1.5.0-Alpha02
18 сентября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha02
выпускается. Версия 1.5.0-Alpha02 содержит эти коммиты .
Изменения API
- Мы добавили поддержку для износа Compose
LazyColumn
с нашимScreenScaffold
(и добавили реализациюScrollInfoProvider
дляLazyColumnState
). ( IB8D29 ) - Мы добавили
viewportSize
вLazyColumnLayoutInfo
. ( I4187f )
Исправления ошибок
- Мы исправили ошибку, так что вращающийся прокрутка теперь отключена в
ScalingLazyColumn
когда флагuserScrollEnabled
устанавливается наfalse
. ( I490ab , b/360295825 ) - Мы сделали исправление ошибки для решения неожиданной вертикальной прокладки на изогнутый текст. Высокая высота текста теперь более близко соответствует фактическому пространству, используемому текстом. Обратите внимание, что это, вероятно, нарушит экранные тесты, которые включают изогнутый текст ( IAA6EF )
- Мы вернули исправление ошибки к
Dialog
, в котором был вызван обратный вызовonDismissRequest
, когдаshowDialog
был установлен на False, потому что в некоторых случаях это привело к тому, что он вызванonDismissRequest
несколько раз. ( I64656 )
Версия 1.5.0-альфа01
4 сентября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha01
выпускается. Версия 1.5.0-Alpha01 содержит эти коммиты .
Изменения API
- Мы добавили новую
LazyColumn
в библиотеку Foundation Foundation с ассоциированными API -интерфейсомLazyColumnState
иLazyColumnScope
. Это служит основой для создания настраиваемых эффектов масштабирования и морфинга с помощью износа Compose. ( IB3B22 ) - Мы добавили индексированную версию
itemsIndexed
, связанных сLazyColumnScope
в рамках новогоLazyColumn
API. ( IB4A57 ) - Мы добавили
LazyColumn
Modifiers, чтобы поддерживать масштабирование и поведение морфинга. ( IE229A ) -
HierarchicalFocusCoordinator
был способен стабильно. ( I31035 ) - Мы добавили поддержку для расстояния между буквами к изогнутому тексту. ( I3c740 )
- Добавлен параметр
rotationLocked
вCurvedLayout.curvedComposable
чтобы остановить вращающиеся компоненты. ( I66898 ) - Временный API Themary
LocalUseFallbackRippleImplementation
из износа и износа. - Удаленные
WearDevices.SQUARE
из многопрофильного сообщества@WearPreviewDevices
( i11c02 )
Исправления ошибок
-
SwipeToReveal
теперь позиционирует выявленные элементы на видимой части экрана, это помогает, когда в списке используетсяSwipeToReveal
, поэтому элементы всегда взаимодействуют и никогда не выходят за пределы экрана. ( I38929 ) -
SwipeToReveal
теперь сбрасываетlastActionType
до NONE, когдаanimatedTo
завершается. ( I59b03 ) - Улучшено документацию для нового параметра
rotationLocked
наcurvedComposable
. ( IFBD57 ) - Исправлена сбой при
performFling
NaN
вScalingLazyColumnSnapFlingBehavior
. ( IC13DA ) - Исправлена ошибка на модификаторе размер изогнутого макета ( I0FEDF )
- Мы добавили поддержку для расстояния между буквами, указанным в «SP». ( I9f6e3 )
- Мы исправили ошибку в диалоговом окне «Материал2», где обратный вызов
onDismissRequest
не был вызван, когда диалог стал невидимым ( I64656 ) -
LayoutCoordinates.introducesFrameOfReference
переименован вLayoutCoordinates.introducesMotionFrameOfReference
чтобы лучше отражать его назначение. Связанная функция переименована для расчета координат на основе этого флага. ( I3a330 )
Версия 1.4
Версия 1.4.0
4 сентября 2024 г.
androidx.wear.compose:compose-*:1.4.0
выпускается. Версия 1.4.0 содержит эти коммиты .
Важные изменения с 1.3.0
-
ScalingLazyColumn
иPicker
теперь поддерживают вращающийся вход по умолчанию - рекомендуется удалить явную вращающуюся обработку и отложить поведение системы по умолчанию. При необходимости используйте параметрrotaryScrollableBehavior
для настройки либо прокрутки, либо поведения SNAP - для поведения SNAP рекомендуется обеспечить возможности SNACK поведение и сенсорную прокрутку с использованием параметраflingBehavior
. -
Modifier.rotaryScrollable
- это новый модификатор, который соединяет вращающиеся события с прокручиваемыми контейнерами, позволяя пользователям прокручивать корону или вращающуюся рамку на своем устройстве Wear OS. -
SwipeDismissableNavHost
теперь предоставляет анимацию ввода для переходов в приложении. -
PositionIndicator
теперь отображается по умолчанию, когда экран впервые отображается.
Дополнительные изменения
- Более полный набор изменений, представленных в версии 1.3.0, см. Примечания к выпуску Beta01 .
Версия 1.4.0-rc01
21 августа 2024 г.
androidx.wear.compose:compose-*:1.4.0-rc01
выпускается. Версия 1.4.0-RC01 содержит эти коммиты .
- Мы обновили зависимости от 1,7.0-RC01 и закрепили навигацию по износу на Androidx.lifecycle 2.8.3
Версия 1.4.0-бета03
12 июня 2024 г.
androidx.wear.compose:compose-*:1.4.0-beta03
выпускается. Версия 1.4.0-бета03 содержит эти коммиты .
Исправления ошибок
- Мы обновили
Modifier.rotaryScrollable
для замены использования «фокусируемого» на «ocustarget», который повышает производительность. ( ID294B ) - Мы исправили проблему, в которой
ProgressIndicator
повторил свое объявление в рамкахTalkBack
. ( I94563 ) - Мы обновили базовые профили библиотеки износа. ( I3cbc3 )
Версия 1.4.0-бета02
29 мая 2024 г.
androidx.wear.compose:compose-*:1.4.0-beta02
выпускается. Версия 1.4.0-бета02 содержит эти коммиты .
Исправления ошибок
- Мы увеличили ширину границы, передаваемую для считывателей экрана из изогнутого текста, чтобы решить проблемы с усечением ( ID865F ).
- Мы ограничили границу
HorizontalPageIndicator
, который был передан считывателям экрана - ранее индикатор занимал полный экран ( ID8D7A ).
Версия 1.4.0-бета01
14 мая 2024 г.
androidx.wear.compose:compose-*:1.4.0-beta01
выпускается. Версия 1.4.0-бета01 содержит эти коммиты .
Выпуск Compose OS на 1,4-бета-01 указывает на то, что этот выпуск библиотеки завершен, а API заблокирован (за исключением случаев, когда отмечается как экспериментальный). Wear Compose 1.4 включает в себя следующую новую функциональность:
- Мы добавили
Modifier.rotaryScrollable
, новый модификатор, который соединяет вращающиеся события с помощью прокручиваемых контейнеров, позволяя пользователям прокручивать корону или вращающуюся рамку на своем устройстве Wear OS. Кроме того,ScalingLazyColumn
иPicker
теперь поддерживают ротационный ввод по умолчанию. Используйте параметрrotaryScrollableBehavior
для настройки либо прокрутки, либо поведения SNAP. Для поведения SNAP рекомендуется обеспечить SNAP через параметрflingBehavior
, а также для прокрутки сенсорной прокрутки. -
SwipeDismissableNavHost
теперь предоставляет анимацию ввода для переходов в приложении. -
PositionIndicator
теперь отображается по умолчанию, когда экран впервые отображается. -
SelectableChip
иSplitSelectableChip
были добавлены в качестве вариации наToggleChip
- используйте это сRadioButton
, чтобы обеспечить выбираемую семантику вместо семантики для доступа к доступности -
ListHeader
теперь поддерживает регулировку высоты, когда содержимое нуждается в дополнительной высоте для размещения больших размеров шрифтов.
Исправления ошибок
- Мы исправили ошибку, в которой выбирали чипы, анонсировали Double Tap To Toggle, когда уже выбраны. ( I7ed88 )
Версия 1.4.0-Alpha08
1 мая 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha08
выпускается. Версия 1.4.0-Alpha08 содержит эти коммиты .
Изменения API
- Мы внесли следующие изменения в новый Rotary API: переименованный
Modifier.rotary
toModifier.rotaryScrollable
; Переименован в интерфейсеRotaryBehavior
доRotaryScrollableBehavior
и его функцииhandleScrollEvent
, чтобыperformScroll
; ПереименованRotaryScrollableAdapter
вRotaryScrollableLayoutInfoProvider
и снял свойствоscrollableState
. ( I0c8a6 ) - Мы внесли дополнительные изменения в Rotary API: переименован в
RotaryScrollableLayoutInfoProvider
вRotarySnapLayoutInfoProvider
(потому что этот поставщик необходим только для ротарию с помощью SNAP); Изменил тип параметраsnapOffset
вRotaryScrollableDefaults.snapBehavior snapOffset
от int на DP. ( Iddebe ) - Мы переименовали параметр
clickInteractionSource
наSplitSelectableChip
вcontainerInteractionSource
. ( IA8F84 ) - Мы обновили имена параметров Click Callback для
SplitSelectableChip
- отonClick
доonSelectionClick
и отonBodyClick
доonContainerClick
. ( I32237 )
Исправления ошибок
- Мы обновили горизонтальную прокладку для
PositionIndicator
до 2DP (было 5DP), чтобы исправить ошибку, в которойPositionIndicator
(полоса прокрутки) перекрывает прокручиваемое содержимое. Обратите внимание, что это изменение, как ожидается, нарушит существующие скриншоты, которые включают в себяPositionIndicator
из -за изменения прокладки. ( I57472 ) - Мы улучшили документацию для нового роторного API, описывая различия между устройствами с низким разрешением и вращающимися устройствами. ( I63abe )
- Мы обратились к исключению в рамках
SwipeDismissableNavHost
, которое можно было вызвать, когда интерполированные альфа-значения были менее нулевыми. ( IB75A1 , B/335782510 )
Версия 1.4.0-Alpha07
17 апреля 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha07
выпускается. Версия 1.4.0-Alpha07 содержит эти коммиты .
Изменения API
- Мы добавили
Modifier.rotary
, новый модификатор, который соединяет вращающиеся события с прокручиваемыми контейнерами, позволяя пользователям прокручивать через корону или вращающуюся рамку на своем устройстве Wear OS. Кроме того,ScalingLazyColumn
и Picker теперь поддерживают вращающийся вход по умолчанию, с новыми перегрузками, которые включают параметрrotaryBehavior
для определения конфигурации прокрутки или SNAP. Если параметрrotaryBehavior
установлен на Snap, то рекомендуется также обеспечить SNAP через параметрflingBehavior
, для прокрутки сенсорного. ( I2ef6f ) - Источники
NestedScroll
перетаскивания заменяютсяUserInput
иSideEffect
, чтобы приспособиться к расширенному определению этих источников, которые теперь включают анимацию (побочный эффект) и колесо мыши и клавиатуру (userInput). ( I40579 ) - Мы добавили
SelectableChip
иSplitSelectableChip
чтобы прояснить различие между элементами управления переключателем, такими какSwitch/Checkbox
, и выбираемые элементы управления, такие какRadioButton
. Это заменяет ранее добавленные перегрузкиToggleChip/SplitToggleChip
с параметрамиselectionControl
. ( IA0217 ) - Обновленный модификатор видимости
IndeterminateStrokeWidth
вProgressIndicatorDefaults
для публики. ( I5b5a4 )
Версия 1.4.0-Alpha06
3 апреля 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha06
выпускается. Версия 1.4.0-Alpha06 содержит эти коммиты .
Исправления ошибок
- Мы добавили внутреннюю черновик роторной поддержки в рамках более широких усилий миграции роторного поведения в Androidx от Horology. ( I617d1 )
- Мы добавили внутренний проект поддержки гаптиков в рамках более широких усилий по миграции роторного поведения в Androidx от Horology. ( I5568a )
Версия 1.4.0-альфа05
20 марта 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha05
выпускается. Версия 1.4.0-alpha05 содержит эти коммиты .
Изменения API
- Мы создали
initialCenterItemIndex
иinitialCenterItemScrollOffset
PublicScalingLazyListState
. ( I0c616 ) - Мы сделали
FullScreenStrokeWidth
изProgressIndicatorDefaults
Public. ( Ibea23 )
Исправления ошибок
- Мы улучшили производительность
PositionIndicator
, уменьшив количество вызовов вlayoutInfo
отScalingLazyColumn
. ( Idc83d )
Версия 1.4.0-альфа04
6 марта 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha04
выпускается. Версия 1.4.0-alpha04 содержит эти коммиты .
Изменения API
- Мы добавили новую перегрузку для
ToggleChip
иSplitToggleChip
, которая принимает параметрselectionControl
вместо параметраtoggleControl
. Это должно использоваться с помощью контроляRadioButton
, чтобы предоставить выбираемую семантику вместо семантики, которая доступна для доступности ( I1D6D9 ) - Мы обновили имена параметров для новой перегрузки
selectionControl
отonSelected
вonSelect
дляToggleChip
иSplitToggleChip
( I1A971 )
Версия 1.4.0-альфа03
21 февраля 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha03
выпускается. Версия 1.4.0-Alpha03 содержит эти коммиты.
Изменения API
-
Modifier.inspectable
обертка устарела. Этот API создаст больше признаков вашего модификатора, чем необходимо, поэтому его использование теперь не рекомендуется. Разработчикам рекомендуется реализовать методinspectableProperties()
наModifierNodeElement
если они хотели бы разоблачить свойства модификатора для инструментов. ( IB3236 )
Исправления ошибок
- Мы исправили ошибку документации для
WearPreview*
Annotations. ( ID526D )
Версия 1.4.0-альфа02
7 февраля 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha02
выпускается. Версия 1.4.0-Alpha02 содержит эти коммиты.
Исправления ошибок
- Мы исправили ошибку в смачивании до откровения, где можно было взаимодействовать с (и отменить) совершенное действие на один элемент, начав провести другой предмет. ( IDE059 )
- Мы обновили
ListHeader
, чтобы поддержать корректировки высоты, когда содержимое нуждается в дополнительной высоте для размещения больших размеров шрифтов. ( I7290c , b/251166127 )
Версия 1.4.0-альфа01
24 января 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha01
выпускается. Версия 1.4.0-alpha01 содержит эти коммиты.
Новые возможности
- Мы добавили анимацию ввода в
SwipeDismissableNavHost
для переходов в приложении. ( CFEB79A ) -
PositionIndicator
теперь отображается по умолчанию, когда экран впервые отображается. Это изменение было введено, чтобы помочь соответствовать рекомендациям по качеству износа. К сожалению, это означает, что тестирование скриншотов необходимо будет обновляться на экранах, которые включают в себяPositionIndicator
, так как ранее не был отображаетсяPositionIndicator
. ( 419cef7 )
Изменения API
- Мы добавили новый Ripple API в
wear:compose-material
иwear:compose-material3
Библиотеки, которые заменяют устаревшегоrememberRipple
. Also adds a temporaryCompositionLocal
,LocalUseFallbackRippleImplementation
, to revert Material components to using the deprecatedrememberRipple/RippleTheme
APIs. Это будет удалено в следующем стабильном выпуске и предназначено только для того, чтобы быть временной миграционной помощью для тех случаев, когда вы предоставляете пользовательскуюRippleTheme
. См. Developer.android.com для информации о миграции и дополнительной справочной информации, стоящей за этим изменением. ( AF92B21 ) - Мы обновили
ColorScheme
, чтобы быть неизменными, делая индивидуальные обновления цвета менее эффективными, но делая более распространенное использование цветов более эффективным. Причина этого изменения заключается в том, что большинство приложений не будут обновлять отдельные цвета в качестве основного варианта использования. Это все еще возможно, но оно будет перекомплектовать больше, чем раньше, в свою очередь, мы значительно уменьшаем количество подписок состояний по всему коду материала и повлияем на инициализацию и стоимость времени выполнения более стандартных вариантов использования. ( F5C48B7 ) - Изной материал и носительный материал3 Компоненты, обнаружающие
MutableInteractionSource
в их API, были обновлены, чтобы теперь выявить нулевыеMutableInteractionSource
, которые по умолчанию на нуле. Здесь нет семантических изменений: передача NULL означает, что вы не хотите подниматьMutableInteractionSource
, и он будет создан внутри компонента, если это необходимо. Изменение на NULL позволяет некоторым компонентам никогда не распределятьMutableInteractionSource
и позволяет другим компонентам только лениво создавать экземпляр, когда им необходимо, что повышает производительность в этих компонентах. Если вы не используетеMutableInteractionSource
которые вы передаете этим компонентам, рекомендуется вместо этого пройти NULL. Также рекомендуется внести аналогичные изменения в своих собственных компонентах. ( F8FA920 ) - Мы обновили
rememberExpandableState
, чтобы сохранить расширяемое состояние. Это гарантирует, что данные хранятся при навигации на другой экран и восстанавливаются при возвращении к исходному экрану. ( 5C80095 )
Исправления ошибок
- Мы обновили настройку
ReduceMotion
, чтобы использовать слушателя, осведомленного на жизненном цикле. ( 7C6B122 ) - Мы обновили слушатель
TouchExplorationStateProvider
, чтобы осведомлен о жизни ( BE28B01 ) - Мы удалили слой MaterialCore для
CompactButton
для повышения производительности ( 25DB8E9 ) - Мы сделали
BasicSwipeToDismissBox
более надежными для смещений NAN, чтобы избежать исключений ( B983739 ) - Мы обновили
BasicSwipeToDismissBox
, чтобы гарантировать, что альфа -значения находятся в диапазоне 0,1 - Мы исправили ошибку в
ToggleButton
,SplitToggleButton
,Checkbox
,Switch
иRadioButton
чтобы объявления о доступности не повторялись (ранее, семантические роли были дублированы) ( D11EEB7 )
Версия 1.3
Версия 1.3.1
3 апреля 2024 г.
androidx.wear.compose:compose-*:1.3.1
выпускается. Версия 1.3.1 содержит эти коммиты .
Исправления ошибок
- Мы исправили ошибку в смачивании до откровения, где можно было взаимодействовать (и отменить) совершенное действие на один элемент, начав провести другой предмет. ( IDE059 )
Версия 1.3.0
24 января 2024 г.
androidx.wear.compose:compose-*:1.3.0
выпускается. Версия 1.3.0 содержит эти коммиты.
Важные изменения с 1.2.0
- Класс
SwipeToDismissBoxState
, перечислениеSwipeToDismissValue
и функция расширенияModifier.edgeSwipeToDismiss
, теперь являются каждой частью пакетаandroidx.wear.compose.foundation
, вместо пакетаandroidx.wear.compose.material
. Эта обновленная архитектура позволяет вам самостоятельно реализовать обработку жестов из других соображений дизайна. Рабочие процессы дизайна материала, такие как применение цветов из настроенной темы, обрабатываются отдельно. - Классы
SwipeToRevealCard
иSwipeToRevealChip
помогут вам реализоватьrecommended swipe-to-reveal guidance
. КлассSwipeToRevealSample
демонстрирует, как использовать эти компоненты. Наш выпуск 1.3.0-ALPHA02 ввел изменение, которое приводит к росту объектов
Chip
иToggleChip
, чтобы лучше поддерживать отображаемое пользователям масштабирование шрифтов. Это может привести к возникновению некоторого отсечения. Чтобы решить эту проблему,large
форма дляMaterialTheme
теперь использует больший радиус углового углового (26 DP вместо 24 DP). ОбъектыChip
иToggleChip
используют этот новый угловой радиус, чтобы не обрезать контент на углах чипа иToggleChip
.- Большинство
Chips
иToggleChips
неизменны, учитывая их высоту 52 DP по умолчанию. Тем не менее, объектыChip
иToggleChip
которые содержат несколько строк первичного или вторичного текста метки, или для которых высота была переопределена, могут привести к нарушению тестов экрана.
- Большинство
Дополнительные изменения
Более полный набор изменений, представленных в версии 1.3.0, см. Примечания к выпуску Beta01 .
Рекомендации по реализации
- Если ваше приложение позволяет пользователям обходить контент экрана, например, в приложении, основанном на карте, отключите управляемость с проливкой, установив
userSwipeEnabled
вfalse
в композиционном композицииSwipeDismissableNavHost
и включите кнопку, которая позволяет пользователям перейти на предыдущий экран. - Чтобы отключить анимацию для индикатора позиции во время анимации Fade-In и смены позиции в списке прокрутки, используйте объект
SnapSpec
. - В ожидании медиа -приложения загрузить контент для воспроизведения, покажите пустую композицию
Placeholder
. - Чтобы создать коллекцию расширяемых предметов по требованию, рассмотрите возможность использования экспериментального класса
ExpandableStateMapping
.
Версия 1.3.0-rc01
10 января 2024 г.
androidx.wear.compose:compose-*:1.3.0-rc01
выпускается. Версия 1.3.0-rc01 содержит эти коммиты.
Исправления ошибок
Мы обновили большую форму
MaterialTheme
, чтобы использовать округлый угловой радиус 26DP, и теперь это будет использоваться Chip иToggleChip
. Это изменение необходимо для поддержки регулировки высоты, когда содержимое нуждается в дополнительной высоте для размещения больших размеров шрифтов - в противном случае существующая форма стадиона зажигает некоторое текстовое содержание.Это изменение может вызвать поломку в тестах скриншота. ( I2e6ae )
Версия 1.3.0-beta02
13 декабря 2023 г.
androidx.wear.compose:compose-*:1.3.0-beta02
выпускается. Версия 1.3.0-бета02 содержит эти коммиты.
Исправления ошибок
- Мы восстановили предполагаемое движение в
BasicSwipeToDismissBox
. Это было изменено в предыдущем выпуске, так что слайд -часть перехода произошла, когда палец касался экрана. ( Id8e76 )
Версия 1.3.0-бета01
15 ноября 2023 г.
androidx.wear.compose:compose-*:1.3.0-beta01
выпускается. Версия 1.3.0-beta01 содержит эти коммиты.
Выпуск Compose OS на 1,3-бета-01 указывает на то, что этот выпуск библиотеки завершен, а API заблокирован (за исключением случаев, когда отмечается как экспериментальный). Wear Compose 1.3 включает в себя следующую новую функциональность:
-
SwipeToDismissBoxState
,SwipeToDismissValue
иModifier.edgeSwipeToDismiss
мигрировали изandroidx.wear.compose.material
вandroidx.wear.compose.foundation
, наряду с основной реализацией Swipe to-Dismissis вBasicSwipeToDismissBox
. Это позволяет использовать жесты для использования в области смахивания до диски независимо от дизайна материала, например, изSwipeDismissableNavHost
вandroidx.wear.compose.navigation
.SwipeToDismissBox
отandroidx.wear.compose.material
по -прежнему рекомендуется использовать с дизайном материала, поскольку он вытаскивает цвета изMaterialTheme
, а затем делегирует оставшуюся реализацию вBasicSwipeToDismissBox
. -
SwipeDismissableNavHost
теперь поддерживает новый параметрuserSwipeEnabled
, чтобы смазовать обработку можно отключить для экранов, где это не требуется. -
BasicSwipeToDismissBox
имеет улучшение обработки фокусировки с использованиемHierarchicalFocusCoordinator
. -
SwipeToReveal
имеет новые композицииSwipeToRevealCard
иSwipeToRevealChip
в материале, которые следуют рекомендуемому UX -руководству дляCard
иChip
. Он также имеет поддержку для второстепенного действия. -
DefaultTextStyle
теперь отключает подкладку Font, чтобы быть последовательным по всей платформе Android. -
Chip
иToggleChip
теперь отрегулируйте свою высоту, чтобы вместить контент, который вырос из -за больших шрифтов для доступности -
PositionIndicator
теперь имеет индивидуальные характеристики анимации для анимации затухания, затухания и изменения позиции. По причинам производительности мы рекомендуем, чтобы исчезновение и изменение позиции выключалось при использовании с прокручиваемыми списками. -
ExpandableStateMapping
обеспечивает новый способ генерацииExpandableStates
, когда им нужно создавать по требованию, а не обязательно с помощью@Composable
Scope. -
Placeholder
теперь позволяет сбросить, если контент больше не находится в состоянии готового состояния. Кроме того, настройка уменьшения движения теперь относится к мерцающему эффекту и вытирающему движению наPlaceholder
.
Известные проблемы
-
PositionIndicator
изначально не отображается при первом отображении экрана. Мы намерены внести изменения в начале 1,4 альфа, чтобы это было изначально показано, но без какой -либо анимации.
Изменения API
- Мы переименовали фонд
SwipeToDismissBox
вBasicSwipeToDismissBox
. Это делает различие более ясным между компонентом уровня фундамента иSwipeToDismissBox
на уровне материала. Последний вытаскивает цвета изMaterialTheme
который будет использоваться при срабах, и делегирует оставшуюся реализацию вBasicSwipeToDismissBox
. ( Ibecfc ) - Мы отметили
rememberExpandableStateMapping
как экспериментальное и улучшив производительностьexpandableItem
. ( I5f6bc ) - Мы заменили класс
SwipeToRevealAction
в материалеSwipeToReveal
Card и API-интерфейсах чип-API на основе слота API с использованиемSwipeToRevealPrimaryAction
,SwipeToRevealSecondaryAction
иSwipeToRevealUndoAction
Composables. Пожалуйста, смотрите примеры кода для примеров, как использовать новый API. ( IA8943 ) - Мы заменили флаги анимации
PositionIndicator
на параметрыAnimationSpec
. Индивидуальные анимации могут быть отключены, передаваяsnap
в качествеAnimationSpec
. ( I6c523 )
Исправления ошибок
- Мы исправили ошибку, вызванную ограниченным изогнутым текстом, когда размер ограничен ( i50EFE )
- Мы рассмотрели потенциальную аварию NAN, связанную с
curvedComposable
( I970EB ) - Мы вернули снятие анимации «Изменение позиции» на
PositionIndicator
. ( IEB424 ) - Мы удалили слой материала для материала для чипа материала, чтобы улучшить его производительность. ( IF2DCB )
Версия 1.3.0-Alpha08
18 октября 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha08
выпускается. Версия 1.3.0-Alpha08 содержит эти коммиты.
Изменения API
- Мы добавили отдельные флаги в перегрузки
PositionIndicator
, чтобы управлять различными анимациями:showFadeInAnimation
,showFadeOutAnimation
иshowPositionAnimation
. Предыдущий API был устарел и направляет вызовы на новый. По соображениям производительности и по согласованности UX, когдаPositionIndicator
используется в списке прокручиваемого, мы рекомендуем отключить флагиshowFadeInAnimation
иshowPositionAnimation
. ЕслиPositionIndicator
используется в качестве автономного индикатора, например, для изменения объема, то мы рекомендуем включить все 3 анимации. ( I44294 ) - Мы установили материал
SwipeToDismissBoxState
,SwipeToDismissValue
иedgeSwipeToDismiss
после миграции функциональности с проливными в диски вwear.compose.foundation
. Пожалуйста, замените наwear.compose.foundation
Equivalents. ( IEE8C9 )
Исправления ошибок
- Мы обновили базовые профили для износа Compose Foundation, материалов и навигационных библиотек. ( IDB060 )
- Мы вернули поведенческое изменение для
PositionIndicator
представленного в предыдущем CL, так чтоPositionIndicator
был анимирован при первоначальном отображении экрана. Мы намерены внести аналогичное изменение в начале 1,4 альфа, чтобы первоначально отображалсяPositionIndicator
, но без какой -либо анимации. ( I41843 ) - Мы рассмотрели некоторые проблемы с производительностью в
PositionIndicator
. ( I1C654 , B/302399827 ) - Мы оптимизировали эффективность реализации по умолчанию по умолчанию по умолчанию, чтобы полагаться на
State<Boolean>
а не на полученное состояние. ( IEEC4D ) - Мы установили прямоугольники
systemGestureExclusion
для Android 13 и выше. ( Ib1f4b )
Версия 1.3.0-Alpha07
4 октября 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha07
выпускается. Версия 1.3.0-Alpha07 содержит эти коммиты.
Изменения API
- Мы добавили отдельные флаги в
PositionIndicator
для управления различными анимациями:showFadeInAnimation
,showFadeOutAnimation
иshowPositionAnimation
. Предыдущий API был устарел и направляет вызовы на новый. По соображениям производительности и по согласованности UX, когдаPositionIndicator
используется в списке прокручиваемого, мы рекомендуем отключить флагиshowFadeInAnimation
иshowPositionAnimation
. ЕслиPositionIndicator
используется в качестве автономного индикатора, например, для изменения объема, то мы рекомендуем включить все 3 анимации. ( IA2D63 )
Исправления ошибок
- Мы внесли улучшения к удару, чтобы раскрыть движение, добавив анимацию исчезающей в основной текст действия и исчезая второстепенное действие/изменяя шкалу значков при полном расширении. ( IB7223 )
- Рекомендуется, чтобы смахивание показало, что действия стали доступными, и мы добавили пользовательские действия доступности в наш смаз, чтобы раскрыть образцы. ( I42224 )
- Мы улучшили производительность
SwipeToDismissBox
, в том числе рефакторинг, чтобы убедиться, что начальная логика не вызывает переоборудования.SwipeToDismissBox
теперь нарисован как полный размер экрана. ( IE0AA2 ) - Мы исправили ошибку, когда
PositionIndicator
неправильно исчезло. ( I2091a ) - Улучшенная производительность
PositionIndicator
путем оптимизации переоборудования. New flags to control the animations (fadeIn
,fadeOut
andpositionChange
) have been added subsequently (see API Changes) ( Ifac7d ) - We have added Microbenchmark tests for
PositionIndicator
( Idf875 )
Version 1.3.0-alpha06
20 сентября 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha06
is released. Version 1.3.0-alpha06 contains these commits.
Исправления ошибок
- We have added support for
Modifier.edgeSwipeToDismiss
withSwipeToReveal
. ( I95774 , b/293444286 ) - We have added samples for the Material
SwipeToRevealChip
andSwipeToRevealCard
. ( Ieb974 ) - We have updated the baseline profiles for Wear Compose Foundation and Material libraries. ( I1dd1f )
Версия 1.3.0-альфа05
6 сентября 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha05
is released. Version 1.3.0-alpha05 contains these commits.
Исправления ошибок
- We have added handling in Swipe to Reveal so that only one item at a time can be swiped. ( I3cd7a )
- Improved the documentation of
ScalingLazyColumnDefaults
to better match its actual behavior. ( I886d3 )
Версия 1.3.0-альфа04
23 августа 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha04
is released. Version 1.3.0-alpha04 contains these commits.
Новые возможности
- We have added undo support for the secondary action of
SwipeToReveal
. ( I7a22d )
Изменения API
- Add
HorizontalPageIndicator
in Wear Material3 library. ( Ifee99 ) - Updated Wear Compose preview tooling to use the
androidx.wear.tooling.preview
library. ( Ib036e )
Исправления ошибок
- Fix a bug in round buttons where modifiers were not chained correctly. ( I5e162 )
Версия 1.3.0-альфа03
9 августа 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha03
is released. Версия 1.3.0-alpha03 содержит эти коммиты.
Изменения API
- We have added two new composables in Material for implementing
SwipeToReveal
with Cards and Chips. These composables follow the recommended UX guidance on the component and make it easier for developers to implementSwipeToReveal
with the existing components in Wear Material. ( I7ec65 ) - We have turned on the
FloatRange
annotations as API constraints, which were previously stated in comments. ( Icb401 )
Исправления ошибок
- We have moved the initial scrolling logic of
ScalingLazyColumn
insideonGloballyPositioned()
. ( Ic90f1 ) - We are now using
drawWithCache
inPositionIndicator
,ProgressIndicator
, andSelectionControls
to optimize stroke allocations. ( I5f225 , b/288234617 ) - We have fixed checkbox tick visibility in disabled states. ( Ib25bf )
- We have updated
Placeholder
to allow resetting to show the placeholder if the content is no longer in the ready state. ( Ibd820 ) - We have made some fixes to flaky
Placeholder
tests ( Idb560 )
Версия 1.3.0-альфа02
26 июля 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha02
is released. Версия 1.3.0-alpha02 содержит эти коммиты.
Изменения API
- We have provided
ExpandableStateMapping
, a new way to generateExpandableStates
, for cases in which they need to be created on demand, not necessarily within a@Composable
scope ( Iff9e0 ) -
SwipeToDismissBox
has been migrated fromandroidx.wear.compose.material
toandroidx.wear.compose.foundation
package. ( I275fb ) - Updated API files to annotate compatibility suppression. ( I8e87a , b/287516207 )
- We have made the height constants for
Chip
,CompactChip
andToggleChip
public ( Idbfde ) - We have made the horizontal and vertical paddings for
Chip
andCompactChip
public. ( Ieeaf7 ) - Added functionality to turn off swipe handling in
SwipeDismissableNavHost
via the newuserSwipeEnabled
parameter. ( Id2a0b , b/230865655 ) - We have updated the Wear Compose Navigation library to use the new
SwipeToDismissBox
from Wear Compose Foundation. ( I4ff8e )
Исправления ошибок
- We have fixed a z-order bug where
expandedItem
did not show the correct content after clicking a button's behavior when they have buttons. ( I1899d , b/289991514 ) - Improve focus handling of
SwipeToDismissBox
(and henceSwipeDismissableNavHost
) using theHierarchicalFocusCoordinator
( I45362 , b/277852486 ) - We have made a fix to the gesture handling in
SwipeableV2
. ( I89737 ) - We have finalized the baseline profiles for our 1.2 release. ( Id5740 )
- Following the migration of
SwipeToDismissBox
to Foundation, the MaterialSwipeToDismissBox
implementation now forwards to Foundation and supplies default color values from its theme.( If8451 ) - We have added heading semantics to
ListHeader
. ( Ic5420 ) -
Chip
andToggleChip
will now adjust their height to accommodate content that has grown due to large fonts for accessibility, when required. ( Iaf302 ) - Fixed a bug in the semantic role of
SplitToggleChip
's tappable area, for accessibility. ( Ieed3a ) - The reduce motion setting now turns off the shimmering effect and wipe-off motion on placeholders. ( I91046 )
-
Stepper
andInlineSlider
now support repeated clicks on long press so that you can quickly increase/decrease value ofStepper
andInlineSlider
by holding the + or - buttons. ( I27359 )
Версия 1.3.0-альфа01
21 июня 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha01
is released. Версия 1.3.0-alpha01 содержит эти коммиты.
Исправления ошибок
- As announced in
1.2.0-alpha07
and1.2.0-alpha10
, we are now changing theDefaultTextStyle
to turn off font padding to be consistent across the Android Platform. This will address some cases of text clipping with large font sizes and may also impact screen layouts, so that screenshot tests need to be updated. For example, we see text clipping here ( Ic6a86 )
- It is no longer present when font padding is turned off:
- We have updated
wear.compose.foundation
to be an API dependency ofwear.compose.material
( I72004 , b/285404743 ) - We have fixed a bug in
SwipeToDismissBox
. Background and content keys are now passed to the remember block so that new modifiers are created when the content or background changes. ( Ib876c , b/280392104 ) - We have updated
TimeText
to use the locale when choosing the format for 12 or 24 hour time. ( If4a3d ) - We have fixed an inconsistency in
SwipeToDismissBox
contentScrimColor
default parameters. ( I2d70f ) - We have improved the motion handling in
SwipeToReveal
. ( I28fb7 )
Известные проблемы
- Supporting user-configured font sizes is an accessibility requirement. We know that multiline Chips can lead to text-clipping when displayed with large font sizes, so we will be updating Chip in an early 1.3 alpha version to make height adjustments in those cases.
Версия 1.2
Версия 1.2.1
18 октября 2023 г.
androidx.wear.compose:compose-*:1.2.1
is released. Версия 1.2.1 содержит эти коммиты.
Исправления ошибок
- Fixed a bug when the
PositionIndicator
incorrectly disappeared. ( 7a167f )
Версия 1.2.0
9 августа 2023 г.
androidx.wear.compose:compose-*:1.2.0
is released. Версия 1.2.0 содержит эти коммиты.
Важные изменения с 1.1.0
- Stable release of Compose for Wear OS 1.2.0 ( read more )
- For a list of the key changes in Wear Compose 1.2, see the release notes for ( Compose for Wear OS 1.2 Beta01 )
Версия 1.2.0-rc01
26 июля 2023 г.
androidx.wear.compose:compose-*:1.2.0-rc01
is released. Версия 1.2.0-rc01 содержит эти коммиты.
Исправления ошибок
- We have finalized the baseline profiles for our 1.2 release ( Id5740 )
Версия 1.2.0-бета02
7 июня 2023 г.
androidx.wear.compose:compose-*:1.2.0-beta02
is released. Версия 1.2.0-бета02 содержит эти коммиты.
Новые возможности
- We have added the new experimental
LocalReduceMotion
CompositionLocal
variable which disables scaling and fading onScalingLazyColumn
. ( I58024 )
Исправления ошибок
- We have updated the baseline profiles for the wear compose foundation and material libraries( I4725d )
- We have fixed an inconsistency in the default values for
SwipeToDismissBox
contentScrimColor
parameters ( I2d70f ) - We have fixed the
DefaultTextStyle
default value used for theIncludeFontPadding
setting ( I737ed )
Версия 1.2.0-бета01
24 мая 2023 г.
androidx.wear.compose:compose-*:1.2.0-beta01
is released. Версия 1.2.0-бета01 содержит эти коммиты.
What's in Compose for Wear OS 1.2
The 1.2-beta01 release of Compose for Wear OS indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Compose 1.2 includes the following new functionality:
-
expandableItem
andexpandableItems
are two newFoundation
components that support expanding items within aScalingLazyColumn
. UseexpandableItem
for a single expandable item, such as Text in which the number of lines. UseexpandableItems
for a group of expandable items andexpandableButton
to simplify creating a button that collapses after the content is expanded. -
HierarchicalFocusCoordinator
- this experimental composable enables marking sub-trees of the composition as focus enabled or focus disabled. -
Picker
- the API now includesuserScrollEnabled
to control whether the picker is active for user scrolling. -
PickerGroup
- a new composable for handling multiple pickers together. It handles focus between the pickers using theHierarchicalFocusCoordinator
API and enables auto-centering of picker items. -
Placeholder
- we have made updates to the shimmer and 'Wipe Off' animations. The wipe-off effect is now immediately applied when the content is ready. -
ScalingLazyColumn
- we have migratedScalingLazyColumn
and associated classes fromandroidx.wear.compose.material.ScalingLazyColumn
toandroidx.wear.compose.foundation.lazy.ScalingLazyColumn
. Please update to use theFoundation.Lazy
version. -
SwipeToReveal
- we have added experimental support for swipe-to-reveal as a means to access secondary actions, supplementing the existing 'long press' pattern. -
Stepper
- now has an overload with an additionalenableRangeSemantics
parameter to facilitate disabling the default range semantics. -
Previews
- we have added the following custom annotations for previewing composables on Wear screens:WearPreviewSmallRound
previews the composable on a small, round device;WearPreviewLargeRound
previews the composable on a large round device;WearPreviewSquare
previews the composable on a square device. Also, the following and multi-preview annotations:WearPreviewFontScales
previews the composables on a wear device with multiple font sizes, whileWearPreviewDevices
previews the composables on different wear devices. - We have added a
DefaultTextStyle
to Wear Compose which defaults thePlatformTextStyle.includeFontPadding
property to true (this is the current setting). This will allow us to synchronize turning off font padding by default with the Compose libraries in an early 1.3 alpha version - see 1.2.0-alpha10 for more information.
Новые возможности
- We have added experimental support for disabled scaling and fading animation when reduce_motion setting is switched on. ( I58024 )
Исправления ошибок
- Improved documentation for
angularWidthDp
inCurvedSize.kt
( Iab75c ) -
SwipeDismissableNavHost
now logs a warning with potential causes of empty backstack. This is done to prevent unexpected crashes caused because ofIllegalArgumentException
which was thrown when the backstack was empty. ( I04a81 , b/277700155 )
Версия 1.2.0-Альфа10
10 мая 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha10
is released. Версия 1.2.0-Alpha10 содержит эти коммиты.
Новые возможности
- We have added support for Swipe to Reveal, as a means to access secondary actions. This pattern supplements the 'long press' pattern, the existing way a user could reveal (different) secondary actions. ( I60862 )
Изменения API
- We have added
RevealScope
to action composables inSwipeToReveal
, which gives access to the offset at which additional actions are revealed. ( I3fd56 )
Исправления ошибок
- Fixed an issue with
ScalingLazyColumn
being stuck on Wear API 33 after fling ( Ic4599 ) - We have made some performance improvements to
PositionIndicator
for jank reduction. ( I35e92 ) - We have fixed a bug in Chip and
CompactChip
where the semantic role was no longer being set toRole.Button
. ( I93f91 , b/277326264 )
Известные проблемы
We have identified a bug in Android Studio which causes failure in rendering preview when annotated with @WearPreviewDevices and @WearPreviewFontScales - a fix is planned for release soon. Please note that the other wear preview annotations work as intended in Android Studio Giraffe 2022.3.1 and beyond.
In version 1.2.0-alpha07 we added DefaultTextStyle to Wear Compose, maintaining the existing PlatformTextStyle.includeFontPadding value as true - for background, see Fix font padding in Compose . We will be changing the DefaultTextStyle to turn off font padding in an early 1.3 alpha version, to be consistent across the Android Platform. This will address some cases of text clipping with large font sizes and may also impact screen layouts, so that screenshot tests need updating. For example, with large font sizes we see text clipping here:
- It is no longer present when font padding is turned off:
The new setting can be adopted now by overriding the typography in your theme - see example code .
Версия 1.2.0-Alpha09
19 апреля 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha09
is released. Версия 1.2.0-Alpha09 содержит эти коммиты.
Изменения API
- Add
angularSizeDp
to theCurvedModifier
api for setting angular width in DP ( I89a52 )
Исправления ошибок
- We have fixed accessibility issues in our time picker demos( Id0eb7 )
Версия 1.2.0-Alpha08
5 апреля 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha08
is released. Версия 1.2.0-Alpha08 содержит эти коммиты.
Изменения API
- We have renamed
ExpandableItemsState
toExpandableState
. ( If85ea ) - We have added
expandableButton
to simplify creating a button that collapses when the content is expanded and also updated the expandables examples. ( Iae309 )
Исправления ошибок
- Improved expandable samples to show more possibilities. Modified animation of
expandableItem
to keep its content centered through the animation. ( I2f637 ) - Updated
ToggleControls
to avoid extra recompositions when manually animating the colors using State. ( I5d319 )
Версия 1.2.0-Alpha07
22 марта 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha07
is released. Версия 1.2.0-Alpha07 содержит эти коммиты.
Изменения API
- We have moved the Expandable Item components (added in 1.2.0-alpha06) from material to foundation, since they had no meaningful reference to the
MaterialTheme
. ( Ib0525 )
Исправления ошибок
- We have fixed a crash that occurred in a screen using
PickerGroup
, by ensuring thatPickerGroup
handles focus correctly when no Picker has the focus. Also added support for RSB scrolling in our Picker demos. ( If8c19 ) - We have improved the dialog transitions - the intro transition is now smoother to match the outro transition. ( Ib5af9 )
- We have added a
DefaultTextStyle
to Wear Compose which defaults thePlatformTextStyle.includeFontPadding
property to true (this is the current setting). This will allows us to synchronize turning off font padding by default with the Compose libraries in the future - see ( Fix font padding in Compose ) for background. ( I2aee8 ) - Reverted an
UpsideDownCake
preview dependency via activity-compose that blocked publishing apps to the Google Play Store. ( I6443d )
Версия 1.2.0-Alpha06
8 марта 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha06
is released. Версия 1.2.0-Alpha06 содержит эти коммиты.
Изменения API
- Add
CurvedBox
component, which places components on top of each other in the curved world. ( I29200 ) - Added Expandable Item(s) - two new components to support either a group of expandable items in a
ScalingLazyColumn
, or an expandable single item, such as Text in which the number of lines expands. ( I95dd5 ) - We have added the following custom annotations for previewing composables on Wear screens:
WearPreviewSmallRound
previews the composable on a small, round device;WearPreviewLargeRound
previews the composable on a large round device;WearPreviewSquare
previews the composable on a square device. Also, the following and multi-preview annotations:WearPreviewFontScales
previews the composables on a wear device with multiple font sizes, whileWearPreviewDevices
previews the composables on different wear devices. To use these previews, you must be using the latest Android Studio (Giraffe Canary 6) or beyond. Please note that if these annotations do not suit your purpose, Preview can still be used and supports further customisations via parameters. ( I397ff ) - We have marked
HierarchicalFocusCoordinator
as experimental while it is considered as a candidate to be moved into core compose libraries, given its wide applicability. ( I3a768 )
Исправления ошибок
- Fixed a bug on
HierarchicalFocusCoordinator
, when the lambda passed in for thefocusEnabled
parameter is changed, we now correctly use the new one. ( Icb353 ) - We have updated the default disabled content color to Background when using primary colors as the background in
Button
,CompactButton
,Chip
,CompactChip
andToggleButton
. This improves the contrast for accessibility. ( I527cc )
Версия 1.2.0-Alpha05
22 февраля 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha05
is released. Версия 1.2.0-Alpha05 содержит эти коммиты.
Изменения API
- Updated
PickerGroup
API to allow propagating the min constraints to the composable optionally. When set as true, the minimum constraints passed from the parent composable will be allowed on thePickerGroup
. If set as false,PickerGroup
will reset the minimum constraints. ( I3e046 ) - We have added
animateScrollToOption
to the Picker API in order to support programmatic animation to a specific Picker option ( I6fe67 )
Исправления ошибок
- We have updated
HorizontalPageIndicator
to support right-to-left layouts. ( Ia4359 ) - Added Screenshot tests for right-to-left layout in
HorizontalPageIndicator
( I6fbb8 ) - Added further tests to
SwipeDismissableNavHostTest
that useTestNavHostController
( I61d54 )
Версия 1.2.0-Alpha04
8 февраля 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha04
is released. Версия 1.2.0-Alpha04 содержит эти коммиты.
Новые возможности
-
PickerGroup
for handling multiple pickers together using the focus API. It handles the focus between the different pickers, enables auto-centering of the pickers based on parameters and allows developers to change the focus between different pickers while handling the events from the group. In talkback mode, thePickerGroup
handles the talkback focus by moving the focus to the selected Picker from the group. ( I60840 )
Изменения API
- We have added an overload to Stepper with an additional
enableRangeSemantics
parameter in order to facilitate disabling the default range semantics ( Ia61d4 )
Исправления ошибок
- Allow
ScalingLazyColumn
to be nested within a horizontally scrolling page ( Iec3f8 , b/266555016 ) - Improvement of Stepper kdocs and
StepperTest
tests clean-up. ( Ic118e ) - Updated
androidx.navigation
dependency to version 2.5.3 ( If58ed )
Версия 1.2.0-Alpha03
25 января 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha03
is released. Версия 1.2.0-Alpha03 содержит эти коммиты.
Изменения API
- We have migrated
ScalingLazyColumn
(and associated classes) fromandroidx.wear.compose.material.ScalingLazyColumn
toandrdoidx.wear.compose.foundation.lazy.ScalingLazyColumn
(see this example for migration). This new location more closely matches that ofcompose.foundation.lazy.LazyColumn
and is more natural as it is not an opinionated Material component. The change is happening now in preparation for a new Material3 library, which we will be working on in parallel with the existing Material library. ( I060e7 )
The following changes are part of the ScalingLazyColumn
migration from Material to Foundation.Lazy
:
-
PositionIndicator
apis targeting MaterialScalingLazyColumn
have been deprecated - please update toFoundation.Lazy ScalingLazyColumn
. AdditionallyanchorType
field was added toScalingLazyListLayoutInfo
. ( I29d95 ) -
ScalingLazyColumn
has been marked as deprecated in the Wear Compose Material package ( I16d34 ) - We have updated the
ScrollAway
modifier to useScalingLazyListState
from Wear ComposeFoundation.Lazy
and deprecated the overload that tookScalingLazyListState
from Wear Compose Material. ( Ifc42c ) - We have updated the Dialog APIs to use
ScalingLazyListState
fromFoundation.Lazy
and deprecated the overloads that used MaterialScalingLazyListState
( Ic8960 ) - We have updated the Picker APIs to use
ScalingParams
fromFoundation.Lazy
and deprecated the overloads that used MaterialScalingParams
. ( Idc3d8 )
Исправления ошибок
- We have fixed a bug that caused unnecessary recompositions in
ScalingLazyListState.centerItemIndex
by ensuring that it only pushes updates when the value actually changes ( Ia9f38 ) - We have improved the performance of
SwipeToDismissBox
( I3933b ) - Added benchmark tests for
ScalingLazyColumn
in Wear Compose Foundation ( Ie00f9 ) - We have updated some internal
ScalingLazyColumn
classes methods in Material to use their equivalents fromFoundation.Lazy
( I38aab ) - We have fixed some issues in Picker tests and add more tests for checking scroll with offset ( I6ac34 )
- We migrated the
ScalingLazyColumn
Integration Demos to depend onFoundation.Lazy
instead of MaterialScalingLazyColumn
( Ic6caa ) - We have added optional
fromDate/toDate
parameters to ourDatePicker
demo ( I961cd )
Версия 1.2.0-Alpha02
11 января 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha02
is released. Версия 1.2.0-Alpha02 содержит эти коммиты.
Изменения API
- Android Compose UI tests will now run layout passes for each frame when executing frames to get to idle (eg via
waitForIdle
). This may affect tests that assert on individual frames of layout animations. ( I8ea08 , b/222093277 ) - The parameter
minLines
is added to Wear Text for consistent behaviour withBasicText
( I24874 ) -
CompactChipTapTargetPadding
has been made public so that it appears in the documentation ( If1e70 , b/234119038 )
Исправления ошибок
- Disable multiplatform builds for
wear.compose
packages ( Iad3d7 ) - Fix kdocs for
scrollToOption
( I6f9a0 ) -
PlaceholderState.rememberPlaceholderState()
updated to userememberUpdatedState
to that the state will update if theonContentReady
lambda. ( I02635 , b/260343754 ) - We have fixed a text jittering issue seen in the
Picker
component by leveraging the new compositing strategy added toModifier.graphicsLayer
. ( I99302 ) - We have fixed a bug that caused flickering in our
DatePicker
demo ( I660bd ) - We have improved the accessibility for the 12-hour time and date picker demos ( I05e12 )
- We have updated our time and date picker demos so that the pickers are not affected by RSB changes when unselected ( I4aecb )
Версия 1.2.0-альфа01
7 декабря 2022 г.
androidx.wear.compose:compose-*:1.2.0-alpha01
is released. Версия 1.2.0-Alpha01 содержит эти коммиты.
Новые возможности
- We've updated the experimental Placeholder functionality so that the “Wipe Off” effect is immediately applied when the content is ready rather than waiting for the next animation loop to start. We have also made some updates to the shimmer and wipe off animations. ( I5a7f4 )
Изменения API
- We have added a
HierarchicalFocusCoordinator
composable to enable marking sub-trees of the composition as focus enabled or focus disabled.( I827cb ) - We have added a new property to override the semantic role for
ToggleButton
.( I67132 ) - We have updated
TimeTextDefaults.TimeFormat12Hours
to remove AM/PM inTimeText
. This will change the default value oftimeSource
parameters inTimeText
API. ( I1eb7f ) - We have extended the Picker API to improve accessibility for screens with multi-picker. There is a new property
userScrollEnabled
to control whether the picker is active for user scrolling. ( I3c3aa )
Исправления ошибок
- We have changed the default border width for an
OutlinedButton/OutlinedCompactButton
from 2.dp to 1.dp to match final UX specs. ( Icf84d ) - In order to reduce the effect of the first item added to an empty
ScalingLazyColumn
appearing to scroll into place we have added an estimatedautoCentering topPadding
when the contents are empty. This change calculates the amount of top padding needed by assuming an initial item of height 0.dp. ForScalingLazyListAnchorType.ItemStart
this will calculate the correct top padding, forScalingLazyListAnchorType.ItemCenter
this calculation will be incorrect as the height of the items is needed to correctly size the contents resulting in a small scroll into place effect based on the items real height.( I239a4 ) - We have updated the background scrim applied to the
SwipeToDismiss
animation to match the Wear platform. ( I9003e ) - We have fixed
PositionIndicator
handling ofLazyListState
andScalingLazyListState
for list items of size 0 to avoid divide by zero errors.( Ic28dd )
Версия 1.1
Версия 1.1.2
8 февраля 2023 г.
androidx.wear.compose:compose-foundation:1.1.2
, androidx.wear.compose:compose-material:1.1.2
, and androidx.wear.compose:compose-navigation:1.1.2
are released. Version 1.1.2 contains these commits.
Исправления ошибок
- We have fixed a bug that caused unnecessary recompositions in
ScalingLazyListState.centerItemIndex
by ensuring that it only pushes updates when the value actually changes ( Ia9f38 )
Версия 1.1.1
11 января 2023 г.
androidx.wear.compose:compose-foundation:1.1.1
, androidx.wear.compose:compose-material:1.1.1
, and androidx.wear.compose:compose-navigation:1.1.1
are released. Версия 1.1.1 содержит эти коммиты.
Исправления ошибок
-
PlaceholderState.rememberPlaceholderState()
updated to userememberUpdatedState
to that the state will update if theonContentReady
lambda. ( I02635 , b/260343754 )
Версия 1.1.0
7 декабря 2022 г.
androidx.wear.compose:compose-foundation:1.1.0
, androidx.wear.compose:compose-material:1.1.0
, and androidx.wear.compose:compose-navigation:1.1.0
are released. Версия 1.1.0 содержит эти коммиты.
Важные изменения с версии 1.0.0
- Stable release of Compose for Wear OS 1.1.0 ( read more ).
- For a list of the key changes in Wear Compose 1.1 see the release notes for ( Compose for Wear OS 1.1 Beta01 ).
Новые возможности
- We've updated the experimental Placeholder functionality so that the “Wipe Off” effect is immediately applied when the content is ready rather than waiting for the next animation loop to start. We have also made some updates to the shimmer and wipe off animations. ( I5a7f4 )
Исправления ошибок
- We have changed the default border width for an
OutlinedButton/OutlinedCompactButton
from 2.dp to 1.dp to match final UX specs. ( Icf84d ) - In order to reduce the effect of the first item added to an empty
ScalingLazyColumn
appearing to scroll into place we have added an estimatedautoCentering topPadding
when the contents are empty. This change calculates the amount of top padding needed by assuming an initial item of height 0.dp. ForScalingLazyListAnchorType.ItemStart
this will calculate the correct top padding, forScalingLazyListAnchorType.ItemCenter
this calculation will be incorrect as the height of the items is needed to correctly size the contents resulting in a small scroll into place effect based on the items real height.( I239a4 ) - We have updated the background scrim applied to the
SwipeToDismiss
animation to match the Wear platform.( I9003e ) - We have fixed
PositionIndicator
handling ofLazyListState
andScalingLazyListState
for list items of size 0 to avoid divide by zero errors.( Ic28dd )
Версия 1.1.0-rc01
9 ноября 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-rc01
, androidx.wear.compose:compose-material:1.1.0-rc01
, and androidx.wear.compose:compose-navigation:1.1.0-rc01
are released . Версия 1.1.0-RC01 содержит эти коммиты.
Исправления ошибок
- We have added baseline profile rules for
Placeholders
,ScrollAway
,RadioButton
,Switch
,Checkbox
,OutlinedButton
,OutlinedCompactButton
,OutlinedChip
andOutlinedCompactChip
. ( I8249c ) - We have fixed a bug in
Modifier.scrollAway
so that if the specifieditemIndex
is invalid (for example, if that item index is out of range), then theTimeText
will now still be displayed. ( I2137a ) - We have updated the
SwipeToDismissBox
animation to match the platform implementation. After the initial squeeze animation, the screen now slides off to the right once the dismissal has been triggered. ( I41d34 ) - As an optimization, we have updated
Modifier.scrollAway
to only read thescrollState
inside the measure block to avoid recomposing the modifier after each remeasure. ( I4c6f1 ) - We have added documentation and a sample to placeholders to show the correct ordering for
Modifier.placeholder
andModifier.placeholderShimmer
when applied to the same composable. ( Ie96f4 , b/256583229 ) - We have changed the default border width for an
OutlinedCompactChip/OutlinedChip
from 2.dp to 1.dp to match final UX specs. ( Ib3d8e ) - We have fixed a bug in
rememberPickerState
where updated inputs were not saved, so that composables were not updated after changes to the inputs. ( I49ff6 , b/255323197 ) - We have made some UI updates to the placeholders, 1) change the shimmer gradient to 1.5x the screen size, 2) add easing (cubic bezier) of the shimmer progression and 3) speed up the wipe-off animation (250ms). ( Id29c1 )
- We have corrected a UI bug in the placeholder wipeOff effect where Chip and Card backgrounds were wiping off slightly early due to not taking the component's position on screen into account. ( I2c7cb )
- We have updated the placeholder background drawing to merge colors rather than layer them where possible to reduce the risk of alpha blending of the different cropped layers from allowing underlying colors to bleed through at the placeholder background edges. ( I2ea26 )
- We have corrected the calculation of
ScalingLazyListState.centerItemIndex/centerItemOffset
so that if two items sit either side of the viewport center line the one that is closest will be considered as thecenterItem
. ( I30709 , b/254257769 ) - We have corrected a bug in the
ScalingLazyListState.layoutInfo.visibleItemsInfo
which was reporting incorrect offsets duringScalingLazyColumn
initialization. Now an empty list will be returned until all list items are visible and have the correct offsets. Check forScalingLazyListState.layoutInfo.visibleItemsInfo.isNotEmpty()
will confirm that theScalingLazyColumn
initialization is complete and items are visible. ( I3a3b8 )
Версия 1.1.0-бета01
24 октября 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-beta01
, androidx.wear.compose:compose-material:1.1.0-beta01
, and androidx.wear.compose:compose-navigation:1.1.0-beta01
are released . Версия 1.1.0-beta01 содержит эти коммиты.
What's in Compose for Wear OS 1.1
The 1.1.0-beta01 of Compose for Wear OS indicated that this release of the library is feature complete and the API locked.
- Wear Compose 1.1 release includes the following new functionality:
- Picker - Accessibility improvements to Picker so that multi-picker screens are navigable with screen readers and the content description is accessible
- Picker
contentDescription
parameter is now used only for the selected Picker option and takes a nullable String (in the previous commit, it was necessary to pass a mapping from option to the content description, but only the selected option was used). - Picker items are now always center-aligned, fixing a bug when setting
gradientRatio
to zero had the side-effect of changing the alignment. -
Chip/ToggleChip
- We have updated the default gradients forChip/ToggleChip
to bring them in line with the latest UX spec.ChipDefaults.gradientBackgroundChipColors
has been updated to start from 50% of primary rather than 32.5%. -
Chip/ToggleChip
- Added overloads for modifying Chip shapes -
Chip/Button/ToggleButton
- Added a new outlined style for Chips and Buttons and newOutlinedChip
andOutlinedButton
composables that provide a transparentChip/Button
with a thin border. - Card - Updated the default gradients for Cards to bring them in line with the latest UX spec.
CardDefaults.cardBackgroundPainter
has been updated to start from 30% of primary and end at 20% ofonSurfaceVariant
(was previously 20% to 10%onSurfaceVariant
).ToggleChip.toggleChipColors
changes from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. -
Button/ToggleButton
- Added properties for modifying button shapes. - Theme - Updated a number of the default colors in the
MaterialTheme
in order to improve accessibility as the original colors did not have sufficient contrast resulting in difficulties for users to differentiate chip/card/button backgrounds from the theme background color. -
InlineSlider/Stepper
- Button roles added so thatTalkback
can recognise them as buttons. - Scaffold -
PositionIndicator
now is positioned and sized so that it only takes the space needed. This is useful, for example, if semantic information is added to it, talkback now gets the correct bounds of thePositionIndicator
on screen. -
CurvedText/TimeText
- AddedModifier.scrollAway
, which scrolls an item vertically in/out of view, based on scroll state (with overloads to work withColumn
,LazyColumn
andScalingLazyColumn
).ScrollAway
is typically used to scroll aTimeText
out of view as the user starts to scroll a list of items upwards. -
CurvedText/TimeText
- Added support forfontFamily
,fontStyle
andfontSynthesis
inCurvedTextStyle
, usable oncurvedText
andbasicCurvedText
-
CurvedText/TimeText
- AddedfontWeight
to the constructor and copy method onCurvedTextStyle
-
ToggleControls
- Added animatedCheckbox
,Switch
andRadioButton
toggle controls for use withToggleChip
andSplitToggleChip
. These can be used instead of the static icons provided byToggleChipDefaults
(switchIcon
,checkboxIcon
andradioIcon
). - Placeholder - Added experimental placeholder support. This has three distinct visual effects designed to work together.
- Firstly a placeholder background brush effect used in containers such as Chip and Cards to draw over the normal background when waiting for content to load.
- Secondly a modifier (
Modifier.placeholder()
) to draw a stadium shaped placeholder widget over the top of content that is being loaded. - Thirdly a modifier gradient/shimmer effect (
Modifier.placeholderShimmer()
) that is drawn over the top of the other effects to indicate to users that we are waiting for data to load.- All of these effects are designed to be coordinated and shimmer and wipe-off in an orchestrated fashion.
- Core Compose dependencies updated from 1.2 to 1.3
Изменения API
- Font parameters (
fontFamily
,fontWeight
,fontStyle
&fontSynthesis
) can now be specified directly as parameters ofcurvedText
( Idc422 )
Исправления ошибок
-
curveText
andbasicCurvedText
will now work properly with talkback (the have a properly sized and placed (but empty) compose-ui node associated with them, using the text as content description) ( I7af7c , b/210721259 ) - Bug fix to the
Picker
whenPickerState.repeatedItems = false
to add an explicit setting of autoCentering params on the Pickers internalScalingLazyColumn
to ensure that it is possible to scroll the zero'th option to the center of the view. ( I8a4d7 )
Version 1.1.0-alpha07
5 октября 2022 года
androidx.wear.compose:compose-foundation:1.1.0-alpha07
, androidx.wear.compose:compose-material:1.1.0-alpha07
, and androidx.wear.compose:compose-navigation:1.1.0-alpha07
are released . Version 1.1.0-alpha07 contains these commits.
Новые возможности
- We have added experimental placeholder support. This has three distinct visual effects designed to work together. Firstly a placeholder background brush effect used in containers such as Chip and Cards to draw over the normal background when waiting for content to load. Secondly a modifier (
Modifier.placeholder()
) to draw a stadium shaped placeholder widget over the top of content that is being loaded. Thirdly a modifier gradient/shimmer effect (Modifier.placeholderShimmer()
) that is drawn over the top of the other effects to indicate to users that we are waiting for data to load. All of these effects are designed to be coordinated and shimmer and wipe-off in an orchestrated fashion. ( I3c339 )
Изменения API
- Added support for
fontWeight
,fontFamily
,fontStyle
andfontSynthesis
inCurvedTextStyle
, usable oncurvedText
andbasicCurvedText
. Those parameter can be used to specify the font and style to use on the curved text.( Iaa1a8 ),( I72759 ) - Updated
Modifier.scrollAway
's offset parameter to Dp for consistency withModifier.offset
(previously it was in pixels). Also, refactored as aLayoutModifier
for efficiency. ( I9f94b ) - As part of the new toggle controls API, we have renamed
RadioButton's circleColor
toringColor
. ( I28fa9 ) - We have added animated
Checkbox
,Switch
andRadioButton
toggle controls for use withToggleChip
andSplitToggleChip
. These can be used instead of the static icons provided byToggleChipDefaults
(switchIcon
,checkboxIcon
andradioIcon
). ( I8a8c4 )
Version 1.1.0-alpha06
21 сентября 2022 года
androidx.wear.compose:compose-foundation:1.1.0-alpha06
, androidx.wear.compose:compose-material:1.1.0-alpha06
, and androidx.wear.compose:compose-navigation:1.1.0-alpha06
are released . Version 1.1.0-alpha06 contains these commits.
Новые возможности
- We have added
Modifier.scrollAway
, which scrolls an item vertically in/out of view, based on scroll state (with overloads to work withColumn
,LazyColumn
andScalingLazyColumn
).ScrollAway
is typically used to scroll aTimeText
out of view as the user starts to scroll a list of items upwards. ( I61766 )
Исправления ошибок
- The
PositionIndicator
now is positioned and sized so that it only takes the space needed. This is useful, for example, if semantic information is added to it, talkback now gets the correct bounds of thePositionIndicator
on screen. ( Ie6106 , b/244409133 )
Version 1.1.0-alpha05
7 сентября 2022 года
androidx.wear.compose:compose-foundation:1.1.0-alpha05
, androidx.wear.compose:compose-material:1.1.0-alpha05
, and androidx.wear.compose:compose-navigation:1.1.0-alpha05
are released . Version 1.1.0-alpha05 contains these commits.
Исправления ошибок
- Button roles were added to
InlineSlider
andStepper
so that Talkback can recognise them as buttons. ( Icb46c , b/244260275 ) - We have corrected the z-order of position and page indicators in the Scaffold. The indicators will now sit on top of the vignette and so will not be obscured by the vignette if it is present. ( Ib988f , b/244207528 )
Version 1.1.0-alpha04
24 августа 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-alpha04
, androidx.wear.compose:compose-material:1.1.0-alpha04
, and androidx.wear.compose:compose-navigation:1.1.0-alpha04
are released . Version 1.1.0-alpha04 contains these commits.
Изменения API
- We have updated a number of the default colors in the MaterialTheme in order to improve accessibility as the original colors did not have sufficient contrast resulting in difficulties for users to differentiate chip/card/button backgrounds from the theme background color. The updated colors are surface(0xFF202124->0xFF303133), onPrimary(0xFF202124->0xFF303133), onSecondary(0xFF202124->0xFF303133), primaryVariant(0xFF669DF6->0xFF8AB4F8) and onError(0xFF202124->0xFF000000). The changes in colors though relatively subtle may impact existing screenshot tests. ( 81ab09 )
Исправления ошибок
- Fix a logic bug in
ScalingLazyColumn
that could result in lists with a small (typically exactly 2) number of list items not completing initialization and as a result being transparent. ( 504347 )
Version 1.1.0-alpha03
10 августа 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-alpha03
, androidx.wear.compose:compose-material:1.1.0-alpha03
, and androidx.wear.compose:compose-navigation:1.1.0-alpha03
are released . Version 1.1.0-alpha03 contains these commits.
Новые возможности
- We have added a new outlined style for
Chips
andButtons
and newOutlinedChip
andOutlinedButton
composables that provide a transparentChip/Button
with a thin border. ( Id5972 )
Изменения API
- Added overloads for modifying button shapes ( Icccde )
Исправления ошибок
- We have corrected the size of the toggle control area of the
ToggleChip
as it was not matching its UX spec. The UX Spec calls for a 4.dp spacer between the label and a 24x24.dp toggle control icon area giving a total 28.dp width. However the implementation is incorrectly giving 36x24.dp toggle control area. This results in taking away 8.dp of usable text label area. NOTE: This bug fix gives additional space for the text label and as result can (positively) impact the text layout for overflowing text. If you have screenshot tests includingToggleChips
they may need to be updated. ( I514c8 , b/240548670 )
Версия 1.1.0-альфа02
27 июля 2022 года
androidx.wear.compose:compose-foundation:1.1.0-alpha02
, androidx.wear.compose:compose-material:1.1.0-alpha02
, and androidx.wear.compose:compose-navigation:1.1.0-alpha02
are released . Version 1.1.0-alpha02 contains these commits.
Новые возможности
- We have switched Compose for Wear OS dependencies on core Compose libraries from 1.2.0 to 1.3.0-alpha0X
Изменения API
- Added overloads for modifying chip shapes ( I02e87 )
Исправления ошибок
- We have animated the visibility of the vignette when showing/hiding Dialog, to be consistent with the existing scaling animation. ( Ida33e )
- We have fixed a bug where a divide-by-zero could occur with some fling behavior when scrolling. ( I86cb6 )
- Fixed a bug in the
ChipDefaults.childChipColor()
to ensure that the disabled background color is fully transparent. ( I2b3c3 , b/238057342 )
Версия 1.1.0-альфа01
29 июня 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-alpha01
, androidx.wear.compose:compose-material:1.1.0-alpha01
, and androidx.wear.compose:compose-navigation:1.1.0-alpha01
are released . Версия 1.1.0-alpha01 содержит эти коммиты.
Изменения API
- Picker's
contentDescription
parameter is now used only for the selected Picker option and takes a nullable String (previously, it was necessary to pass a mapping from option to the content description, but only the selected option was used). ( Ife6a7 ) - We have made accessibility improvements to Picker so that multi-picker screens are navigable with screen readers and the content description is accessible ( I64edb )
Исправления ошибок
- We have updated the baseline profile rules packaged with the Wear Compose library ( I9c694 )
- We have corrected the direction of the gradient for Chips in right to left mode. Was top left->bottom right, is now top right->bottom left. ( Ic2e77 )
- We have updated the default gradients for
Chip/ToggleChip/Card
to bring them in line with latest UX spec.ChipDefaults.gradientBackgroundChipColors
has been updated to start from 50% of primary rather than 32.5%.CardDefaults.cardBackgroundPainter
has been updated to start from 30% of primary and end at 20% ofonSurfaceVariant
(was previously 20% to 10%onSurfaceVariant
).ToggleChip.toggleChipColors
changes from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. ( I43bbd ) - We have added a background color (
MaterialTheme.color.surface
) behindChip/ToggleChips
that have gradient backgrounds in order to ensure that they are properly visible in the unlikely event that a light color is used behind them. ( Ibe1a4 , b/235937657 ) - Picker items are now always center-aligned, fixing a bug when setting
gradientRatio
to zero had the side-effect of changing the alignment. ( I712b8 )
Версия 1.0
Версия 1.0.2
7 сентября 2022 года
androidx.wear.compose:compose-foundation:1.0.2
, androidx.wear.compose:compose-material:1.0.2
, and androidx.wear.compose:compose-navigation:1.0.2
are released. Version 1.0.2 contains these commits.
Исправления ошибок
- We have corrected the z-order of position and page indicators in the Scaffold. The indicators will now sit on top of the vignette and so will not be obscured by the vignette if it is present. ( Ib988f , b/244207528 )
Версия 1.0.1
24 августа 2022 г.
androidx.wear.compose:compose-foundation:1.0.1
, androidx.wear.compose:compose-material:1.0.1
, and androidx.wear.compose:compose-navigation:1.0.1
are released. Version 1.0.1 contains these commits.
Исправления ошибок
- Fix a logic bug in
ScalingLazyColumn
that could result in lists with a small (typically exactly 2) number of list items not completing initialization and as a result being transparent. ( 076c61 )
Версия 1.0.0
27 июля 2022 года
androidx.wear.compose:compose-foundation:1.0.0
, androidx.wear.compose:compose-material:1.0.0
, and androidx.wear.compose:compose-navigation:1.0.0
are released. Version 1.0.0 contains these commits.
Major features of 1.0.0
- This is the first stable release of Compose for Wear OS ( read more ).
- Compose for Wear OS builds upon the core Compose libraries providing additional wearable-specific components and, where appropriate, alternate implementations of core Compose components tailored to wearable devices.
- For a list of the key components in Wear Compose see the release notes for ( Compose for Wear OS Beta01 ).
Исправления ошибок
- We have animated the visibility of the vignette when showing/hiding Dialog, to be consistent with the existing scaling animation. ( Ida33e )
- We have fixed a bug where a divide-by-zero could occur with some fling behavior when scrolling. ( I86cb6 )
- Fixed a bug in the
ChipDefaults.childChipColor()
to ensure that the disabled background color is fully transparent. ( I2b3c3 , b/238057342 )
Version 1.0.0-rc02
22 июня 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-rc02
, androidx.wear.compose:compose-material:1.0.0-rc02
, and androidx.wear.compose:compose-navigation:1.0.0-rc02
are released . Version 1.0.0-rc02 contains these commits.
Исправления ошибок
- We have corrected the direction of the gradient for Cards in right to left (RTL) mode. It was top left->bottom right, and it is now top right->bottom left. ( Ic2e77 )
- We have updated the default gradients for
Chip/ToggleChip/Card
to bring them in line with the latest UX spec.ChipDefaults.gradientBackgroundChipColors
has been updated to start from 50% of primary rather than 32.5%.CardDefaults.cardBackgroundPainter
has been updated to start from 30% of primary and end at 20% ofonSurfaceVariant
(was previously 20% to 10% onSurfaceVariant).ToggleChip.toggleChipColors
changes from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. ( I43bbd ) - We have added a background color (
MaterialTheme.color.surface
) behindChip/ToggleChips
that have gradient backgrounds in order to ensure that they are properly visible in the unlikely event that a light color is used behind them. ( Ibe1a4 , b/235937657 ) - We have updated the baseline profile rules packaged with the Wear Compose library ( I9c694 )
Version 1.0.0-rc01
15 июня 2022 года
androidx.wear.compose:compose-foundation:1.0.0-rc01
, androidx.wear.compose:compose-material:1.0.0-rc01
, and androidx.wear.compose:compose-navigation:1.0.0-rc01
are released . Version 1.0.0-rc01 contains these commits.
Изменения API
- Interfaces in compose libraries are now built using jdk8 default interface methods ( I5bcf1 )
Исправления ошибок
- We have removed the explicit call to
fillMaxWidth()
on list header as it is not needed and can result in problems if aScalinglazyColumn
has a mixture ofListHeader()
andChip()
components as the width will tend to grow/shrink asListHeader
items are scrolled in/out of view. ( I37144 , b/235074035 ) - We have fixed a bug in the
ScalingLazyColumn
that could result in the list items not drawing correctly until scrolled if the 0th list item was large enough (including padding) ( Ic6159 , b/234328517 ) - We have made a small adjustment in the
ScalingLazyColumn
easing as items reach the edge of the screen to match UX spec updates. Old valuesCubicBezierEasing(0.25f, 0.00f, 0.75f, 1.00f)
-> new valuesCubicBezierEasing(0.3f, 0f, 0.7f, 1f)
. To keep the old behavior you can override thescalingParams
ofScalingLazyColumn
( Ie375c ) - We have added padding to the
CompactChip
in order to ensure that its tap target size is at least 48.dp high to meet the Material accessibility guidelines. This might impact any layouts you have usingCompactChips
as they will be taking up additional space. ( I3d57c )
Version 1.0.0-beta03
1 июня 2022 года
androidx.wear.compose:compose-foundation:1.0.0-beta03
, androidx.wear.compose:compose-material:1.0.0-beta03
, and androidx.wear.compose:compose-navigation:1.0.0-beta03
are released . Version 1.0.0-beta03 contains these commits.
Новые возможности
- We have made
ScalingLazyColumn
work in Compose@Preview
mode. ( I3b3b6 , b/232947354 )
Изменения API
- We have changed the default value for the
ScalingLazyColumn.horizontalAlignment
property from Start toCenterHorizontally
to ensure that when list items do not fill the entire width of the column they will be aligned for maximum visibility. To switch back to the previous behavior sethorizontalAlignment = Alignment.Start
.( I9ed4b )
Известные проблемы
- CompactChip's tap/touch height is smaller than Material accessibility guidelines. This will be corrected in the next release (15th June) . If you are using CompactChip this will affect your layouts as CompactChips will now have additional padding above and below. Please adjust and test your layouts or see the bug comments for a workaround to use the existing behavior. ( b/234332135 )
Исправления ошибок
- New demo to animate adding or removing a start text on a
TimeText
. ( I16d75 ) - Add tests for
HorizontalPageIndicator.PagesState
( I64ed0 ) - Updating
TimeText
closer to UX specs ( Ib7ea1 )
Version 1.0.0-beta02
18 мая 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-beta02
, androidx.wear.compose:compose-material:1.0.0-beta02
, and androidx.wear.compose:compose-navigation:1.0.0-beta02
are released . Version 1.0.0-beta02 contains these commits.
Новые возможности
- Picker now always responds to scroll events even when in read-only mode. This avoids the need for users to first select a Picker by tapping, before they can scroll. In read-only mode, options other than that currently selected are obscured by a shim in
gradientColor
. ( I72925 ) - We have changed the UX behavior of
Chip/ToggleChip/CompactChip/SplitToggleChip
to stop them from doingfillMaxWidth
by default. Instead they will grow to fit their contents. To keep the previous behavior simply addmodifier = Modifier.fillMaxWidth()
( I60a2c , b/232206371 )
Исправления ошибок
-
CurvedTextStyle
constructor taking aTextStyle
now also respects thefontWeight
(This may be added to the constructor and copy methods in future revisions of the API) ( Ieebb9 ) - Edge swiping improvements. When
Modifier.edgeSwipeToDismiss
is used and a swipe to the left is triggered from the edge area, it no longer triggers swipe-to-dismiss when swipe direction changes to the right. Previously, it was possible to trigger swipe-to-dismiss by swiping to the left and then swiping to the right.( I916ea ) -
HorizontalPageIndicator
now shows up to 6 pages on the screen. If there are more than 6 pages in total, it shows a half-size indicator on the left or right, with a smooth transition between pages.( I2ac29 ) - Improved default snap behavior on
ScalingLazyColumn
andPicker
( I49539 ) - Edge swiping improvements. When
Modifier.edgeSwipeToDismiss
is used, swipe-to-dismiss only triggers when first touch lands on the edge and swiped to the right, Previously it was possible to trigger swipe-to-dismiss by swiping from any part of the screen if a scroll reaches the start.( I8ca2a )
Version 1.0.0-beta01
11 мая 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-beta01
, androidx.wear.compose:compose-material:1.0.0-beta01
, and androidx.wear.compose:compose-navigation:1.0.0-beta01
are released . Version 1.0.0-beta01 contains these commits.
What's in Compose for Wear OS 1.0
The 1.0.0-beta01
of Compose for Wear OS marks an important milestone as the library is feature complete and the API locked.
Wear Compose Material components in the 1.0 release include:
- Material Theme - used as a replacement for the Compose for Mobile
MaterialTheme
, provides the colors, shapes and typography for building components on Wearables that implement the Wear Material Design UX guidelines out of the box. -
Button
,CompactButton
andToggleButton
- Button offers a single slot to take an icon, image or short text (3 characters max). Circular in shape with recommended sizes for default, large or small buttons.CompactButton
offers a single slot to take any content (icon, image or text) and is circular in shape with background size extra small.CompactButton
has optional transparent padding around the background that increases the clickable area.ToggleButton
is a button that offers a single slot to take any content (short text, icon or image) and has on/off (checked/unchecked) states with coloring and different icons to show whether checked or not - Cards - used to display information about applications such as notifications. Flexible design for different use cases with
AppCard
andTitleCard
giving different layouts and support for images as either card contents or backgrounds. - Chips - stadium shaped components similar to buttons, but with a larger area and multiple slots to allow for labels, secondary labels and icons. In different sizes and with support for images as backgrounds.
- ToggleChips and SplitToggleChips - a Chip with a checked/unchecked state and the addition of a
ToggleControl
slot to show an icon such as a switch or radio button to show the checked state of the component. In addition, theSplitToggleChip
has two tappable areas, one clickable and one toggleable. - CircularProgressIndicator - Wear Material progress indicator with two variations. The first expresses the proportion of completion of an ongoing task and supports a gap in the circular track between start and end angles. The second indicates indeterminate progress for an unspecified wait time.
- curvedText - forms part of the DSL for describing
CurvedLayouts
, along withcurvedRow
andcurvedColumn
, to lay out components around circular devices. See Wear Component Foundation below for more details onCurvedLayout
andCurvedModifier
(this plays a similar role to Modifiers in the non curved world and allows for configuration of various aspects of layout, padding, gradients, etc). - Dialog, Alert and Confirmation - Dialog displays a full-screen dialog, layered over any other content, and supports swipe-to-dismiss. It takes a single slot which is expected to be opinionated Wear Material dialog content such as Alert or Confirmation. Alert is opinionated dialog content with slots for icon, title and message. It has overloads for either two negative and positive buttons shown side-by-side or a slot for one or more vertically stacked chips. Confirmation is opinionated dialog content that displays a message for a given duration. It has a slot for an icon or image (that could be animated).
- HorizontalPageIndicator - shows horizontal page position in a fashion appropriate to the Wearable form factor. Designed to take the full screen and show a curved indicator on round devices. Can be used with the Accompanist page viewer.
- Icon - A Wear implementation of Icon which takes color and alpha from the Wear Material Theme. For a clickable icon, see Button or Chip.
- Picker - displays a scrollable list of items from which to pick. By default, items will be repeated 'infinitely' in both directions. Can be displayed in read-only mode to hide unselected options.
- PositionIndicator - shows scroll position or other positional indication in a fashion appropriate to the Wearable form factor. Designed to take the full screen and shows a curved indicator on round devices.
- Scaffold - implements the basic Wear Material Design visual layout structure. This component provides an API to put together several Wear Material components (such as
TimeText
,PositionIndicator
andVignette
) constructing the screen, ensuring proper layout strategy for them and collecting necessary data so these components will work together correctly. - ScalingLazyColumn - a scrolling scaling/fisheye list component that forms a key part of the Wear Material Design language. Provides scaling and transparency effects to the content items.
ScalingLazyColumn
is designed to be able to handle potentially large numbers of content items, which are only materialized and composed when needed. - Slider - allows users to make a selection from a range of values. The range of selections is shown as a bar, which can optionally be displayed with separators.
- Stepper - a full-screen component that allows users to make a selection from a range of values, using increase/decrease buttons at the top and bottom of the screen, with a slot in the middle for Text or a Chip.
- SwipeToDismissBox - handles the swipe-to-dismiss gesture. It takes a single slot for the background (only displayed during the swipe gesture) and the foreground content. Can optionally be combined with the androidx navigation library by using
SwipeDismissableNavHost
(see Wear Compose Navigation library below). - Text - A Wear implementation of the Compose Material Text component, taking color and alpha from the Wear Material Theme
- TimeText - a component for showing Time and application status at the top of the screen. Adjusts to screen shape by using curved text on round screens.
Vignette - a screen treatment for use in the Scaffold that blurs top and bottom of screen when scrollable content is in use.
The following components are also included from Wear Compose Foundation:
CurvedLayout - Wear Foundation
CurvedLayout
is a layout composable that places its children in an arc, rotating them as needed. This is similar to a Row layout curved into a segment of an annulus. Note that the content of aCurvedLayout
is not a composable lambda - rather, it is a DSL (domain-specific language). All elements in the CurvedLayout's DSL support an optional modifier parameter, created fromCurvedModifier
.basicCurvedText - an element in the
CurvedLayout
DSL,basicCurvedText
allows developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen).basicCurvedText
can be only created within theCurvedLayout
to ensure the best experience, like being able to specify the positioning, and usingCurvedModifiers
. Note that in most cases curvedText should be used instead, since it uses Material theming.curvedComposable - wraps normal composable content so that it can be used with
CurvedLayout
. IfcurvedComposable
has several elements inside, they will be drawn on top of each other (like a Box). To put several composables along a curve, wrap each one withcurvedComposable
.curvedRow and curvedColumn - similar to Row and Column,
curvedRow
andcurvedColumn
can be nested inside aCurvedLayout
to lay elements out as needed. For acurvedRow
, the angular layout direction and radial alignment may be specified. For acurvedColumn
, the angular alignment and radial direction may be specified.CurvedModifier - all curved components accept a modifier parameter that can be created using
CurvedModifier
: background, size, weight and padding are supported.The following component is also included from Wear Compose Navigation:
SwipeDismissableNavHost - provides a place in the Compose hierarchy for self-contained navigation to occur, with backwards navigation provided by a swipe gesture. Content is displayed within a
SwipeToDismissBox
, showing the current navigation level. During a swipe-to-dismiss gesture, the previous navigation level (if any) is shown in the background.See previous release notes for the various Alpha releases for more details of what has been delivered.
Изменения API
- Added
CurvedModifier.padding*
functions. These are used to specify additional space to be added around a curved component. ( I4dbb4 ) - Removed
CompositionLocal
internal class ( I42490 ) - We have added constant values for
Button
,CompactButton
andToggleButton
icon sizes, as guidance ( I57cab ) - Add enabled parameter to
AppCard
andTitleCard
. Now they have a similar API toandroidx.compose.material
Cards. When the parameter is set to false, the card will not be clickable. ( Idc48d , b/228869805 )
Исправления ошибок
- Stepper now disables the decrease and increase buttons when the lower/upper limits have been reached (and applies ContentAlpha.disabled to the iconColor) ( I4be9f )
- We have added 1dp padding around Picker contents when drawn with a gradient to prevent jitter on text seen when swiping. ( I0b7b9 )
- Add screenshot tests for
PositionIndicator
( I5e8bc ) - Add more tests for
AppCard
andTitleCard
( I85391 , b/228869805 )
Version 1.0.0-alpha21
20 апреля 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha21
, androidx.wear.compose:compose-material:1.0.0-alpha21
, and androidx.wear.compose:compose-navigation:1.0.0-alpha21
are released . Version 1.0.0-alpha21 contains these commits.
Новые возможности
- Added new curved modifiers to specify the background of a curved element:
CurvedModifier.background
,.radialGradientBackground
and.angularGradientBackground
( I8f392 ) - Allow curved text overflow mode (clip/ellipsis/visible) to be specified. ( I8e7aa )
- Added
CurvedModifier.weight
modifier, similar to the one in Compose. This can be used on children of curvedRow and CurvedLayout (for width) and children of curvedColumn (for height). ( I8abbd ) - Added
CurvedModifier.size
,.angularSize
and.radialSize
modifiers to specify the size of a curved element. ( I623c7 )
Изменения API
- Reorder parameters to ensure background is before color consistently across the Wear Compose API ( I43208 )
- Removed clockwise &
insideOut
parameters and replaced with more expressive constants on new classes. Curved layout direction can now beLayoutDirection
aware, and it is inherited when not specified ( If0e6a ) - We have replaced
autoCenter: Boolean
withautoCenter: AutoCentringParams
in order to fix an API issue with theScalingLazyColumn
. ( Ia9c90 ) - We have renamed
iconTintColor
andtoggleControlTintColor
toiconColor
andtoggleControlColor
throughout the API (Chip/ToggleChip/Dialog/Slider/Stepper/...) as the color is applied to the icon/toggleControl slot. ( Ied238 ) - Rewrite
PageIndicatorStyle
enum into value class ( I2dc72 ) - We have added
RowScope/ColumnScope/BoxScope
to some of the slots in our Composables to indicate to developers what the layouts assumptions are. This will allow developers to use additional modifiers on some slot content and avoid the need to provide extra layout elements. Additionally we have made some minor updates to the AppCard/TitleCard colors so thattimeColor
andappColor
default tocontentColor
, these properties can still all be individually overridden if needed. ( I26b59 ) - Made
SwipeToDismissBoxState.Companion
object private ( I39e84 ) - Fix parameters order for
InlineSlider
andStepper
. A simple change to follow api guidelines ( I11fec ) - We have removed the Saver object for
SwipeToDismissBoxState
as it was not used. ( Ifb54e ) - We have updated
CompactChip
to bring it inline with the latest UX Specification. Padding has been reduced to horizontal = 12.dp and vertical = 0.dp. The font for label has been changed from button to caption1. The recommended icon sizes are 20x20 when both icon and label are present and 24x24 for an icon only compact chip. For the icon only use case we have also ensured that the icon is center aligned. ( Iea2be ) - We have added a number of new fields to
ScalingLazyListLayoutInfo
to enable developers to know the amount ofcontentPadding
andautoCenteringPadding
that has been applied. These can be useful for developers when calculating fling/scroll ( I7577b ) - We have implemented in/out transitions for Dialog. A
showDialog
parameter has been added and the Dialog now controls its own visibility (this enables Dialog to run the intro and outro animations when the Dialog is shown/hidden). Note that the outro animation is not performed when the user leaves the dialog via swipe-to-dismiss. We have also added a default value for state in the recently addedSwipeToDismissBox
overload. ( I682a0 ) - In order to better support i18n and a11y we have changed
ToggleChip
andSplitToggleChip
so that they no longer have a default for thetoggleControl
slot. We have also changedToggleChipDefaults
so that the following methods now return ImageVector rather than Icon (note that as they no longer return @Composables they have changed to start with lower case),SwitchIcon()->switchIcon()
,CheckboxIcon->checkboxIcon()
andRadioIcon()->radioIcon()
- this allows and encourages developers to create their ownIcon()
composables with an appropriatecontentDescription
set. ( I5bb5b ) - We have added a
SwipeDismissableNavHostState
parameter toSwipeDismissableNavHost
. This supports use of edge-swiping on screens used as navigation destinations, becauseSwipeToDismissBoxState
can now be hoisted and used to initialize bothSwipeDismissableNavHostState
andModifier.edgeSwipeToDismiss
on screens that require edge-swiping. ( I819f5 , b/228336555 )
Исправления ошибок
- Ensure curved layouts are updated when needed. ( Ie8bfa , b/229079150 )
- Bug fix for https://issuetracker.google.com/issues/226648931 ( Ia0a0a , b/226648931 )
- Removed unnecessary experimental annotations ( I88d7e )
Version 1.0.0-alpha20
6 апреля 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha20
, androidx.wear.compose:compose-material:1.0.0-alpha20
, and androidx.wear.compose:compose-navigation:1.0.0-alpha20
are released . Version 1.0.0-alpha20 contains these commits.
Новые возможности
- Add
edgeSwipeToDismiss
modifier forSwipeToDismiss
. AllowsswipeToDismiss
to be active only on the left edge of the viewport. Used when the center of the screen needs to be able to handle horizontal paging, such as 2-d scrolling a Map or swiping horizontally between pages.( I3fcec , b/200699800 )
Изменения API
- Base implementation of
CurvedModifiers
, this opens the way to introduce ways to customize curved content (but noCurvedModifiers
are provided yet, and the ability to create custom modifiers may be available later) ( I9b8df ) -
EdgeSwipe
modifier documentation and default values update for better understanding .( I6d00d ) - Add
PageIndicator
slot into Scaffold. By addingPageIndicator
directly into Scaffold we might assure that it will be correctly shown on circular devices. ( Ia6042 ) - Remove default Icons from
InlineSlider
and Stepper parameters. This will help developers to be more attentive to localization and accessibility requirements. Usages of default icons were shown in demos and samples. ( I7e6fd ) - Replace Trailing and Leading parameter names with Start and End in TimeText ( Iaac32 )
- We have added a
SwipeToDismissBox
overload with anonDismissed
parameter to support the common usage of triggering a navigation event when the swipe gesture has completed. ( I50353 , b/226565726 ) - Removed
ExperimentalWearMaterialApi
annotations fromTimeText
usage ( Ide520 ) - We have marked
ScalingLazyList/Column
scope and info interfaces as sealed as they are not intended for external developers to implement and this will allow us to add new members in them in future without binary breaking changes. ( I7d99f ) - We have added a new
flingBehaviour
property to the Picker and aPickerDefaults.flingBehaviour()
method to enable configuration of the fling behavior such as adding RSB support.PickerState
now implements theScrollableState
interface. ( Ib89c7 )
Исправления ошибок
- Update the Android Runtime (ART) baseline profile rules for Wear Compose libraries. ART can leverage profile rules on devices in order to compile ahead-of-time a specific subset of the application to improve the performance of the application. Note that this will have no effect on debuggable applications. ( Iaa8ef )
- Improve documentation ( I2c051 )
Version 1.0.0-alpha19
23 марта 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha19
, androidx.wear.compose:compose-material:1.0.0-alpha19
, and androidx.wear.compose:compose-navigation:1.0.0-alpha19
are released . Version 1.0.0-alpha19 contains these commits.
Изменения API
- Renamed
CurvedRow
toCurvedLayout
, and reworked to be a scope with a DSL. Using this DSL, more complex curved layouts can be specified using a series of nestedcurvedRow
andcurvedColumn
(Which are the curved layout equivalents of Row and Column). Inside these layout elements, three elements can be used:curvedComposable
(to add any @Composable),basicCurvedText
(foundation's curved text) andcurvedText
(wear material aware curved text). ( Ib776a ) - Make the side for the
PositionIndicator
configurable. The basic PositionIndicator's position can now be configured to be End (layout direction-aware), OppositeRsb (takes into account screen rotation, to position itself opposite to the physical RSB), or the absolutes Left & Right. ( I2f1f3 ) - For
SwipeToDismissBox
, we have renamedSwipeDismissTarget
.Original toSwipeToDismissValue.Default
andSwipeDismissTarget.Dismissal
toSwipeToDismissValue.Dismissed
. We have also movedSwipeToDismissBoxDefaults.BackgroundKey
andSwipeToDismissBoxDefaults.ContentKey
toSwipeToDismissKeys.Background
,SwipeToDismissKeys.Content
respectively. ( I47a36 ) - We have added a read-only mode to Picker, for screens with multiple Pickers where only one Picker is editable at a time. When the Picker is read-only, it displays the currently selected option, and a label if one has been provided. ( I879de )
-
SwipeToDismissBoxState
has been refactored to restrict the scope ofExperimentalWearMaterialApi
toModifier.swipeable
andSwipeableState
, which are now used internally.SwipeToDismissBoxState
now hascurrentValue
,targetValue
,isAnimationRunning
andsnapTo
members to support common use cases - please let us know if you require any further properties to be made available. Also fixed the behavior ofSwipeableState
in the case where the swipe offset is within a rounding error of an anchor. ( I58302 )
Исправления ошибок
- Simplified and fixed code to detect if the content of a
ScalingLazyColumn
can be scrolled (used to decide if we display a scrollbar or not) ( I7bce0 ) - Fixed a bug on Position Indicator when used with more than one state and switching between them ( I320b5 )
- We have updated the default Compose for Wear OS theme typography/fonts to match our latest UX guidance. Of note display1 (40.sp) and display2 (34.sp) are now smaller than their previous values and various other minor updates to line height and line spacing have been made. ( Ie3077 )
- We have added resistance to
SwipeToDismissBox
so that motion only happens when swiping to dismiss and not at all in the opposite direction. ( Ifdfb9 ) - We have changed some of the default parameter values for the
CircularProgressIndicator
functions to bring them in-line with Wear Material Design UX guidance. For the Spinner/Indeterminant version the size (40->24.dp), indicatorColor (primary->onBackground), trackColor transparency (30%->10%) and stroke width (4->3dp) have been updated. For the Progress/Determinate version the trackColor transparency (30%->10%) has been updated. ( I659cc ) - We have updated the default scaling params of the
ScalingLazyColumn
in-line with the latest Wear Material Design UX specifications. Visually this results in list items starting to be scaled closer to the list center, but being less scaled at the list edge than before. ( Ica8f3 ) - Some adjustments to
ScalingLazyColumnDefaults.snapFlingBehavior
to improve the end of the animation ( If3260 )
Version 1.0.0-alpha18
9 марта 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha18
, androidx.wear.compose:compose-material:1.0.0-alpha18
, and androidx.wear.compose:compose-navigation:1.0.0-alpha18
are released . Version 1.0.0-alpha18 contains these commits.
Изменения API
- Several improvements to PositionIndicator: ShowResult renamed PositionIndicatorVisibility. Some performance improvements to avoid recomputations when not needed ( Iaed9d )
- The recommended coloring for the
SplitToggleChip
has been updated. SplitToggleChip's now have a solid colored background when checked or unchecked with the coloring of the ToggleControl being the primary indication of whether the component is checked or not. We have added a newToggleDefaults.splitToggleChipColors()
to support the new color scheme. We have also simplified thetoggleChipColors()
methods removing the splitBackgroundOverlayColor ( I7e66e ) - We have added unadjustedSize to the
ScalingLazyListItemInfo
as it is not safe to calculate the original item size using the scaled size and scaling factor due to float maths precision. ( I54657 , b/221079441 ) - Add
HorizontalPageIndicator
. It represents a total number of pages and a selected page. Might be linear or curved, depending on the shape of the device. It also supports custom indicator shape, which defines how each indicator is visually represented. ( Iac898 ) - We have updated
PickerState
so that the numberOfOptions can be updated. This supports use-cases such as aDatePicker
, when the number of days in the month changes depending on the month selected. The constructor parameter for PickerState has changed to initialNumberOfOptions accordingly. ( Iad066 ) - Hide the
PositionIndicator
when is a scrollbar and can't scroll. ( Id0a7f ) - For consistency with Scaffold, our full-screen Dialog component now displays a
PositionIndicator
and aVignette
. We are also now usingScalingLazyColumn
instead ofColumn
, which means that the Dialog contents are now inScalingLazyListScope
(and typically need to be enclosed by item { /* content */ }). Dialog supports the verticalArrangement parameter accordingly. ( Idea13 ) - We have changed the name of
ToggleChip
andSplitToggleChip
toggleIcon property to toggleControl to better align with Material Design in order to help designers and developers navigate the API. ( If5921 , b/220129803 ) - We have added a new entry caption3 to the Wear Material Theme Typology.Caption3 is a small font used for the extra long-form writing like legal texts. ( I74b13 , b/220128356 )
Исправления ошибок
- Stop the snapping animation when we are there. ( Idb69d )
- Animate changes in PositionIndicator. ( I94cb9 )
- Based on UI/UX feedback we have changed the
ScalingLazyColumn
autoCentering so that it will provide only enough space to make sure the items with indexScalingLazyListState.initialCenterItemIndex
or higher will be able to be fully scrolled to the center of the viewport. This allows developers to place one or two items about the item initially in the center which are not scrollable into the middle. This will mean that an autoCenter'ingScalingLazyColumn
will not be able to scroll above theinitialCenterItemIndex/initialCenterItemScrollOffset
( I22ee2 ) - We have added a demo for a Date Picker and fixed a bug in
PickerState
where the initiallySelectedOption was not applied until the Picker had been displayed. ( Id0d7e ) - In order to reduce the clipping of wider
ScalingLazyColumn
items on circular screens we have increased the default horizontal content padding from 8 to 10 dp. ( I0d609 ) - Ensure the
PositionIndicator
is shown when scrolling. ( Ied9a2 )
Version 1.0.0-alpha17
23 февраля 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha17
, androidx.wear.compose:compose-material:1.0.0-alpha17
, and androidx.wear.compose:compose-navigation:1.0.0-alpha17
are released . Version 1.0.0-alpha17 contains these commits.
Новые возможности
- We have added snap support that can be used with
ScalingLazyColumn
. SetflingBehavior = ScalingLazyColumnDefaults.flingWithSnapBehavior(state)
to enable snap support. ( I068d3 , b/217377069 ) - We have added demos for Picker used to select a time in either 24 hour or 12 hour clock. ( Ie5552 )
Изменения API
- Fix an issue with
TimeText
custom fonts & styles on square device ( Iea76e ) -
ScalingLazyListLayoutInfo
now hasreverseLayout
,viewportSize
and orientation properties matching those fromLazyListLayoutInfo
( I4f258 , b/217917020 ) -
ScalingLazyColumn
now has auserScrollEnabled
property matching that fromLazyList
( I164d0 , b/217912513 ) - Pickers now have a gradient on the top and bottom by default ( Iab92a )
Исправления ошибок
- We have modified
ScalingLazyColumn
so that it no longer greedily fills all of the space in its parent. Instead it will take its size from the size of its contents. This makes it consistent with the behaviour ofLazyColumn
. If you want to reinstate the old behaviour then passModifier.fillMaxWidth()/width()/widthIn()
to theScalingLazyColumn
( I51bf8 ) - We have improved the exception message in
SwipeDismissableNavHost.kt
that was triggered if the navigation backstack was empty. ( I1b1dc )
Version 1.0.0-alpha16
9 февраля 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha16
, androidx.wear.compose:compose-material:1.0.0-alpha16
, and androidx.wear.compose:compose-navigation:1.0.0-alpha16
are released . Version 1.0.0-alpha16 contains these commits.
Новые возможности
- Add
CircularProgressIndicator
. Progress indicators display the length of a process or an unspecified wait time. Supports a gap (cutout) for TimeText or other components if used full-screen. ( Iab8da )
Изменения API
- Pickers now have a
flingBehavior
parameter, the default value makes them snap to the closest option when scrolling/flinging. ( I09000 ) - Additional integer API for InlineSlider and Stepper ( I1b5d6 )
Исправления ошибок
- We have changed the default initialCenterItemIndex for the
ScalingLazyListState
from 0->1. This means that unless overridden on state construction withScalingLazyListState.rememberScalingLazyListState(initialCenterItemIndex =
)
then the 2nd list item (index == 1) will be placed in the center of the viewport at initialization and the 1st (index == 0) item will be placed before it. This allows for a better default visual effect out of the box as most of the viewport will be filled with list items. ( I0c623 , b/217344252 ) - We have reduced the
ScalingLazyColumn
defaultextraPadding
that is provided to ensure that there are plenty of list items to draw (even when we are scaling some of them down in size) from 10% to 5%. This will avoid composing extra list items that might not appear in the viewport. If non standard scalingParams are being used (more extreme scaling for instance) the developer can adjust extra padding usingviewportVerticalOffsetResolver
. ( I76be4 ) - Fix an issue with TimeText on multiple lines on square device ( Ibd3fb )
- We have modified
ScalingLazyColumn
so that it no longer greedily fills all of the space in its parent. Instead it will take its size from the size of its contents. This makes it consistent with the behavior ofLazyColumn
. If you want to reinstate the old behavior then passModifier.fillMaxSize()
to theScalingLazyColumn
- NOTE: This change is incomplete and will be addressed in a follow up change in the next Alpha release. ( I3cbfa )
Version 1.0.0-alpha15
26 января 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha15
, androidx.wear.compose:compose-material:1.0.0-alpha15
, and androidx.wear.compose:compose-navigation:1.0.0-alpha15
are released . Version 1.0.0-alpha15 contains these commits.
Изменения API
- We have added a new property
autoCentering
to theScalingLazyColumn
. When true (the default) this will ensure that all items including the first and last can be scrolled so that they are visible in the center of the lists viewport. Note that if using auto-centering you will probably want to set vertical content padding to 0.dp. If both autoCentering and vertical content padding are provided then they will both result in additional space being available before the first and after the last list items allowing them to be scrolled even further. ( I2a282 , b/214922490 ) - We have added a
Dialog
component that enables any composable to trigger a full screen dialog that sits on top of other content. When shown, the dialog supports swipe-to-dismiss and will show its parent's content in the background during the swipe gesture. The dialog content is expected to beAlert
orConfirmation
(renamed from earlier componentsAlertDialog
andConfirmationDialog
) -Alert
,Confirmation
andDialog
are all in theandroidx.wear.compose.material.dialog
package. Alert and Confirmation can be used as navigation destinations. Also, added ColumnScope to Alert and Confirmation parameters as necessary. ( Ia9014 ) - We have removed
onSurfaceVariant2
from the Compose for WearOS Material Theme Colors and replaced uses in the library withonSurfaceVariant
. ( Icd592 ) - Added a method to programmatically select an option on the
PickerState
, the initially selected option can now also be specified when creating aPickerState
. ( I92bdf ) - We have added support for customizing the fling behavior of the
ScalingLazyColumn
. ( I1ad2e , b/208842968 ) - We have added
NavController.currentBackStackEntryAsState()
to theWear.Compose.Navigation
library. ( If9028 , b/212739653 ) - Added
Modifier.onRotaryScrollEvent()
andModifier.onPreRotaryScrollEvent()
for Wear devices with a rotating side button.( I18bf5 , b/210748686 )
Version 1.0.0-alpha14
12 января 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha14
, androidx.wear.compose:compose-material:1.0.0-alpha14
, and androidx.wear.compose:compose-navigation:1.0.0-alpha14
are released . Version 1.0.0-alpha14 contains these commits.
Новые возможности
We have added a number of methods to
ScalingLazyListState
to allow developer control over scrolling to specific list items and also setting the initial list item and offset.As part of this change we have also modified the ScalingLazyList so that it is oriented around the center of the viewport of the ScalingLazyList rather than the start of the viewport.
A new property
anchorType: ScalingLazyListAnchorType = ScalingLazyListAnchorType.ItemCenter
has been added to theScalingLazyList
to control whether the center (ScalingLazyListAnchorType.ItemCenter
) orEdge
(ScalingLazyListAnchorType.ItemStart
) should be aligned to the viewport's centerline.As a result the
ScalingLazyListItemInfo.offset
andScalingLazyListItemInfo.adjustedOffset
have changed and will now reflect the offset of the item with respect to both the position of the list item and theanchorType
of the list. Eg for aScalingLazyColumn
withanchorType
ofItemCenter
and an list item positioned with its center on the centerline of the viewport the offset would be0
.The new methods are
scrollTo
,animatedScrollTo
,centerItemIndex
, andcenterItemOffset
. ( I61b61 )We have added a back button handler to
SwipeDismissableNavHost
, so that pressing back navigates to the previous level in the navigation hierarchy. ( I5b086 , b/210205624 )
Version 1.0.0-alpha13
15 декабря 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha13
, androidx.wear.compose:compose-material:1.0.0-alpha13
, and androidx.wear.compose:compose-navigation:1.0.0-alpha13
are released . Version 1.0.0-alpha13 contains these commits.
Изменения API
- We have made
RangeIcons
internal (referenced internally byInlineSlider
andStepper
). ( I927ec )
Исправления ошибок
Fixed an issue where
SwipeDismissableNavHost
would add a destination to the Compose hierarchy before it has reached theCREATED
Lifecycle state, resulting in anIllegalStateException
. This fix was a prerequisite to updating dependency onnavigation-compose
to2.4.0-beta02
and beyond. ( I40a2b , b/207328687 )Added a Drawables enum class for getting drawable resources within the Wear Compose library, so that reflection is no longer needed. This fixes a bug where library drawables were removed when
minifyEnabled=true
orshrinkResources=true
). ( Ib2a98 )Added tests for
Stepper
in Wear Compose ( I2d03a )Added samples for
SwipeDismissableNavHost
in Wear Compose Navigation. ( I85f06 )
Version 1.0.0-alpha12
1 декабря 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha12
, androidx.wear.compose:compose-material:1.0.0-alpha12
, and androidx.wear.compose:compose-navigation:1.0.0-alpha12
are released . Version 1.0.0-alpha12 contains these commits.
Новые возможности
We have added a Stepper component which allows users to make a selection from a range of values. Stepper is a full-screen control with increase and decrease buttons at the top and bottom, and a slot in the middle (expected to take either a Chip or Text). The button icons can be customized if required. ( I625fe )
We have added 2 new composables for displaying dialogs: AlertDialog waits for a response from the user and displays a title, icon, message and either a) two buttons for simple positive/negative choices or b) vertically stacked chips or toggle chips for more flexible choices, ConfirmationDialog displays an acknowledgement with a timeout. This simple dialog has slots for a title and an (animated) icon. ( Ic2cf8 )
Изменения API
- Add units (millis) to suggested dialog duration values. ( I09b48 )
Версия 1.0.0-альфа11
17 ноября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha11
, androidx.wear.compose:compose-material:1.0.0-alpha11
, and androidx.wear.compose:compose-navigation:1.0.0-alpha11
are released . Version 1.0.0-alpha11 contains these commits.
Новые возможности
- We have added a picker component that lets the user select an item from a scrolling list. By default, the list of selectable items is repeated 'infinitely' in both directions, to give the impression of a rotating cylinder seen from the side. Two features will be added in later releases: snapping to a value after a swipe/fling; adding a function to PickerState to set/scroll to the current value. ( I6461b )
Изменения API
- Added a ScalingLazyItemScope and some new modifiers fillParentMaxSize/fillParentMaxWidth/fillParentMaxHeight to allow list items to be sized based on the size of the parent container. Items can be set to fill all or a fraction of the parent's size. This exposes functionality already available in the LazyRow/Column ( I4612f )
- Added support to ScalingLazyColumn to allow items to have a key. Also added convenience methods to allow adding of items from Arrays and Lists. ( Ic1f89 )
Исправления ошибок
- Additional examples for TimeText ( I8cb64 )
Версия 1.0.0-альфа10
3 ноября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha10
, androidx.wear.compose:compose-material:1.0.0-alpha10
, and androidx.wear.compose:compose-navigation:1.0.0-alpha10
are released . Version 1.0.0-alpha10 contains these commits.
Новые возможности
Added an InlineSlider for wear compose. InlineSlider allows users to make a selection from a range of values. The range of selections is shown as a bar between the minimum and maximum values of the range, from which users may select a single value. ( If0148 )
Check out the new Compose for WearOS Codelab !
Изменения API
- Macrobenchmark now has a
minSdkVersion
of23
. ( If2655 )
Исправления ошибок
- Update transition handling in SwipeDismissableNavHost in a SideEffect ( I04994 , b/202863359 )
- Update transition handling in SwipeDismissableNavHost ( I1cbe0 , b/202863359 )
Версия 1.0.0-альфа09
27 октября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha09
, androidx.wear.compose:compose-material:1.0.0-alpha09
, and androidx.wear.compose:compose-navigation:1.0.0-alpha09
are released . Version 1.0.0-alpha09 contains these commits.
Новые возможности
- We have launched the Developer Preview of Compose on Wear OS - see our blog post which reviews the main composables and links to further resources to starting using them.
Изменения API
- We have added support for developers to be able to customize all of the colors in the Wear Material Design Color theme. ( I4759b , b/199754668 )
Исправления ошибок
- Added SwipeToDismissBox samples that persist state ( Ibaffe )
- Added links to developer.android.com guides from KDocs for CurvedText, TimeText and SwipeToDismissBox. ( I399d4 )
- SwipeDismissableNavHost now throws if there's no current destination (indicates that the NavGraph was not built with the wear.compose.navigation.composable utility function) ( I91403 )
- Added additional documentation and examples for time source usage in TimeText ( I4f6f0 )
Версия 1.0.0-альфа08
13 октября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha08
, androidx.wear.compose:compose-material:1.0.0-alpha08
, and androidx.wear.compose:compose-navigation:1.0.0-alpha08
are released . Version 1.0.0-alpha08 contains these commits.
Изменения API
- We have renamed AppCard and TitleCard
body
properties tocontent
and moved them to the end of the property list to allow them to be provided as a trailing lambda. Also renamedbodyColor
tocontentColor
for consistency with the new slot names. ( I57e78 )
Исправления ошибок
- Added links to developer.android.com guides from KDocs for button, card, chip, theme, position indicator and scaling lazy column components. ( I22428 )
- Fix WearOS SwipeToDismissBox sometimes not handling swipes. ( I9387e )
- Added samples for Button, CompactButton, Chip, CompactChip, AppCard, TitleCard, ToggleButton, ToggleChip, SplitToggleChip ( Iddc15 )
- Added microbenchmark performance tests for Card, Chip, ToggleChip, TimeText and ScalingLazyColumn. ( If2fe9 )
Версия 1.0.0-альфа07
29 сентября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha07
, androidx.wear.compose:compose-material:1.0.0-alpha07
, and androidx.wear.compose:compose-navigation:1.0.0-alpha07
are released . Версия 1.0.0-alpha07 содержит эти коммиты.
Новые возможности
- Added a CurvedText component in material, a component allowing developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen). ( I19593 )
Изменения API
- Added tests for TimeText ( Idfead )
- Transform ArcPaddingValues into an interface. ( Iecd4c )
- Added animation to SwipeToDismissBox ( I9ad1b )
- Added hasBackground parameter to the SwipeToDismissBox API so that the swipe gesture can be disabled when there is no background content to display. ( I313d8 )
-
rememberNavController()
now takes a optional set ofNavigator
instances that will be added to the returnedNavController
to better support optional Navigators such as those from Accompanist Navigation Material . ( I4619e ) - Reference NamedNavArgument from navigation-common and remove copy from wear.compose.navigation. ( I43af6 )
Исправления ошибок
- Fixed CurvedRow test flakiness on smaller devices. ( If7941 )
- Fixed possible flickering on CurvedRow when the content updates, and ensures the curved row is remeasured ( Ie4e06 )
- ChipDefaults.gradientBackgroundChipColors() has been updated in line with UX Spec changes. The gradient now starts with MaterialTheme.colors.primary with alpha 32.5% and ends with MaterialTheme.colors.surface with alpha @ 0% over a background of MaterialTheme.colors.surface @ 75% alpha. ( Id1548 )
- We have updated the colors for ToggleChips when in the selected state to match the latest Wear Material Design UX Spec guidance. When selected ToggleChips now have a gradient background from MaterialTheme.color.surface @ 0% alpha, top left, to MaterialTheme.color.primary @ 32% alpha, bottom right, over a background of MaterialTheme.color.surface @ 75% alpha. This results in a more subtle difference between checked and unchecked for the ToggleChip. ( Idd40b )
Версия 1.0.0-альфа06
15 сентября 2021 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha06
, androidx.wear.compose:compose-material:1.0.0-alpha06
, and androidx.wear.compose:compose-navigation:1.0.0-alpha06
are released . Версия 1.0.0-alpha06 содержит эти коммиты.
Новые возможности
- We have added Scaffold a top level application composable that provides a structure for handling PositionIndicators (like Scroll or Volume) position, an area at the top of the screen for displaying the time and application status, and also supports a Vignette to blur the screen top and bottom edge for scrollable content. The main area of the Scaffold is where the application contents are placed. ( I5e0bf )
- Added TimeText implementation for Wear Compose ( I5654c )
Wear Compose Navigation Library
We have added the first release of the Wear Compose Navigation library, which provides integration between the Wear Compose and Androidx Navigation libraries. It provides a simple means to navigate between @Composable functions as the destinations in your application.
This initial release provides:
- A
SwipeDismissableNavHost
composable that hosts a navigation graph and provides backwards navigation via swipe gestures -
NavGraphBuilder.composable
extension to assist with constructing navigation graphs -
rememberSwipeDismissableNavController()
to allow hoisting state
- A
Example usage where we create two screens and navigate between them:
val navController = rememberSwipeDismissableNavController() SwipeDismissableNavHost( navController = navController, startDestination = "start" ) { composable("start") { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, modifier = Modifier.fillMaxSize(), ) { Button(onClick = { navController.navigate("next") }) { Text("Go") } } } composable("next") { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, modifier = Modifier.fillMaxSize(), ) { Text("Swipe to go back") } } }
Wear Compose Navigation is packaged as a separate library so that simple WearCompose applications that implement their own hand-rolled navigation are not required to depend on the Androidx Navigation library.
Изменения API
- Updated
SwipeDismissableNavHost
to supportrememberSaveable
by setting the key identity for background and content ( I746fd ) - We have added a PositionIndicator adapter that can handle LazyListState ( I21b88 )
- Updated SwipeToDismissBox to support rememberSaveable ( Ie728b )
- We have added reverseLayout support to the ScalingLazyColumn. This allows for the reversing of the direction of scrolling and layout ( I9e2fc )
- Deprecated
performGesture
andGestureScope
, which have been replaced byperformTouchInput
andTouchInjectionScope
. ( Ia5f3f , b/190493367 ) - We have renamed VignetteValue to VignettePosition and renamed VignetteValue.Both renamed to VignettePosition.TopAndBottom. ( I57ad7 )
- We have renamed ScalingLazyColumnState to ScalingLazyListState, ScalingLazyColumnItemInfo to ScalingLazyListItemInfo, ScalingLazyColumnLayoutInfo to ScalingLazyListLayoutInfo and ScalingLazyColumnScope to ScalingLazyListScope in case we decide to add a ScalingLazyRow implementation in the future. ( I22734 )
Исправления ошибок
- Updated CompactChip documentation to describe what happens if neither an icon nor a label is provided. ( I4ba88 )
- We have made some adjustments to the Wear card components. ( I6b3d0 )
- TitleCard spacing between Title and Body reduced from 8.dp to 2.dp.
- TitleCard header font changed from body to title3.
- Card background gradient changed to make the background appear darker.
Версия 1.0.0-альфа05
September 1, 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha05
and androidx.wear.compose:compose-material:1.0.0-alpha05
are released. Версия 1.0.0-alpha05 содержит эти коммиты.
Изменения API
- Mark ArcPaddingValues as @Stable ( I57deb )
- ScalingLazyColumnState now implements the ScrollableState interface giving developers programmatic access to scroll the component. ( I47dbc )
Исправления ошибок
- We have reduced the spacing between Icon and Text in Chip and ToggleChip to bring them in line with updates to the UX Spec. ( I83802 )
Версия 1.0.0-альфа04
18 августа 2021 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha04
and androidx.wear.compose:compose-material:1.0.0-alpha04
are released. Версия 1.0.0-alpha04 содержит эти коммиты.
Новые возможности
- Added a SwipeToDismissBox and swipeable modifier that can be used to support a left-to-right swipe-to-dismiss gesture. Although independent of navigation components, this is expected to be used to exit one screen and navigate to another. Added integration tests to demo swipe-to-dismiss. ( I7bbaa )
- We have added ScalingLazyColumnItemInfo and ScalingLazyColumnLayoutInfo interfaces to ScalingLazyColumnState class to enable developers to know the actual positions and sizes of items in the ScalingLazyColumn after scaling has been applied. We have also fixed a bug with the way that scaling was calculated when 'top' content padding is applied to the ScalingLazyColumn. ( I27c07 )
Изменения API
- Add CurvedTextStyle class to specify curved text styling Options. Similar to TextStyle, but now only supports color, fontSize and background. More styling options will be added in the future. ( I96ac3 )
- We have added ScalingLazyColumnItemInfo and ScalingLazyColumnLayoutInfo interfaces to ScalingLazyColumnState class to enable developers to know the actual positions and sizes of items in the ScalingLazyColumn after scaling has been applied. We have also fixed a bug with the way that scaling was calculated when 'top' content padding is applied to the ScalingLazyColumn. ( I27c07 )
- Added
@ExperimentalWearMaterialApi
toSwipeDismissTarget
enum, part of theSwipeToDismissBox
API. ( I48b5e )
Исправления ошибок
- Added test material for SwipeToDismissBox ( I9febc )
Версия 1.0.0-альфа03
August 4, 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha03
and androidx.wear.compose:compose-material:1.0.0-alpha03
are released. Версия 1.0.0-alpha03 содержит эти коммиты.
Изменения API
- Added CurvedText component, that allows developers to easily write text following the curvature a circle (usually at the edge of a circular screen) ( Id1267 )
- We have renamed
CardDefaults.imageBackgroundPainter()
toCardDefaults.imageWithScrimBackgroundPainter()
to make it clear that the background image with have a scrim drawn over it. ( I53206 ) - Adding ScalingLazyColumn component that provides a list component for Wear Material that gives a fisheye view with the list contents scaling down in size and becoming transparent as they scale towards the edge of the component. ( I7070c )
Исправления ошибок
- We changed the default color of the appName content in AppCard in response to a UX Spec update. The default color for the appName is now
MaterialTheme.colors.onSurfaceVariant
. Additionally added a missing parameter doc description for the title slot. ( Ic4ad1 )
Версия 1.0.0-альфа02
July 21, 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha02
and androidx.wear.compose:compose-material:1.0.0-alpha02
are released. Версия 1.0.0-alpha02 содержит эти коммиты.
Новые возможности
- Added a new class CurvedRow to laid out composables in an arc ( I29941 )
- Added a new type of card for use in applications (TitleCard), also add support for having images as the background to Cards to emphasize their contents ( I53b0f )
Изменения API
- Add support for radial alignment to CurvedRow (similar to the vertical alignment in a row) ( Id9de5 )
- Add a new class CurvedRow to laid out composables in an arc ( I29941 )
- Added a new type of card for use in applications (TitleCard), also add support for having images as the background to Cards to emphasize their contents ( I53b0f )
- Added toggle icons (checkbox, switch and radio buttons) to ToggleChipDefaults to make it easier for developers to configure ToggleChip and SplitToggleChips ( I7b639 )
- The start and end content padding for Chips has been updated so that it is consistently 14.dp regardless of whether the Chip has an icon present or not (was previously 12.dp if icon present and 14.dp if not) ( I34c86 )
Исправления ошибок
- Add tests for CurvedRow ( I93cdb )
- Tying Wear Compose dependencies to Compose 1.0.0-rc01. ( Ie6bc9 )
- Changed the handing of background image painting in Cards and Chips so that the image is Cropped rather than being stretched in order to maintain image proportions. ( I29b41 )
- Added more demos and integration tests for Button and ToggleButton. ( 5e27ed2 )
- Added more Chip tests to cover the content colors for imageBackgroundChips ( Ia9183 )
Версия 1.0.0-альфа01
July 1, 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha01
and androidx.wear.compose:compose-material:1.0.0-alpha01
are released. Версия 1.0.0-alpha01 содержит эти коммиты.
Новые возможности
Wear Compose is a Kotlin, Compose-based library that supports Wear Material design, an extension of Material Design for WearOS wearables. This first alpha release contains early, functional implementations of the following:
- Material theme - configures the colors, typography and shapes consistently across the components used from this library.
- Chip, CompactChip - chips are stadium shaped and variations are available to take icon, label and secondary label content.
- - ToggleChip, SplitToggleChip - a specialized type of chip that includes a slot for a bi-state toggle icon such as a radio button or checkbox. In addition, the SplitToggleChip has two tappable areas, one clickable and one toggleable.
- Button, CompactButton - buttons are circular in shape, with a single content slot for an icon or minimal text (maximum 3 characters).
- ToggleButton - a button that turns an action on or off, with a single slot for icon or minimal text (maximum 3 characters).
- Card, AppCard - rectangular shaped with rounded corners, offering slots for content such as app icon, time, title and body.
Future releases will extend the Widget set adding support for Wear Material Design pickers, sliders, lists, page indicators, dialogs, scroll rsb indicators, toasts and more.
Additionally support will be provided for other Wearable Specific features such as curved layouts and text, as well as scaffolding to make it easy for developers to build Wearable apps/overlays.
Wear Compose Material is designed with the same principles as Compose Material, although being targeted at wearables. The Wear Compose Material library should be used in place of the Compose Material library when building for a Wearable device.
The two “Material” libraries should be considered mutually exclusive and should not be mixed in the same app. If developers find themselves including the Compose Material library in their dependencies it would suggest that either a) there are components missing from the Wear Compose Material library, please let us know what you need, or b) are using a component that we do not recommend for use on a Wearable Device.
,Wear Compose
Последнее обновление | Стабильный выпуск | Кандидат на выпуск | Бета-версия | Альфа-релиз |
---|---|---|---|---|
13 ноября 2024 г. | 1.4.0 | - | - | 1.5.0-alpha06 |
Объявление зависимостей
To add a dependency on Wear, you must add the Google Maven repository to your project. Для получения дополнительной информации прочтите репозиторий Google Maven .
Добавьте зависимости для нужных вам артефактов в файл build.gradle
для вашего приложения или модуля:
классный
dependencies { implementation "androidx.wear.compose:compose-foundation:1.4.0" // For Wear Material Design UX guidelines and specifications implementation "androidx.wear.compose:compose-material:1.4.0" // For integration between Wear Compose and Androidx Navigation libraries implementation "androidx.wear.compose:compose-navigation:1.4.0" // For Wear preview annotations implementation("androidx.wear.compose:compose-ui-tooling:1.4.0") // NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material. // androidx.wear.compose:compose-material is designed as a replacement // not an addition to androidx.compose.material:material. // If there are features from that you feel are missing from // androidx.wear.compose:compose-material please raise a bug to let us know. }
Котлин
dependencies { implementation("androidx.wear.compose:compose-foundation:1.4.0") // For Wear Material Design UX guidelines and specifications implementation("androidx.wear.compose:compose-material:1.4.0") // For integration between Wear Compose and Androidx Navigation libraries implementation("androidx.wear.compose:compose-navigation:1.4.0") // For Wear preview annotations implementation("androidx.wear.compose:compose-ui-tooling:1.4.0") // NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material. // androidx.wear.compose:compose-material is designed as a replacement // not an addition to androidx.compose.material:material. // If there are features from that you feel are missing from // androidx.wear.compose:compose-material please raise a bug to let us know. }
Дополнительные сведения о зависимостях см. в разделе Добавление зависимостей сборки .
Обратная связь
Ваши отзывы помогают сделать Jetpack лучше. Дайте нам знать, если вы обнаружите новые проблемы или у вас есть идеи по улучшению этой библиотеки. Пожалуйста, ознакомьтесь с существующими проблемами в этой библиотеке, прежде чем создавать новую. Вы можете добавить свой голос к существующей проблеме, нажав кнопку со звездочкой.
Дополнительную информацию см . в документации по системе отслеживания проблем .
Wear Compose Material3 Version 1.0
Version 1.0.0-alpha29
13 ноября 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha29
is released. Version 1.0.0-alpha29 contains these commits .
Изменения API
- We have updated
TimeText
to provide default content that shows the time. ( Id23b3 ) - We have simplified the
ScrollInfoProvider
forPagerState
by removing theorientation
parameter, which is no longer needed. The new behavior is forTimeText
to remain in place for both horizontal and vertical paging. ( I71767 ) -
LocalHapticFeedback
now provides a defaultHapticFeedback
implementation when the Vibrator API indicates that haptics are supported. The following have been added to theHapticFeedbackType
-Confirm
,ContextClick
,GestureEnd
,GestureThresholdActivate
,Reject
,SegmentFrequentTick
,SegmentTick
,ToggleOn
,ToggleOff
,VirtualKey
. Wear Compose long-clickable components such asButton
,IconButton
,TextButton
, andCard
now perform theLONG_PRESS
haptic when a long-click handler has been supplied. ( I5083d )
Исправления ошибок
- We have updated the motion for Confirmations. ( I04bff )
- We have updated the minimum API dependency to 1.7.4 for Compose libraries. ( I88b46 )
- New motion was added for the
OpenOnPhone
dialog. ( I1e10a ) - We have fixed a bug in the
LevelIndicator
so that it is now correctly displayed with the level is zero. ( Ie95a4 ) - We have updated the
HorizontalPageIndicator
andVerticalPageIndicator
animations. ( I5c8f3 ) - We have added a shrink-to-dot animation to the indeterminate
ArcProgressIndicator
. ( I9fd51 )
Version 1.0.0-alpha28
30 октября 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha28
is released. Version 1.0.0-alpha28 contains these commits .
Изменения API
- We have added an arc variation on the indeterminate circular progress indicator ( I2efc1 )
- We have made public the
AlertDialogContent
andDialog
composables that make up theAlertDialog
API, so that it is possible to add customization if necessary (such as customizingAlertDialog
animation whilst keeping the recommended content layout). In addition, we have addedModifier
andColor
parameters to theEdgeButton
,ConfirmButton
andDismissButton
members ofAlertDialogDefaults
. ( I4eb71 ) - We have updated the
Placeholder
API as follows: renamedPlaceholderState.startPlaceholderAnimation
toPlaceholderState.animatePlaceholder
,PlaceholderState.isShowContent
toPlaceholderState.isHidden
, andPlaceholderDefaults.shape
toPlaceholderDefaults.Shape
; renamed thepainter
parameter inpainterWithPlaceholderOverlayBackgroundBrush
tooriginalPainter
; changed visibility ofPlaceholderState.placeholderProgression
from public to internal and renamed it toplaceholderShimmerProgression
; added placeholder animation duration constants toPlaceholderDefaults
. ( Ie5a59 ) - We have updated the
EdgeButton
API as follows: renamed the parameter onScreenScaffold
frombottomButton
toedgeButton
; madeEdgeButtonSize
a value class. ( Ieef15 ) - We have changed the visibility of
copy()
to public in wear material3 Colors classes ( I0287f )
Исправления ошибок
- Added minimum animation duration for
IconToggleButton
andTextToggleButton
on click ( Ieb333 ) - Added minimum duration on
IconButton
andTextButton
shape animation ( Iebcee ) - Corrected the repeat option state of
DatePicker
. ( I3587c ) - Added motion for Alert and Confirmation dialogs. ( I173b1 )
Version 1.0.0-alpha27
16 октября 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha27
is released. Version 1.0.0-alpha27 contains these commits .
Изменения API
- We have updated the
ScreenScaffold
andScrollIndicator
following the renaming of Wear Compose FoundationLazyColumn
toTransformingLazyColumn
. ( I0608b ) -
EdgeButton
'spreferredHeight
parameter has been renamed tobuttonSize
and its value can only be chosen from 4 constants in the newly introducedEdgeButtonSize
value class. ( Icdd70 ) - We have changed the naming of
ListSubheader
toListSubHeader
and added publicly accessible default values forListHeader
andListSubHeader
. ( I96730 ) - We have added new
HorizontalPagerScaffold
andVerticalPagerScaffold
components for Wear which provide new animations and coordination between time text and page indicator components. ( Iff7d0 ) - We have added rotary support to
HorizontalPagerScaffold
andVerticalPagerScaffold
, enabling users to navigate pagers using rotary input devices. ( I9770d ) - We have made
MotionScheme
API changes to simplify the usage and improve consistency. Removed inlined remember functions and moved the built-in Motion Schemes to a dedicated MotionScheme companion object. Renamed thestandardMotionScheme
and theexpressiveMotionScheme
to standard and expressive. ( I5fd45 ) - We have added support for a dynamic color scheme based on system colors. ( I073e9 )
- We have updated the Stepper to the latest UX specs. ( I622bb )
Исправления ошибок
- We have updated typography and paddings for Card components. ( I3ae48 )
- We have changed the padding in
AlertDialog
between Confirm/Dismiss buttons and the rest of the content from 8dp to 12dp according to UX specs ( Ie55f0 ) - We have updated the color opacity for the Slider component. ( Idb383 )
Version 1.0.0-alpha26
2 октября 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha26
is released. Version 1.0.0-alpha26 contains these commits .
Изменения API
- We have updated the API and appearance of
HorizontalPageIndicator
and addedVerticalPageIndicator
for use withVerticalPager
( Ic9309 ) -
AlertDialog
now supports the ability to omit the default bottom button from the button stack variation, for custom layouts in which EdgeButton is not required. ( I34fa9 ) - We have added a
SwipeToReveal
component for Wear Material 3 ( Ic38b2 ) - We have added support for bi-directional swiping in
SwipeToReveal
, for rare cases where the current screen does not support swipe to dismiss. The default is still to swipe-to-reveal only on right-to-left swipes and it is strongly advised to respect the default behavior to avoid conflict with swipe to dismiss. ( Ifac04 ) - We have renamed
EdgeButton
'sbuttonHeight
parameter topreferredHeight
. ( I4fab3 ) - The Kotlin version has been updated to 1.9 ( I1a14c )
- We have renamed
OpenOnPhoneDialogDefaults.Icon
toOpenOnPhoneDialogDefaults.OpenOnPhoneIcon
to avoid clashing withIcon
( I0f391 ) - We have added support for
ScrollIndicator
inLazyColumn
. ( Ia546a ) - We have updated default values for
TextToggleButton
andIconToggleButton
. ( I7aaa9 ) - We have simplified the
Picker
andPickerGroup
API. ( Id0653 ) - We have added
CardDefaults.Shape
andCardDefaults.Height
, which (being tokens) were otherwise private to developers using the library. ( I1594a , b/347649765 ) - We have renamed the progress parameter for the binary segmented circular progress indicator to
segmentValue
. ( Ib72d9 ) - We have updated the colors and layout for Slider. ( Ic3eec )
Исправления ошибок
- We have updated the
openOnPhone
icon animation ( I66f85 ) - We are now using Google Symbols icons in
Slider
,TimePicker
andDatePicker
. ( I46c7c ) - We have updated the paddings in
Confirmation
andOpenOnPhoneDialog
. ( Iaa82e )
Version 1.0.0-alpha25
18 сентября 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha25
is released. Version 1.0.0-alpha25 contains these commits .
Изменения API
- We have added an Indeterminate circular progress indicator. ( I427a7 )
- We have added support for progress overflow (>100% progress) for both the
CircularProgressIndicator
and theSegmentedCircularProgressIndicator
. When the progress exceeds 1.0, this will be indicated by the newoverflowTrack
color. ( Iaaa3d ) - The round
IconToggleButton
andTextToggleButton
now support a new shape animation variation, in which different shapes represent checked, unchecked and pressed states. The earlier animated shape variation for the just pressed state continues to be supported. ( I29f03 ) - We have removed support for using
EdgeButton
withColumn
, due to the need to specify theEdgeButton
height explicitly inScreenScaffold
. ( Ie353d ) - We have added support for the Wear Compose
LazyColumn
with ourScreenScaffold
(and added an implementation ofScrollInfoProvider
forLazyColumnState
). ( Ib8d29 ) - We have combined
LocalTextMaxLines
,LocalTextAlign
,LocalTextOverflow
into a singleLocalTextConfiguration
composition local to provide a more scalable solution going forwards. ( I5edbc ) - We have added arc-large as an additional typescale, reserved for short header text strings at the very top or bottom of the screen, like in Confirmation overlays. ( I60e3e )
- We have added defaults to Button for recommended large and extra large icon sizes and content padding. ( I84675 )
Исправления ошибок
- We have updated the colors for
IconButton
andTextButton
. ( I48324 ) - We have changed the base Button overloads to be vertically center-aligned for consistency with other overloads. To restore the previous behavior, use
Modifier.align
from theRowScope
. ( I66e57 )
Version 1.0.0-alpha24
4 сентября 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha24
is released. Version 1.0.0-alpha24 contains these commits .
Изменения API
- We have added a Motion scheme into the Material3 theme. This will be used by components across the library to apply animation specifications such as springs for expressive motion. ( I54ff3 )
- We have added
AppScaffold
andScreenScaffold
components to the Material3 library, which include functionality to coordinate layering and transitions ofTimeText
andScrollIndicator
.AppScaffold
provides a top level of scaffold components that sit on top of all screens. As such, addingTimeText
to theAppScaffold
allows it to remain in place while swiping between screens. Screens can themselves override or hide the time text.ScreenScaffold
provides a slot for theScrollIndicator
and automatically animates the scroll indicator when scrolling, including timeout to hide the scroll indicator after inactivity. ( I047d6 ) - We have added
ScrollIndicator
featuring the new Material3 design. It has a fixed thumb size based on initial list contents, in order to avoid size variations when lazy content is loaded into the list. ( Ic228d ) - We have changed the
ScrollAway
API such thatScreenStage
is a value class instead of an enum class, to allow for additional stages to be added as needed going forwards. ( I48c93 ) - We have added
EdgeButton
, a distinctive Wear-specific button with a shape that follows the curvature of the bottom of the screen ( I16369 ) - We have added a new slot to the
ScreenScaffold
for a bottom button (such asEdgeButton
), that will be shown and resized depending on the scrolling content ( I032eb ) - We have added
Modifier.scrollTransform
andModifier.targetMorphingHeight
to add Material3 motion effects to items inLazyColumn
. ( Ie229a ) - We have added
SegmentedCircularProgressIndicator
as a variation onCircularProgressIndicator
. The segmented variation either shows a single progress value across all segments or shows each segment as being on/off. ( I6e059 ) - We have added
LinearProgressIndicator
as an alternative to the existingCircularProgressIndicator
. ( I89182 ) - We have added
AlertDialog
, providing layouts for presenting important prompts to the user. Variations are included for either a pair of confirm/dismiss buttons or a single bottom button (typically an EdgeButton) below a stack of options. Both variations have slots for icon, title and additional text to provide further details. ( Ieb873 ) - We have added
OpenOnPhoneDialog
, which should be used to indicate an action that will continue on the user's phone.OpenOnPhoneDialog
is dismissed after a specified timeout. ( I978fd ) - We have added
Confirmation
, a dialog component that has slots for an icon and either curved or linear text. Specific variations are provided for success/failure messages. Confirmations are automatically dismissed after a timeout. ( Ib43e8 ) - We have added a background to
TimeText
to mitigate issues where the underlying content and theTimeText
overlapped, and obscured the time. ( Ia11fd ) - We have added
LevelIndicator
, which shows the value of a setting such as volume, and can be used with the existingStepper
component to construct a volume screen.LevelIndicator
is similar toScrollIndicator
, but is displayed on the opposite side of the screen and has a wider stroke width and different indicator color by default. ( I8a4ac ) - We have added
TimePicker
, with layouts for 24 hour time (with or without seconds), or 12 hour time with am/pm selection. ( Ia5124 ) - We have added
DatePicker
, with configuration for column ordering (ie day-month-year, month-day-year or year-month-day) and optional min/max dates. ( Ibf13b ) - We have added a weight parameter to the
TimeText
'stext
function. In cases where TimeText is made up of more than one text element, this allows control over how the space is distributed. ( I36700 ) - We have added
RadioButton
andSplitRadioButton
- these components simplify the previous API by combining both the (Split)SelectableButton
and the child radio control ( If7ae8 ) - We have added
CheckboxButton
andSplitCheckboxButton
- these components simplify the previous API by combining both the (Split)ToggleButton
and the child Checkbox control ( Ia8f70 ) - We have added
SwitchButton
andSplitSwitchButton
- these components simplify the previous API by combining both the(Split)ToggleButton
and the child Switch control ( I0d349 ) - We have updated
AnimatedText
documentation to explain overshooting behavior. ( Iff30a ) - We have added
ButtonGroup
to combine 2 or 3 buttons such that button presses produce a coordinated animation. ( Ie27db ) - We have added optional shape animation for
IconButton
andTextButton
when pressed. ( Iffca5 ) - We have added an additional color variation,
FilledVariant
, toButton
,IconButton
,TextButton
,CompactButton
andEdgeButton
( I65fc3 ) - We have added the
forcedSize
parameter toImageWithScrimPainter
, such that Button image backgrounds now maintain their component size by default. Setting theforcedSize = null
adopts thePainter.instrinsicSize
instead. ( Ic57af ) - We have added long-click to Buttons ( Ib613d )
- Long click support has also been added to
IconButton
andTextButton
. ( I38891 ) - Long click support has been added to Cards. ( I305d5 )
- We have added
LocalTextMaxLines
,LocalTextAlign
,LocalTextOverflow
asCompositionLocals
and used them as parameter defaults onText
. The composition locals can now be used by components such asCheckboxButton
,SwitchButton
,RadioButton
to implement UX guidance, but the parameters can be overridden by developers if necessary. ( Iab841 ) - We have added
Placeholder
to help in masking the content of components like buttons & cards until the data is loaded. ( I1a532 ) - We have added
IconToggleButtonColors
andTextToggleButtonColors
to replace the now removedToggleButtonColors
. ( Ie0bf1 )
Исправления ошибок
- We have updated
Button
,FilledTonalButton
,OutlinedButton
,ChildButton
,CompactButton
to use the newCompositionLocals
LocalTextMaxLines
,LocalTextAlign
,LocalTextOverflow
to implement UX guidance - these parameters can be overridden by developers on Text directly if necessary ( Ie51f7 ) - We have changed the default stroke width of the
LevelIndicator
to6dp
to differentiate it from theScrollIndicator
which has a stroke width of4dp
. ( If6f63 ) - We have fixed an issue in
TimeText
so that larger sweep angles are supported. ( Ie489f ) - Fixed an issue during
EdgeButton
recomposition. ( I4cdca ) - Corrected layouts of split toggle buttons when customized content padding is provided. ( Ia33d3 )
- Rounded up small progress values to at least the line width of the progress indicator. ( I3bd84 )
Version 1.0.0-alpha23
14 мая 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha23
is released. Version 1.0.0-alpha23 contains these commits .
Изменения API
- We have updated
ToggleButton
andRadioButton
APIs such that disabled colors can be configured. ( If13a7 ) - We have added a new
CircularProgressIndicator
for Material3. ( Ib3bd7 )
Исправления ошибок
- We have fixed a bug where selectable buttons announced double tap to toggle when already selected. ( I7ed88 )
Version 1.0.0-alpha22
1 мая 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha22
is released. Version 1.0.0-alpha22 contains these commits .
Изменения API
- We have updated the Material3
ColorScheme
. ( I7b2b8 ) - We have updated the Material3 Switch - as well as some color changes, the tick now matches that used for the Checkbox. ( Icac7b )
Исправления ошибок
- Update all integration demos to use new
rotaryScrollable
modifier. ( I25090 )
Version 1.0.0-alpha21
17 апреля 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha21
is released. Version 1.0.0-alpha21 contains these commits .
- This release was triggered due to a technical issue in the previous release that resulted in missing source jars. There are no new commits in this release.
Version 1.0.0-alpha20
3 апреля 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha20
is released. Version 1.0.0-alpha20 contains these commits .
Исправления ошибок
- We have adjusted the Ripple pressed and focused state alphas for contrast. ( I59f0a )
- We have added spacing between primary and secondary labels in
Button
,ToggleButton
andRadioButton
, following the latest changes to typography styles and line heights. ( I2c0ba )
Version 1.0.0-alpha19
6 марта 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha19
is released. Version 1.0.0-alpha19 contains these commits .
Изменения API
- We have added
TimeText
to the Wear Compose Material3 library. This component shows the current time (and additional status) at the top of the screen. The new, concise Material3 API avoids duplication between linear and curved content. ( I4d7c3 ) - We have updated parameter names from
onSelected
toonSelect
forRadioButton
. ( I1a971 ) - Tokenize
RadioButton
andSplitRadioButton
and also refactor the existing methods to reduce the amount ofCompositionLocal
lookup by adding cached instances of colors, and making methods ofRadioButtonColors
andSplitRadioButtonColors
internal. ( I02b33 )
Version 1.0.0-alpha18
21 февраля 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha18
is released. Version 1.0.0-alpha18 contains these commits.
Изменения API
- We have refactored the defaults pattern for
CardColors
,ToggleButtonColors
andSplitToggleButtonColors
by creating cached instances internally and reducing the usage ofCompositionLocal
. ( If3fec )
Version 1.0.0-alpha17
7 февраля 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha17
is released. Version 1.0.0-alpha17 contains these commits.
Изменения API
- We have updated the Button API to use
buttonColors
by default and removed the duplicatefilledButtonColors
. ( I4fe3b ) - We have refactored default patterns for
ButtonColors
,IconButtonColors
andTextButtonColors
by creating a cached instance internally and reducing the usage ofCompositionLocal
. ( I5f51c ) - We have removed the overhead of
rememberUpdatedState
in Component specific color classes and marked accessor methods inside color classes as internal. ( If6571 )
Исправления ошибок
- We have updated
Modifier.minimumInteractiveComponentSize
to useModifier.node
. ( Iba6b7 )
Version 1.0.0-alpha16
24 января 2024 г.
androidx.wear.compose:compose-material3:1.0.0-alpha16
is released. Version 1.0.0-alpha16 contains these commits.
Новые возможности
- We have added
CompactButton
, which can use the same filled, filled tonal and outlined colors as Button.( I05df0 )
Изменения API
- We have added
RadioButton
/SplitRadioButton
as containers for selection controls, such as the Radio control. This differs from the existingToggleButton
in thatRadioButton
is selectable (and operates within a selection group) whereasToggleButton
is toggleable (and is independent). ( I61275 ) - We are removing
LocalContentAlpha
from the Wear Compose Material3 library for consistency with the Compose Material3 library. ( I49a0a ) - Wear material and wear material3 components exposing a
MutableInteractionSource
in their API have been updated to now expose a nullableMutableInteractionSource
that defaults to null. There are no semantic changes here: passing null means that you do not wish to hoist theMutableInteractionSource
, and it will be created inside the component if needed. Changing to null allows for some components to never allocate aMutableInteractionSource
, and allows for other components to only lazily create an instance when they need to, which improves performance across these components. If you are not using theMutableInteractionSource
you pass to these components, it is recommended that you pass null instead. It is also recommended that you make similar changes in your own components. ( Ib90fc , b/298048146 ) - Adds new ripple API in
wear:compose-material
andwear:compose-material3
libraries which replaces the deprecatedrememberRipple
. Also adds a temporaryCompositionLocal
,LocalUseFallbackRippleImplementation
, to revert Material components to using the deprecatedrememberRipple/RippleTheme
APIs. This will be removed in the next stable release, and is only intended to be a temporary migration aid for cases where you are providing a customRippleTheme
. See developer.android.com for migration information and more background information behind this change. ( af92b21 ) - We have made minor improvements to the
HorizontalPageIndicator
api and its documentation. ( I60efc ) - We have updated
ColorScheme
to be immutable, making individual color updates less efficient, but making more common usage of colors more efficient. The reasoning behind this change is that the majority of apps wouldn't have updating individual colors as a main use case. This is still possible but it will recompose more than before, in turn we significantly decrease the amount of state subscriptions through all of material code and will impact initialization and runtime cost of more standard use cases. ( Ibc2d6 ) - Updated
ToggleButton
andSplitToggleButton
APIs to allow disabled colors to be customized. In addition, Material Design tokens are now used for color and typography values. ( If087c ) - Updated Button image background colors to use Material Design tokens. ( Iba215 )
- We have changed the
Checkbox
,Switch
andRadioButton
components to be display-only, by removing the click handling. These components are expected to be used in(Split)ToggleButton
which handles the click, so the components are now more clearly indicated as display-only (and are not intended for standalone use on Wear). ( I2322e )
Исправления ошибок
- We have added tokens for motion values of durations and easings in Wear Compose Material 3. ( I437cd )
- We have fixed a bug in the
ToggleButton
,SplitToggleButton
,Checkbox
,Switch
andRadioButton
so that accessibility announcements are not repeated (previously, semantic roles were duplicated). ( Ica281 ) - We have removed the materialcore layer for
CompactButton
to improve performance. ( 7902858 )
Version 1.0.0-alpha15
15 ноября 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha15
is released. Version 1.0.0-alpha15 contains these commits.
Изменения API
- We have renamed the Foundation level
SwipeToDismissBox
toBasicSwipeToDismissBox
. This makes the distinction clearer between the Foundation level component and the Material3 levelSwipeToDismissBox
. The latter pulls colors from theMaterialTheme
to be used in scrims and delegates the remaining implementation to theBasicSwipeToDismissBox
. ( Ibecfc )
Исправления ошибок
- We have removed the material-core layer for Material3 Button to improve performance. ( I55555 )
Version 1.0.0-alpha14
18 октября 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha14
is released. Version 1.0.0-alpha14 contains these commits.
Изменения API
- We have removed the
indicatorStyle
parameter from the Material3HorizontalPageIndicator
- instead, it will follow the device screen shape (linear or round). ( I83728 ) - We have separated the colors for
SplitToggleButton
from those forToggleButton
, by adding a newSplitToggleButtonColors
class. ( I78bee )
Version 1.0.0-alpha13
4 октября 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha13
is released. Version 1.0.0-alpha13 contains these commits.
Изменения API
- We have added an optional Subtitle field to
TitleCard
. ( Ifc45a ) - We have added Material Design color tokens for
TextButton
. ( I769dc )
Version 1.0.0-alpha12
20 сентября 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha12
is released. Version 1.0.0-alpha12 contains these commits.
Изменения API
- We have updated
IconButton
to use Material Design tokens. ( I3f137 ) - We have updated
IconToggleButton
to use Material Design tokens. ( I7d263 ) - We have made public the constructors of
CheckboxColors
,RadioButtonColors
,SwitchColors
. ( I82b73 )
Версия 1.0.0-альфа11
6 сентября 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha11
is released. Version 1.0.0-alpha11 contains these commits.
Исправления ошибок
- We update updated the typography for Material3 Cards to
TitleMedium
. ( I597bd ) - We have updated the typography and alignment for our Material3
ListHeader
andListSubheader
. ( Ib5ceb )
Версия 1.0.0-альфа10
23 августа 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha10
is released. Version 1.0.0-alpha10 contains these commits.
Новые возможности
- Add
HorizontalPageIndicator
in Wear Material3 library. ( Ifee99 )
Изменения API
- Update Buttons code to use Material3 design tokens. ( I92fe4 )
- Declaring Wear Material 3 Stepper and Slider APIs as experimental as the details of the user interface are still being finalized. ( I84d54 )
- We have removed the
ExtraSmall
sizes from the roundTextButton
andTextToggleButton
as that size only applies to theIconButton
. ( Ibc7d5 )
Исправления ошибок
- We have updated the guidance on typography for TextToggleButton to use LabelLarge for LargeButtonSize ( Ib10fa )
- We have updated the guidance on typography for TextButton to use LabelLarge for LargeButtonSize ( I8f3a7 )
- We have set the Card's minimum touch target to be 48dp for accessibility. ( Ieb9b1 )
- Add AppCard with image demo, removing AppCard with Background demo ( Id735f )
- Fix a bug in round buttons where modifiers were not chained correctly. ( I5e162 )
Версия 1.0.0-альфа09
9 августа 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha09
is released. Version 1.0.0-alpha09 contains these commits.
Новые возможности
- We have added
ToggleButton
for material3 ( I6bed6 )
Изменения API
- We have turned on the
FloatRange
annotation as API constraints , which were previously stated in comments. ( Icb401 ) - We have updated the typography for Wear Material3 to adhere to the latest Material3 guidelines. ( I1bad6 )
Исправления ошибок
- We have updated the colors for
Button
,IconButton
andTextButton
in line with Material3 design. ( Ib2495 ) - We have fixed checkbox tick visibility in disabled states. ( Ib25bf )
Версия 1.0.0-альфа08
26 июля 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha08
is released. Version 1.0.0-alpha08 contains these commits.
Новые возможности
- We have added the following selection controls for Material3 -
Switch
,Checkbox
,RadioButton
. ( Ib918c ) - We have added
IconToggleButton
andTextToggleButton
to Material3, a circular toggle button with a single slot for icon and text respectively. For different sizes ofToggleButton
, we recommend usingModifier.touchTargetAwareSize
with the sizes provided in respective toggle buttons. ( I9f015 ) - We have added
ListHeader
andListSubheader
to our Material3 components. ( Ibaefe ) - We have added Material3
SwipeToDismissBox
, which calls the new FoundationSwipeToDismissBox
and supplies default color values from its theme. ( I275fb ) - We have added the Material3
InlineSlider
to Wear Compose. It allows users to make a selection from a range of values. The range of selections is shown as a bar between the minimum and maximum values of the range, from which users may select a single value.InlineSlider
is ideal for adjusting settings such as volume or brightness. ( I7085f )
Изменения API
- We have updated the Shapes in Wear Material 3 theme to use
RoundedCornerShape
based instead of Shape. ( Idb133 ) - We have made the height constants for Button public ( Idbfde )
- Updated API files to annotate compatibility suppression ( I8e87a , b/287516207 )
- We have updated
InlineSliderColors
in Wear Compose Material 3 to have public constructor and public properties. ( I6b632 ) - We have updated all color classes in Wear Compose Material 3 to have public constructors and public properties. ( I17702 )
- We have made Button horizontal and vertical padding constants public. ( Ieeaf7 )
Исправления ошибок
- Button will now adjust its height to accommodate content that has grown due to large fonts for accessibility, when required ( Iaf302 )
- We have updated a number of Button demos to address accessibility issues. ( I61ce9 )
-
Stepper
andInlineSlider
now support repeated clicks on long press so that you can quickly increase/decrease value ofStepper
andInlineSlider
by holding the + or - buttons ( I27359 )
Версия 1.0.0-альфа07
21 июня 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha07
is released. Версия 1.0.0-alpha07 содержит эти коммиты.
Новые возможности
- We have added the
Stepper
component to our Compose for Wear OS Material 3 library. This is similar to the previous Material version, but omits range semantics by default, following developer feedback. We provideModifier.rangeSemantics
the cases where range semantics are required. ( Ic39fd ) - We have added
curvedText
to our Compose for Wear OS Material 3 library. ( Ia8ae3 )
Исправления ошибок
- We have update
wear.compose.foundation
to be an API dependency ofwear.compose.material3
( I72004 , b/285404743 )
Версия 1.0.0-альфа06
7 июня 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha06
is released. Версия 1.0.0-alpha06 содержит эти коммиты.
Исправления ошибок
- We have updated
TextButton
to use thetoDisabledColor
extension function for correct disabled alpha values. ( I814c8 )
Версия 1.0.0-альфа05
24 мая 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha05
is released. Версия 1.0.0-alpha05 содержит эти коммиты.
Новые возможности
- We have added
TextButton
to Material3, a circular button with a single slot for text. For different sizes ofTextButton
, we recommend usingModifier.touchTargetAwareSize
andExtraSmallButtonSize
,SmallButtonSize
,DefaultButtonSize
andLargeButtonSizeIcon
provided inTextButtonDefaults
. The defaultTextButton
has no border and a transparent background for low emphasis actions. For actions that require high emphasis, usefilledTextButtonColors
; for a medium-emphasis, outlinedTextButton
, set the border toButtonDefaults.outlinedButtonBorder
; for a middle ground between outlined and filled, usefilledTonalTextButtonColors
. ( I667e4 ) - We have added
Card
,OutlinedCard
,AppCard
andTitleCard
into the Wear Compose Material3 library.AppCard
andTitleCard
can also be given the outlined appearance usingCardDefaults.outlinedCardColors
andCardDefaults.outlinedCardBorder
( I80e72 )
Изменения API
- We have moved the Button label parameter to the end to support trailing lambda syntax and removed the role parameter (as this can be overridden using
Modifier.semantics
).ButtonColors
constructors are now public. ( Ie1b6d )
Версия 1.0.0-альфа04
10 мая 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha04
is released. Версия 1.0.0-alpha04 содержит эти коммиты.
Новые возможности
- We have added
IconButton
to Material3, a circular button with a single slot for icon/image. There are four variations:IconButton
,FilledIconButton
,FilledTonalIconButton
andOutlinedIconButton
. For different sizes ofIconButton
, we recommend usingModifier.touchTargetAwareSize
andExtraSmallButtonSize
,SmallButtonSize
,DefaultButtonSize
andLargeButtonSizeIcon
provided inIconButtonDefaults
. We also provideIconButtonDefaults.iconSizeFor
to determine the recommended icon size for a given button size. ( I721d4 )
Версия 1.0.0-альфа03
19 апреля 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha03
is released. Версия 1.0.0-alpha03 содержит эти коммиты.
Изменения API
- We have added the Material 3 Button component - this is our stadium-shaped button and was formerly named Chip in the Wear Compose Material library (it has been renamed to Button for consistency with the Compose Material 3 library). The default Button has a filled background and there are button variations for
FilledTonal
(muted background), Outlined (transparent with a thin border) and Child (transparent background and no border, used for supplementary actions with the lowest amount of prominence). Round buttons for simple icon and text content will follow in a future release.( Ia6942 )
Версия 1.0.0-альфа02
5 апреля 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha02
is released. Версия 1.0.0-alpha02 содержит эти коммиты.
Исправления ошибок
- We have added a
DefaultTextStyle
to Wear Compose Material 3 which defaults thePlatformTextStyle.includeFontPadding
to true (the current setting). This will allow us to synchronize turning off font padding by default with the Compose libraries in the future (see Fix font padding in Compose for background ). ( I7e461 )
Версия 1.0.0-альфа01
22 марта 2023 г.
androidx.wear.compose:compose-material3:1.0.0-alpha01
is released. Версия 1.0.0-alpha01 содержит эти коммиты.
Новые возможности
Material 3 is the next evolution of Material Design and includes updated theming and redesigned components. Material 3 on Wear Compose is designed to be cohesive with the Material 3 Compose library on Android. This first alpha release contains early, functional implementations of the following:
We will continue to develop Wear Material (
androidx.wear.compose:compose-material
) and Wear Material 3 (androidx.wear.compose:compose-material3
) in parallel. Future material3 releases will extend the widget set to include other familiar components from Compose for Wear OS, such as buttons, pickers, and sliders.The Wear Material and Wear Material 3 libraries are mutually exclusive and should not be mixed in the same app, primarily because they reference different themes which would lead to unexpected inconsistencies.
Wear Compose Version 1.5
Version 1.5.0-alpha06
13 ноября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha06
is released. Version 1.5.0-alpha06 contains these commits .
Изменения API
- We have simplified the
ScrollInfoProvider
forPagerState
by removing theorientation
parameter, which is no longer needed. The new behavior is forTimeText
to remain in place for both horizontal and vertical paging. ( I71767 ) -
TransformingLazyColumn
was introduced in earlier releases. We are now removing Wear'sLazyColumn
aliases (which were forwarding toTransformingLazyColumn
) in favor of the new nameTransformingLazyColumn
. We have also removedTransformingLazyColumnVisibleItemInfo
'sheight
property - please usemeasuredHeight
instead. ( I0ea1e ) - We have changed the
PagerDefaults.snapFlingBehavior
snapAnimationSpec
from aTween
to aSpring
spec.( I10d02 , b/349781047 , b/303807950 ) - We have promoted the
LocalReduceMotion
CompositionLocal
to stable ( Ia6f32 )
Исправления ошибок
- We have updated
Modifier.rotaryScrollable
to usefocusTargetWithSemantics
for better semantics support in rotary. ( Ief0a0 ) - We have updated the minimum API dependency to 1.7.4 for Compose libraries. ( I88b46 )
- We have disabled width morphing in
TransformingLazyColumn
as a workaround to a clipping bug. ( I3dfb8 ) - We have fixed a bug that caused disappearing items after overscroll with
TransformingLazyColumn
( Id7668 ) - We have added
LazyLayoutSemantics
forTransformingLazyColumn
. ( Ia8f56 )
Version 1.5.0-alpha05
30 октября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha05
is released. Version 1.5.0-alpha05 contains these commits .
Изменения API
- We have added support for
animateScrollTo
onTransformingLazyColumnState
so that scrolling to an item can be animated. ( I4097d ) - We have added
requestScrollTo
onTransformingLazyColumnState
to defer scrolling to the next measurement. ( I20a5e ) - We have added support for
contentPadding
inTransformingLazyColumn
. ( I3a69c )
Исправления ошибок
- We have fixed a bug in rendering the
TransformingLazyColumn
when the content height is shorter than the screen height. ( I6c3e1 ) - The
ScrollInfoProvder
forTransformingLazyColumn
now correctly tracks the first item. ( I1e4a3 ) -
TransformingLazyColumnState
now saves its state (anchorItemIndex
andanchorItemScrollOffset
). ( I3d265 )
Version 1.5.0-alpha04
16 октября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha04
is released. Version 1.5.0-alpha04 contains these commits .
Изменения API
- We have renamed the Wear Compose Foundation
LazyColumn
toTransformingLazyColumn
so that the distinction is clearer between this and the Compose FoundationLazyColumn
. ( I0608b ) - Added rotary support for Horizontal/Vertical pagers, enabling users to navigate pagers using rotary input devices. ( I9770d )
- We have updated the new
PagerDefaults
to make clear that the pager will snap-to-page by default. ( Iff7d0 ) -
TransformingLazyColumnItemScrollProgress
is now a value class which should improve the performance. ( Ic399e ) -
TransformingLazyColumn
now supports rotary out of the box. ( I05206 ) -
TransformingLazyColumnState
now supportsscrollToItem
. ( I507b3 ) - Removed
@ExperimentalWearFoundationApi
fromSwipeToReveal
API ( I34a66 )
Version 1.5.0-alpha03
2 октября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha03
is released. Version 1.5.0-alpha03 contains these commits .
Изменения API
- We have added support for bi-directional swiping in
SwipeToReveal
, for rare cases where the current screen does not support swipe to dismiss. . The default is still to swipe-to-reveal only on right-to-left swipes and it is strongly advised to respect the default behavior to avoid conflict with swipe to dismiss. ( Ifac04 ) - We have updated
LazyColumnState
to overridecanScrollForward
andcanScrollBackward
- this now stops scrolling when the first or last item is exactly at the center of the screen. ( Ia77d7 ) - We have added new
HorizontalPager
andVerticalPager
components which address common issues, such as focus handling and interacting with system swipe to dismiss that could occur on Wear. ( I2902b ) - We have added support for
LazyColumn
to expose the client'skey
andcontentType
throughlayoutItems
. ( I1bd9c )
Исправления ошибок
- We have updated the curved text animations to be smoother, using paint flags. ( I73a15 )
- We have updated the Material Dialog documentation to reflect that
onDismissRequest
is not called after show flag is set to false. ( Ifd8d6 ) - We have fixed a bug with the vignette animation in the Material Dialog ( I126bf )
Version 1.5.0-alpha02
18 сентября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha02
is released. Version 1.5.0-alpha02 contains these commits .
Изменения API
- We have added support for the Wear Compose
LazyColumn
with ourScreenScaffold
(and added an implementation ofScrollInfoProvider
forLazyColumnState
). ( Ib8d29 ) - We have added
viewportSize
toLazyColumnLayoutInfo
. ( I4187f )
Исправления ошибок
- We have fixed a bug so that rotary scrolling is now disabled in
ScalingLazyColumn
when theuserScrollEnabled
flag is set tofalse
. ( I490ab , b/360295825 ) - We have made a bug fix to address unexpected vertical padding on curved text. The curved text height now more closely matches the actual space used by the text. Please note that this is likely to break screenshot tests that involve curved text ( Iaa6ef )
- We have reverted a bug fix to
Dialog
where theonDismissRequest
callback was called whenshowDialog
was set to false, because in some cases this resulted inonDismissRequest
being called multiple times. ( I64656 )
Версия 1.5.0-альфа01
4 сентября 2024 г.
androidx.wear.compose:compose-*:1.5.0-alpha01
is released. Version 1.5.0-alpha01 contains these commits .
Изменения API
- We have added a new
LazyColumn
into the Wear Compose Foundation library with associatedLazyColumnState
andLazyColumnScope
APIs. This serves as the foundation for building customisable scaling and morphing effects with Wear Compose. ( Ib3b22 ) - We have added an indexed version of
itemsIndexed
intoLazyColumnScope
as part of the newLazyColumn
API. ( Ib4a57 ) - We have added
LazyColumn
modifiers in order to support scaling and morphing behaviors. ( Ie229a ) -
HierarchicalFocusCoordinator
has been promoted to stable. ( I31035 ) - We have added support for letter spacing to curved text. ( I3c740 )
- Added a
rotationLocked
parameter toCurvedLayout.curvedComposable
to stop components being rotated. ( I66898 ) - The temporary
LocalUseFallbackRippleImplementation
API from wear material and wear material3 has been removed ( I62282 ) - Removed
WearDevices.SQUARE
from the@WearPreviewDevices
multi-preview ( I11c02 )
Исправления ошибок
-
SwipeToReveal
now positions the revealed items on the visible portion of the screen, this helps whenSwipeToReveal
is used within a list, so the items are always interactable and never fall outside the screen. ( I38929 ) -
SwipeToReveal
now resets thelastActionType
to None whenanimatedTo
has completed. ( I59b03 ) - Improved the documentation for the new
rotationLocked
parameter oncurvedComposable
. ( Ifbd57 ) - Fixed a crash when passing
NaN
intoScalingLazyColumnSnapFlingBehavior
'sperformFling
. ( Ic13da ) - Fixed bug on curved layout size modifier ( I0fedf )
- We have added support for letter spacing specified in 'sp'. ( I9f6e3 )
- We have fixed a bug in Material2 Dialog where the
onDismissRequest
callback was not being called when the dialog became invisible ( I64656 ) -
LayoutCoordinates.introducesFrameOfReference
переименован вLayoutCoordinates.introducesMotionFrameOfReference
чтобы лучше отражать его назначение. Связанная функция переименована для расчета координат на основе этого флага. ( I3a330 )
Версия 1.4
Версия 1.4.0
4 сентября 2024 г.
androidx.wear.compose:compose-*:1.4.0
is released. Version 1.4.0 contains these commits .
Important changes since 1.3.0
-
ScalingLazyColumn
andPicker
now support rotary input by default - it is recommended to remove explicit rotary handling and defer to the default system behavior. If necessary, use therotaryScrollableBehavior
parameter to configure either scroll or snap behavior - for snap behavior, it is recommended to provide snap behavior and touch scrolling capabilities using theflingBehavior
parameter. -
Modifier.rotaryScrollable
is a new modifier that connects rotary events with scrollable containers, allowing users to scroll using a crown or a rotating bezel on their Wear OS device. -
SwipeDismissableNavHost
now provides an entry animation for in-app transitions. -
PositionIndicator
is now shown by default when a screen is first displayed.
Additional changes
- For a more complete set of the changes introduced in version 1.3.0, see the beta01 release notes .
Версия 1.4.0-rc01
21 августа 2024 г.
androidx.wear.compose:compose-*:1.4.0-rc01
is released. Version 1.4.0-rc01 contains these commits .
- We have updated the Compose dependencies to 1.7.0-rc01 and pinned Wear Compose Navigation to androidx.lifecycle 2.8.3
Version 1.4.0-beta03
12 июня 2024 г.
androidx.wear.compose:compose-*:1.4.0-beta03
is released. Version 1.4.0-beta03 contains these commits .
Исправления ошибок
- We have updated
Modifier.rotaryScrollable
to replace use of 'focusable' with 'focusTarget' which improves performance. ( Id294b ) - We have fixed an issue where the
ProgressIndicator
repeated its announcement underTalkBack
. ( I94563 ) - We have updated the Wear Compose library baseline profiles. ( I3cbc3 )
Version 1.4.0-beta02
29 мая 2024 г.
androidx.wear.compose:compose-*:1.4.0-beta02
is released. Version 1.4.0-beta02 contains these commits .
Исправления ошибок
- We have increased the boundary width passed to screen readers from curved text in order to address issues with truncation ( Id865f ).
- We have constrained the boundary of the
HorizontalPageIndicator
that was passed to screen readers - previously the indicator occupied the full screen ( Id8d7a ).
Версия 1.4.0-бета01
14 мая 2024 г.
androidx.wear.compose:compose-*:1.4.0-beta01
is released. Version 1.4.0-beta01 contains these commits .
The 1.4-beta01 release of Compose for Wear OS indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Compose 1.4 includes the following new functionality:
- We have added
Modifier.rotaryScrollable
, a new modifier that connects rotary events with scrollable containers, allowing users to scroll via a crown or a rotating bezel on their Wear OS device. In addition,ScalingLazyColumn
andPicker
now support rotary input by default. Use therotaryScrollableBehavior
parameter to configure either scroll or snap behavior. For snap behavior, it is recommended to provide snap via theflingBehavior
parameter as well for touch scrolling. -
SwipeDismissableNavHost
now provides an entry animation for in-app transitions. -
PositionIndicator
is now shown by default when a screen is first displayed. -
SelectableChip
andSplitSelectableChip
have been added as a variation onToggleChip
- use this withRadioButton
in order to provide selectable semantics instead of toggleable semantics for accessibility -
ListHeader
now supports height adjustments when contents need extra height to accommodate large font sizes.
Исправления ошибок
- We have fixed a bug where selectable chips announced double tap to toggle when already selected. ( I7ed88 )
Version 1.4.0-alpha08
1 мая 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha08
is released. Version 1.4.0-alpha08 contains these commits .
Изменения API
- We have made the following changes to the new rotary API: renamed
Modifier.rotary
toModifier.rotaryScrollable
; renamed theRotaryBehavior
interface toRotaryScrollableBehavior
and its functionhandleScrollEvent
toperformScroll
; renamedRotaryScrollableAdapter
toRotaryScrollableLayoutInfoProvider
and removed thescrollableState
property. ( I0c8a6 ) - We have made additional changes to the rotary API: renamed
RotaryScrollableLayoutInfoProvider
toRotarySnapLayoutInfoProvider
(because this provider is only needed for rotary with snap); changed the type of thesnapOffset
parameter inRotaryScrollableDefaults.snapBehavior snapOffset
from Int to Dp. ( Iddebe ) - We have renamed the
clickInteractionSource
parameter onSplitSelectableChip
tocontainerInteractionSource
. ( Ia8f84 ) - We have updated the click callback parameter names for
SplitSelectableChip
- fromonClick
toonSelectionClick
and fromonBodyClick
toonContainerClick
. ( I32237 )
Исправления ошибок
- We have updated the horizontal padding for
PositionIndicator
to 2dp (was 5dp), in order to fix a bug where thePositionIndicator
(scroll bar) overlaps scrollable content. Please note that this change is expected to break existing screenshots that include thePositionIndicator
due to the change of padding. ( I57472 ) - We have improved the documentation for the new rotary API by describing the differences between low-res and hi-res rotary devices. ( I63abe )
- We have addressed an out-of-range exception in
SwipeDismissableNavHost
that could be triggered when interpolated alpha values were less than zero. ( Ib75a1 , b/335782510 )
Version 1.4.0-alpha07
17 апреля 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha07
is released. Version 1.4.0-alpha07 contains these commits .
Изменения API
- We have added
Modifier.rotary
, a new modifier that connects rotary events with scrollable containers, allowing users to scroll via a crown or a rotating bezel on their Wear OS device. In addition,ScalingLazyColumn
and Picker now support rotary input by default, with new overloads that include therotaryBehavior
parameter for specifying the configuration of either scroll or snap. If therotaryBehavior
parameter is set to snap, then it is recommended to provide snap via theflingBehavior
parameter as well, for touch scrolling. ( I2ef6f ) -
NestedScroll
sources Drag and Fling are being replaced byUserInput
andSideEffect
to accommodate for the extended definition of these sources that now include animations (Side Effect) and Mouse Wheel and Keyboard (UserInput). ( I40579 ) - We have added
SelectableChip
andSplitSelectableChip
to make the distinction clearer between toggle controls such asSwitch/Checkbox
and selectable controls such asRadioButton
. This replaces the previously added overloads ofToggleChip/SplitToggleChip
withselectionControl
parameters. ( Ia0217 ) - Updated visibility modifier of
IndeterminateStrokeWidth
inProgressIndicatorDefaults
to public. ( I5b5a4 )
Version 1.4.0-alpha06
3 апреля 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha06
is released. Version 1.4.0-alpha06 contains these commits .
Исправления ошибок
- We have added an internal draft of rotary support, as part of the larger effort of migrating Rotary behavior into AndroidX from Horologist. ( I617d1 )
- We have added an internal draft of haptics support, as part of the larger effort of migrating Rotary behavior into AndroidX from Horologist. ( I5568a )
Версия 1.4.0-альфа05
20 марта 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha05
is released. Версия 1.4.0-alpha05 содержит эти коммиты .
Изменения API
- We have made the
initialCenterItemIndex
andinitialCenterItemScrollOffset
properties ofScalingLazyListState
public. ( I0c616 ) - We have made the
FullScreenStrokeWidth
fromProgressIndicatorDefaults
public. ( Ibea23 )
Исправления ошибок
- We have improved the performance of
PositionIndicator
by decreasing the number of calls tolayoutInfo
fromScalingLazyColumn
. ( Idc83d )
Версия 1.4.0-альфа04
6 марта 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha04
is released. Версия 1.4.0-alpha04 содержит эти коммиты .
Изменения API
- We have added a new overload for
ToggleChip
andSplitToggleChip
that takes aselectionControl
parameter instead of thetoggleControl
parameter. This should be used with theRadioButton
control in order to provide selectable semantics instead of toggleable semantics for accessibility ( I1d6d9 ) - We have updated parameter names for the new
selectionControl
overload fromonSelected
toonSelect
forToggleChip
andSplitToggleChip
( I1a971 )
Версия 1.4.0-альфа03
21 февраля 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha03
is released. Version 1.4.0-alpha03 contains these commits.
Изменения API
- The
Modifier.inspectable
wrapper has been deprecated. This API will create more invalidations of your modifier than necessary, so its use is now discouraged. Developers are encouraged to implement theinspectableProperties()
method onModifierNodeElement
if they would like to expose modifier properties to tooling. ( Ib3236 )
Исправления ошибок
- We have fixed a documentation bug for
WearPreview*
annotations. ( Id526d )
Версия 1.4.0-альфа02
7 февраля 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha02
is released. Version 1.4.0-alpha02 contains these commits.
Исправления ошибок
- We have fixed a bug in swipe-to-reveal, where it was possible to interact with (and cancel) a committed action on one item by starting to swipe another item.( Ide059 )
- We have updated the
ListHeader
to support height adjustments when contents need extra height to accommodate large font sizes. ( I7290c , b/251166127 )
Версия 1.4.0-альфа01
24 января 2024 г.
androidx.wear.compose:compose-*:1.4.0-alpha01
is released. Версия 1.4.0-alpha01 содержит эти коммиты.
Новые возможности
- We have added entry animation to
SwipeDismissableNavHost
for in-app transitions.( cfeb79a ) -
PositionIndicator
is now shown by default when a screen is first displayed. This change was introduced in order to help meet Wear Quality guidelines. Unfortunately, it means that screenshot tests will need to be updated on screens that includePositionIndicator
, as thePositionIndicator
would not previously have been displayed. ( 419cef7 )
Изменения API
- We have added a new ripple API in
wear:compose-material
andwear:compose-material3
libraries which replaces the deprecatedrememberRipple
. Also adds a temporaryCompositionLocal
,LocalUseFallbackRippleImplementation
, to revert Material components to using the deprecatedrememberRipple/RippleTheme
APIs. This will be removed in the next stable release, and is only intended to be a temporary migration aid for cases where you are providing a customRippleTheme
. See developer.android.com for migration information and more background information behind this change. ( af92b21 ) - We have updated
ColorScheme
to be immutable, making individual color updates less efficient, but making more common usage of colors more efficient. The reasoning behind this change is that the majority of apps wouldn't have updating individual colors as a main use case. This is still possible but it will recompose more than before, in turn we significantly decrease the amount of state subscriptions through all of the material code and will impact initialization and runtime cost of more standard use cases. ( f5c48b7 ) - Wear material and Wear material3 components exposing a
MutableInteractionSource
in their API have been updated to now expose a nullableMutableInteractionSource
that defaults to null. There are no semantic changes here: passing null means that you do not wish to hoist theMutableInteractionSource
, and it will be created inside the component if needed. Changing to null allows for some components to never allocate aMutableInteractionSource
, and allows for other components to only lazily create an instance when they need to, which improves performance across these components. If you are not using theMutableInteractionSource
you pass to these components, it is recommended that you pass null instead. It is also recommended that you make similar changes in your own components. ( f8fa920 ) - We have updated
rememberExpandableState
to save expandable state. This ensures that data is stored when navigating to another screen and restored when coming back to the original screen. ( 5c80095 )
Исправления ошибок
- We have updated the
ReduceMotion
setting to use a lifecycle aware listener. ( 7c6b122 ) - We have updated
TouchExplorationStateProvider
's Listener to be lifecycle aware ( be28b01 ) - We have removed the materialcore layer for
CompactButton
to improve performance ( 25db8e9 ) - We have made
BasicSwipeToDismissBox
more robust to NaN offsets to avoid exceptions ( b983739 ) - We have updated
BasicSwipeToDismissBox
to ensure alpha values are within the range 0,1 - We have fixed a bug in the
ToggleButton
,SplitToggleButton
,Checkbox
,Switch
andRadioButton
so that accessibility announcements are not repeated (previously, semantic roles were duplicated) ( d11eeb7 )
Версия 1.3
Версия 1.3.1
3 апреля 2024 г.
androidx.wear.compose:compose-*:1.3.1
is released. Версия 1.3.1 содержит эти коммиты .
Исправления ошибок
- We have fixed a bug in swipe-to-reveal, where it was possible to interact with (and cancel) a committed action on one item by starting to swipe another item. ( Ide059 )
Версия 1.3.0
24 января 2024 г.
androidx.wear.compose:compose-*:1.3.0
is released. Версия 1.3.0 содержит эти коммиты.
Important changes since 1.2.0
- The
SwipeToDismissBoxState
class,SwipeToDismissValue
enumeration, andModifier.edgeSwipeToDismiss
extension function are now each part of theandroidx.wear.compose.foundation
package, instead of theandroidx.wear.compose.material
package. This updated architecture allows you to implement gesture handling independently from other design considerations. Material Design workflows, such as applying colors from a configured theme, are handled separately. - The
SwipeToRevealCard
andSwipeToRevealChip
classes help you implement therecommended swipe-to-reveal guidance
. TheSwipeToRevealSample
class demonstrates how to use these components. Our 1.3.0-alpha02 release introduced a change that causes
Chip
andToggleChip
objects to grow in height to better support user-selected font scaling. This can cause some clipping to occur. To fix this issue, thelarge
shape forMaterialTheme
now uses a larger corner radius (26 dp instead of 24 dp).Chip
andToggleChip
objects use this new corner radius to avoid clipping content on the corners of Chip andToggleChip
.- Most
Chips
andToggleChips
are unchanged, given their default 52 dp height. However,Chip
andToggleChip
objects that contain multiple lines of primary or secondary label text, or for which the height has been overridden, could cause screenshot tests to break.
- Most
Additional changes
For a more complete set of the changes introduced in version 1.3.0, see the beta01 release notes .
Recommendations for implementation
- If your app allows users to pan around the screen's content, such as in a map-based app, turn off swipe handling by setting
userSwipeEnabled
tofalse
in theSwipeDismissableNavHost
composable, and include a button that allows users to go to the previous screen. - To turn off animations for a position indicator during fade-in and position-change animations within a scrolling list, use a
SnapSpec
object. - While waiting for a media app to load content for playback, show a blank
Placeholder
composable. - To create a collection of expandable items on demand, consider using the experimental
ExpandableStateMapping
class.
Версия 1.3.0-rc01
10 января 2024 г.
androidx.wear.compose:compose-*:1.3.0-rc01
is released. Версия 1.3.0-rc01 содержит эти коммиты.
Исправления ошибок
We have updated the
MaterialTheme
large shape to use a 26dp rounded corner radius and this will now be used by Chip andToggleChip
. This change is needed to support height adjustments when contents need extra height to accommodate large font sizes—otherwise, the existing stadium shape clips some text content.This change may cause a breakage in screenshot tests. ( I2e6ae )
Версия 1.3.0-beta02
13 декабря 2023 г.
androidx.wear.compose:compose-*:1.3.0-beta02
is released. Version 1.3.0-beta02 contains these commits.
Исправления ошибок
- We have restored the intended swipe motion in
BasicSwipeToDismissBox
. This had been altered in a previous release, such that the slide part of the transition occurred while the finger was touching the screen. ( Id8e76 )
Версия 1.3.0-бета01
15 ноября 2023 г.
androidx.wear.compose:compose-*:1.3.0-beta01
is released. Версия 1.3.0-beta01 содержит эти коммиты.
The 1.3-beta01 release of Compose for Wear OS indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Compose 1.3 includes the following new functionality:
-
SwipeToDismissBoxState
,SwipeToDismissValue
andModifier.edgeSwipeToDismiss
have been migrated fromandroidx.wear.compose.material
toandroidx.wear.compose.foundation
, along with the underlying swipe-to-dismiss implementation inBasicSwipeToDismissBox
. This allows the gesture handling for swipe-to-dismiss to be used independently of Material Design, for example from theSwipeDismissableNavHost
inandroidx.wear.compose.navigation
.SwipeToDismissBox
fromandroidx.wear.compose.material
is still recommended to be used with Material Design, because it pulls colors from theMaterialTheme
, then delegates the remaining implementation to theBasicSwipeToDismissBox
. -
SwipeDismissableNavHost
now supports a newuserSwipeEnabled
parameter so that swipe handling can be turned off for screens where it is not required. -
BasicSwipeToDismissBox
has improved focus handling usingHierarchicalFocusCoordinator
. -
SwipeToReveal
has newSwipeToRevealCard
andSwipeToRevealChip
composables in Material that follow the recommended UX guidance forCard
andChip
. It also has undo support for the secondary action. -
DefaultTextStyle
now turns off font padding to be consistent across the Android Platform. -
Chip
andToggleChip
now adjust their height to accommodate content that has grown due to large fonts for accessibility -
PositionIndicator
now has individual animation specs for the fade-in, fade-out and position-change animations. For performance reasons, we recommend that fade-in and position-change are turned off when used with scrollable lists. -
ExpandableStateMapping
provides a new way to generateExpandableStates
when they need to be created on demand and not necessarily with a@Composable
scope. -
Placeholder
now allows resetting if the content is no longer in the ready state. Also, the reduce motion setting now applies to the shimmering effect and wipe-off motion onPlaceholder
.
Известные проблемы
-
PositionIndicator
is not initially shown when a screen is first displayed. We intend to make a change in an early 1.4 alpha so that it will be initially shown, but without any animation.
Изменения API
- We have renamed the Foundation level
SwipeToDismissBox
toBasicSwipeToDismissBox
. This makes the distinction clearer between the Foundation level component and the Material levelSwipeToDismissBox
. The latter pulls colors from theMaterialTheme
to be used in scrims and delegates the remaining implementation to theBasicSwipeToDismissBox
. ( Ibecfc ) - We have marked
rememberExpandableStateMapping
as experimental and improved the performance ofexpandableItem
. ( I5f6bc ) - We have replaced the
SwipeToRevealAction
class in the MaterialSwipeToReveal
Card and Chip APIs with a slot-based API usingSwipeToRevealPrimaryAction
,SwipeToRevealSecondaryAction
andSwipeToRevealUndoAction
composables. Please see sample code for examples on how to use the new API. ( Ia8943 ) - We have replaced the
PositionIndicator
animation flags withAnimationSpec
parameters. The individual animations can be disabled by passingsnap
as theAnimationSpec
. ( I6c523 )
Исправления ошибок
- We have fixed a bug triggered by limited curved text when size is limited ( I50efe )
- We have addressed a potential NaN crash related to
curvedComposable
( I970eb ) - We have reverted the removal of the position change highlight animation on
PositionIndicator
. ( Ieb424 ) - We have removed the material-core layer for material Chip to improve its performance. ( If2dcb )
Version 1.3.0-alpha08
18 октября 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha08
is released. Version 1.3.0-alpha08 contains these commits.
Изменения API
- We have added individual flags to
PositionIndicator
overloads, to control different animations:showFadeInAnimation
,showFadeOutAnimation
andshowPositionAnimation
. The previous API has been deprecated and forwards calls to the new one. For performance reasons and for UX consistency, when thePositionIndicator
is used with a scrollable list, we recommend switching offshowFadeInAnimation
andshowPositionAnimation
flags. IfPositionIndicator
is used as a standalone indicator, for example for volume change, then we recommend having all 3 animations turned on. ( I44294 ) - We have deprecated the Material
SwipeToDismissBoxState
,SwipeToDismissValue
andedgeSwipeToDismiss
following the migration of Swipe-to-Dismiss functionality towear.compose.foundation
. Please replace with thewear.compose.foundation
equivalents. ( Iee8c9 )
Исправления ошибок
- We have updated the baseline profiles for wear compose foundation, material and navigation libraries. ( Idb060 )
- We have reverted a behavioral change for
PositionIndicator
introduced in a previous CL, such that thePositionIndicator
was animated when a screen was initially displayed. We intend to make a similar change in an early 1.4 alpha, so that thePositionIndicator
is initially displayed, but without any animation. ( I41843 ) - We have addressed some performance issues in
PositionIndicator
. ( I1c654 , b/302399827 ) - We have optimized performance of the touch exploration state provider default implementation to rely on
State<Boolean>
rather than derived state. ( Ieec4d ) - We have set
systemGestureExclusion
rectangles for Android 13 and higher. ( Ib1f4b )
Version 1.3.0-alpha07
4 октября 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha07
is released. Version 1.3.0-alpha07 contains these commits.
Изменения API
- We have added individual flags to
PositionIndicator
to control different animations:showFadeInAnimation
,showFadeOutAnimation
andshowPositionAnimation
. The previous API has been deprecated and forwards calls to the new one. For performance reasons and for UX consistency, when thePositionIndicator
is used with a scrollable list, we recommend switching offshowFadeInAnimation
andshowPositionAnimation
flags. IfPositionIndicator
is used as a standalone indicator, for example for volume change, then we recommend having all 3 animations turned on. ( Ia2d63 )
Исправления ошибок
- We have made improvements to the swipe to reveal motion by adding a fade animation to the primary action text, and fading the secondary action/changing the icon scale on full swipe expansion. ( Ib7223 )
- It is recommended that Swipe to Reveal actions are made accessible and we have added custom accessibility actions to our Swipe to Reveal samples. ( I42224 )
- We have improved the performance of
SwipeToDismissBox
, including refactoring to ensure that the initial logic does not trigger a recomposition. TheSwipeToDismissBox
is now drawn as the full screen size. ( Ie0aa2 ) - We have fixed a bug when the
PositionIndicator
incorrectly disappeared. ( I2091a ) - Improved performance of
PositionIndicator
by optimizing recompositions. New flags to control the animations (fadeIn
,fadeOut
andpositionChange
) have been added subsequently (see API Changes) ( Ifac7d ) - We have added Microbenchmark tests for
PositionIndicator
( Idf875 )
Version 1.3.0-alpha06
20 сентября 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha06
is released. Version 1.3.0-alpha06 contains these commits.
Исправления ошибок
- We have added support for
Modifier.edgeSwipeToDismiss
withSwipeToReveal
. ( I95774 , b/293444286 ) - We have added samples for the Material
SwipeToRevealChip
andSwipeToRevealCard
. ( Ieb974 ) - We have updated the baseline profiles for Wear Compose Foundation and Material libraries. ( I1dd1f )
Версия 1.3.0-альфа05
6 сентября 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha05
is released. Version 1.3.0-alpha05 contains these commits.
Исправления ошибок
- We have added handling in Swipe to Reveal so that only one item at a time can be swiped. ( I3cd7a )
- Improved the documentation of
ScalingLazyColumnDefaults
to better match its actual behavior. ( I886d3 )
Версия 1.3.0-альфа04
23 августа 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha04
is released. Version 1.3.0-alpha04 contains these commits.
Новые возможности
- We have added undo support for the secondary action of
SwipeToReveal
. ( I7a22d )
Изменения API
- Add
HorizontalPageIndicator
in Wear Material3 library. ( Ifee99 ) - Updated Wear Compose preview tooling to use the
androidx.wear.tooling.preview
library. ( Ib036e )
Исправления ошибок
- Fix a bug in round buttons where modifiers were not chained correctly. ( I5e162 )
Версия 1.3.0-альфа03
9 августа 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha03
is released. Версия 1.3.0-alpha03 содержит эти коммиты.
Изменения API
- We have added two new composables in Material for implementing
SwipeToReveal
with Cards and Chips. These composables follow the recommended UX guidance on the component and make it easier for developers to implementSwipeToReveal
with the existing components in Wear Material. ( I7ec65 ) - We have turned on the
FloatRange
annotations as API constraints, which were previously stated in comments. ( Icb401 )
Исправления ошибок
- We have moved the initial scrolling logic of
ScalingLazyColumn
insideonGloballyPositioned()
. ( Ic90f1 ) - We are now using
drawWithCache
inPositionIndicator
,ProgressIndicator
, andSelectionControls
to optimize stroke allocations. ( I5f225 , b/288234617 ) - We have fixed checkbox tick visibility in disabled states. ( Ib25bf )
- We have updated
Placeholder
to allow resetting to show the placeholder if the content is no longer in the ready state. ( Ibd820 ) - We have made some fixes to flaky
Placeholder
tests ( Idb560 )
Версия 1.3.0-альфа02
26 июля 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha02
is released. Версия 1.3.0-alpha02 содержит эти коммиты.
Изменения API
- We have provided
ExpandableStateMapping
, a new way to generateExpandableStates
, for cases in which they need to be created on demand, not necessarily within a@Composable
scope ( Iff9e0 ) -
SwipeToDismissBox
has been migrated fromandroidx.wear.compose.material
toandroidx.wear.compose.foundation
package. ( I275fb ) - Updated API files to annotate compatibility suppression. ( I8e87a , b/287516207 )
- We have made the height constants for
Chip
,CompactChip
andToggleChip
public ( Idbfde ) - We have made the horizontal and vertical paddings for
Chip
andCompactChip
public. ( Ieeaf7 ) - Added functionality to turn off swipe handling in
SwipeDismissableNavHost
via the newuserSwipeEnabled
parameter. ( Id2a0b , b/230865655 ) - We have updated the Wear Compose Navigation library to use the new
SwipeToDismissBox
from Wear Compose Foundation. ( I4ff8e )
Исправления ошибок
- We have fixed a z-order bug where
expandedItem
did not show the correct content after clicking a button's behavior when they have buttons. ( I1899d , b/289991514 ) - Improve focus handling of
SwipeToDismissBox
(and henceSwipeDismissableNavHost
) using theHierarchicalFocusCoordinator
( I45362 , b/277852486 ) - We have made a fix to the gesture handling in
SwipeableV2
. ( I89737 ) - We have finalized the baseline profiles for our 1.2 release. ( Id5740 )
- Following the migration of
SwipeToDismissBox
to Foundation, the MaterialSwipeToDismissBox
implementation now forwards to Foundation and supplies default color values from its theme.( If8451 ) - We have added heading semantics to
ListHeader
. ( Ic5420 ) -
Chip
andToggleChip
will now adjust their height to accommodate content that has grown due to large fonts for accessibility, when required. ( Iaf302 ) - Fixed a bug in the semantic role of
SplitToggleChip
's tappable area, for accessibility. ( Ieed3a ) - The reduce motion setting now turns off the shimmering effect and wipe-off motion on placeholders. ( I91046 )
-
Stepper
andInlineSlider
now support repeated clicks on long press so that you can quickly increase/decrease value ofStepper
andInlineSlider
by holding the + or - buttons. ( I27359 )
Версия 1.3.0-альфа01
21 июня 2023 г.
androidx.wear.compose:compose-*:1.3.0-alpha01
is released. Версия 1.3.0-alpha01 содержит эти коммиты.
Bug Fixes
- As announced in
1.2.0-alpha07
and1.2.0-alpha10
, we are now changing theDefaultTextStyle
to turn off font padding to be consistent across the Android Platform. This will address some cases of text clipping with large font sizes and may also impact screen layouts, so that screenshot tests need to be updated. For example, we see text clipping here ( Ic6a86 )
- It is no longer present when font padding is turned off:
- We have updated
wear.compose.foundation
to be an API dependency ofwear.compose.material
( I72004 , b/285404743 ) - We have fixed a bug in
SwipeToDismissBox
. Background and content keys are now passed to the remember block so that new modifiers are created when the content or background changes. ( Ib876c , b/280392104 ) - We have updated
TimeText
to use the locale when choosing the format for 12 or 24 hour time. ( If4a3d ) - We have fixed an inconsistency in
SwipeToDismissBox
contentScrimColor
default parameters. ( I2d70f ) - We have improved the motion handling in
SwipeToReveal
. ( I28fb7 )
Известные проблемы
- Supporting user-configured font sizes is an accessibility requirement. We know that multiline Chips can lead to text-clipping when displayed with large font sizes, so we will be updating Chip in an early 1.3 alpha version to make height adjustments in those cases.
Версия 1.2
Версия 1.2.1
18 октября 2023 г.
androidx.wear.compose:compose-*:1.2.1
is released. Версия 1.2.1 содержит эти коммиты.
Исправления ошибок
- Fixed a bug when the
PositionIndicator
incorrectly disappeared. ( 7a167f )
Версия 1.2.0
9 августа 2023 г.
androidx.wear.compose:compose-*:1.2.0
is released. Версия 1.2.0 содержит эти коммиты.
Важные изменения с 1.1.0
- Stable release of Compose for Wear OS 1.2.0 ( read more )
- For a list of the key changes in Wear Compose 1.2, see the release notes for ( Compose for Wear OS 1.2 Beta01 )
Версия 1.2.0-rc01
26 июля 2023 г.
androidx.wear.compose:compose-*:1.2.0-rc01
is released. Версия 1.2.0-rc01 содержит эти коммиты.
Исправления ошибок
- We have finalized the baseline profiles for our 1.2 release ( Id5740 )
Версия 1.2.0-бета02
7 июня 2023 г.
androidx.wear.compose:compose-*:1.2.0-beta02
is released. Версия 1.2.0-бета02 содержит эти коммиты.
Новые возможности
- We have added the new experimental
LocalReduceMotion
CompositionLocal
variable which disables scaling and fading onScalingLazyColumn
. ( I58024 )
Исправления ошибок
- We have updated the baseline profiles for the wear compose foundation and material libraries( I4725d )
- We have fixed an inconsistency in the default values for
SwipeToDismissBox
contentScrimColor
parameters ( I2d70f ) - We have fixed the
DefaultTextStyle
default value used for theIncludeFontPadding
setting ( I737ed )
Версия 1.2.0-бета01
24 мая 2023 г.
androidx.wear.compose:compose-*:1.2.0-beta01
is released. Версия 1.2.0-бета01 содержит эти коммиты.
What's in Compose for Wear OS 1.2
The 1.2-beta01 release of Compose for Wear OS indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Compose 1.2 includes the following new functionality:
-
expandableItem
andexpandableItems
are two newFoundation
components that support expanding items within aScalingLazyColumn
. UseexpandableItem
for a single expandable item, such as Text in which the number of lines. UseexpandableItems
for a group of expandable items andexpandableButton
to simplify creating a button that collapses after the content is expanded. -
HierarchicalFocusCoordinator
- this experimental composable enables marking sub-trees of the composition as focus enabled or focus disabled. -
Picker
- the API now includesuserScrollEnabled
to control whether the picker is active for user scrolling. -
PickerGroup
- a new composable for handling multiple pickers together. It handles focus between the pickers using theHierarchicalFocusCoordinator
API and enables auto-centering of picker items. -
Placeholder
- we have made updates to the shimmer and 'Wipe Off' animations. The wipe-off effect is now immediately applied when the content is ready. -
ScalingLazyColumn
- we have migratedScalingLazyColumn
and associated classes fromandroidx.wear.compose.material.ScalingLazyColumn
toandroidx.wear.compose.foundation.lazy.ScalingLazyColumn
. Please update to use theFoundation.Lazy
version. -
SwipeToReveal
- we have added experimental support for swipe-to-reveal as a means to access secondary actions, supplementing the existing 'long press' pattern. -
Stepper
- now has an overload with an additionalenableRangeSemantics
parameter to facilitate disabling the default range semantics. -
Previews
- we have added the following custom annotations for previewing composables on Wear screens:WearPreviewSmallRound
previews the composable on a small, round device;WearPreviewLargeRound
previews the composable on a large round device;WearPreviewSquare
previews the composable on a square device. Also, the following and multi-preview annotations:WearPreviewFontScales
previews the composables on a wear device with multiple font sizes, whileWearPreviewDevices
previews the composables on different wear devices. - We have added a
DefaultTextStyle
to Wear Compose which defaults thePlatformTextStyle.includeFontPadding
property to true (this is the current setting). This will allow us to synchronize turning off font padding by default with the Compose libraries in an early 1.3 alpha version - see 1.2.0-alpha10 for more information.
Новые возможности
- We have added experimental support for disabled scaling and fading animation when reduce_motion setting is switched on. ( I58024 )
Bug Fixes
- Improved documentation for
angularWidthDp
inCurvedSize.kt
( Iab75c ) -
SwipeDismissableNavHost
now logs a warning with potential causes of empty backstack. This is done to prevent unexpected crashes caused because ofIllegalArgumentException
which was thrown when the backstack was empty. ( I04a81 , b/277700155 )
Версия 1.2.0-Альфа10
10 мая 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha10
is released. Версия 1.2.0-Alpha10 содержит эти коммиты.
Новые возможности
- We have added support for Swipe to Reveal, as a means to access secondary actions. This pattern supplements the 'long press' pattern, the existing way a user could reveal (different) secondary actions. ( I60862 )
Изменения API
- We have added
RevealScope
to action composables inSwipeToReveal
, which gives access to the offset at which additional actions are revealed. ( I3fd56 )
Bug Fixes
- Fixed an issue with
ScalingLazyColumn
being stuck on Wear API 33 after fling ( Ic4599 ) - We have made some performance improvements to
PositionIndicator
for jank reduction. ( I35e92 ) - We have fixed a bug in Chip and
CompactChip
where the semantic role was no longer being set toRole.Button
. ( I93f91 , b/277326264 )
Известные проблемы
We have identified a bug in Android Studio which causes failure in rendering preview when annotated with @WearPreviewDevices and @WearPreviewFontScales - a fix is planned for release soon. Please note that the other wear preview annotations work as intended in Android Studio Giraffe 2022.3.1 and beyond.
In version 1.2.0-alpha07 we added DefaultTextStyle to Wear Compose, maintaining the existing PlatformTextStyle.includeFontPadding value as true - for background, see Fix font padding in Compose . We will be changing the DefaultTextStyle to turn off font padding in an early 1.3 alpha version, to be consistent across the Android Platform. This will address some cases of text clipping with large font sizes and may also impact screen layouts, so that screenshot tests need updating. For example, with large font sizes we see text clipping here:
- It is no longer present when font padding is turned off:
The new setting can be adopted now by overriding the typography in your theme - see example code .
Версия 1.2.0-Alpha09
19 апреля 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha09
is released. Версия 1.2.0-Alpha09 содержит эти коммиты.
Изменения API
- Add
angularSizeDp
to theCurvedModifier
api for setting angular width in DP ( I89a52 )
Bug Fixes
- We have fixed accessibility issues in our time picker demos( Id0eb7 )
Версия 1.2.0-Alpha08
5 апреля 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha08
is released. Версия 1.2.0-Alpha08 содержит эти коммиты.
Изменения API
- We have renamed
ExpandableItemsState
toExpandableState
. ( If85ea ) - We have added
expandableButton
to simplify creating a button that collapses when the content is expanded and also updated the expandables examples. ( Iae309 )
Bug Fixes
- Improved expandable samples to show more possibilities. Modified animation of
expandableItem
to keep its content centered through the animation. ( I2f637 ) - Updated
ToggleControls
to avoid extra recompositions when manually animating the colors using State. ( I5d319 )
Версия 1.2.0-Alpha07
22 марта 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha07
is released. Версия 1.2.0-Alpha07 содержит эти коммиты.
Изменения API
- We have moved the Expandable Item components (added in 1.2.0-alpha06) from material to foundation, since they had no meaningful reference to the
MaterialTheme
. ( Ib0525 )
Bug Fixes
- We have fixed a crash that occurred in a screen using
PickerGroup
, by ensuring thatPickerGroup
handles focus correctly when no Picker has the focus. Also added support for RSB scrolling in our Picker demos. ( If8c19 ) - We have improved the dialog transitions - the intro transition is now smoother to match the outro transition. ( Ib5af9 )
- We have added a
DefaultTextStyle
to Wear Compose which defaults thePlatformTextStyle.includeFontPadding
property to true (this is the current setting). This will allows us to synchronize turning off font padding by default with the Compose libraries in the future - see ( Fix font padding in Compose ) for background. ( I2aee8 ) - Reverted an
UpsideDownCake
preview dependency via activity-compose that blocked publishing apps to the Google Play Store. ( I6443d )
Версия 1.2.0-Alpha06
8 марта 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha06
is released. Версия 1.2.0-Alpha06 содержит эти коммиты.
Изменения API
- Add
CurvedBox
component, which places components on top of each other in the curved world. ( I29200 ) - Added Expandable Item(s) - two new components to support either a group of expandable items in a
ScalingLazyColumn
, or an expandable single item, such as Text in which the number of lines expands. ( I95dd5 ) - We have added the following custom annotations for previewing composables on Wear screens:
WearPreviewSmallRound
previews the composable on a small, round device;WearPreviewLargeRound
previews the composable on a large round device;WearPreviewSquare
previews the composable on a square device. Also, the following and multi-preview annotations:WearPreviewFontScales
previews the composables on a wear device with multiple font sizes, whileWearPreviewDevices
previews the composables on different wear devices. To use these previews, you must be using the latest Android Studio (Giraffe Canary 6) or beyond. Please note that if these annotations do not suit your purpose, Preview can still be used and supports further customisations via parameters. ( I397ff ) - We have marked
HierarchicalFocusCoordinator
as experimental while it is considered as a candidate to be moved into core compose libraries, given its wide applicability. ( I3a768 )
Bug Fixes
- Fixed a bug on
HierarchicalFocusCoordinator
, when the lambda passed in for thefocusEnabled
parameter is changed, we now correctly use the new one. ( Icb353 ) - We have updated the default disabled content color to Background when using primary colors as the background in
Button
,CompactButton
,Chip
,CompactChip
andToggleButton
. This improves the contrast for accessibility. ( I527cc )
Версия 1.2.0-Alpha05
22 февраля 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha05
is released. Версия 1.2.0-Alpha05 содержит эти коммиты.
Изменения API
- Updated
PickerGroup
API to allow propagating the min constraints to the composable optionally. When set as true, the minimum constraints passed from the parent composable will be allowed on thePickerGroup
. If set as false,PickerGroup
will reset the minimum constraints. ( I3e046 ) - We have added
animateScrollToOption
to the Picker API in order to support programmatic animation to a specific Picker option ( I6fe67 )
Bug Fixes
- We have updated
HorizontalPageIndicator
to support right-to-left layouts. ( Ia4359 ) - Added Screenshot tests for right-to-left layout in
HorizontalPageIndicator
( I6fbb8 ) - Added further tests to
SwipeDismissableNavHostTest
that useTestNavHostController
( I61d54 )
Версия 1.2.0-Alpha04
8 февраля 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha04
is released. Версия 1.2.0-Alpha04 содержит эти коммиты.
Новые возможности
-
PickerGroup
for handling multiple pickers together using the focus API. It handles the focus between the different pickers, enables auto-centering of the pickers based on parameters and allows developers to change the focus between different pickers while handling the events from the group. In talkback mode, thePickerGroup
handles the talkback focus by moving the focus to the selected Picker from the group. ( I60840 )
Изменения API
- We have added an overload to Stepper with an additional
enableRangeSemantics
parameter in order to facilitate disabling the default range semantics ( Ia61d4 )
Bug Fixes
- Allow
ScalingLazyColumn
to be nested within a horizontally scrolling page ( Iec3f8 , b/266555016 ) - Improvement of Stepper kdocs and
StepperTest
tests clean-up. ( Ic118e ) - Updated
androidx.navigation
dependency to version 2.5.3 ( If58ed )
Версия 1.2.0-Alpha03
25 января 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha03
is released. Версия 1.2.0-Alpha03 содержит эти коммиты.
Изменения API
- We have migrated
ScalingLazyColumn
(and associated classes) fromandroidx.wear.compose.material.ScalingLazyColumn
toandrdoidx.wear.compose.foundation.lazy.ScalingLazyColumn
(see this example for migration). This new location more closely matches that ofcompose.foundation.lazy.LazyColumn
and is more natural as it is not an opinionated Material component. The change is happening now in preparation for a new Material3 library, which we will be working on in parallel with the existing Material library. ( I060e7 )
The following changes are part of the ScalingLazyColumn
migration from Material to Foundation.Lazy
:
-
PositionIndicator
apis targeting MaterialScalingLazyColumn
have been deprecated - please update toFoundation.Lazy ScalingLazyColumn
. AdditionallyanchorType
field was added toScalingLazyListLayoutInfo
. ( I29d95 ) -
ScalingLazyColumn
has been marked as deprecated in the Wear Compose Material package ( I16d34 ) - We have updated the
ScrollAway
modifier to useScalingLazyListState
from Wear ComposeFoundation.Lazy
and deprecated the overload that tookScalingLazyListState
from Wear Compose Material. ( Ifc42c ) - We have updated the Dialog APIs to use
ScalingLazyListState
fromFoundation.Lazy
and deprecated the overloads that used MaterialScalingLazyListState
( Ic8960 ) - We have updated the Picker APIs to use
ScalingParams
fromFoundation.Lazy
and deprecated the overloads that used MaterialScalingParams
. ( Idc3d8 )
Bug Fixes
- We have fixed a bug that caused unnecessary recompositions in
ScalingLazyListState.centerItemIndex
by ensuring that it only pushes updates when the value actually changes ( Ia9f38 ) - We have improved the performance of
SwipeToDismissBox
( I3933b ) - Added benchmark tests for
ScalingLazyColumn
in Wear Compose Foundation ( Ie00f9 ) - We have updated some internal
ScalingLazyColumn
classes methods in Material to use their equivalents fromFoundation.Lazy
( I38aab ) - We have fixed some issues in Picker tests and add more tests for checking scroll with offset ( I6ac34 )
- We migrated the
ScalingLazyColumn
Integration Demos to depend onFoundation.Lazy
instead of MaterialScalingLazyColumn
( Ic6caa ) - We have added optional
fromDate/toDate
parameters to ourDatePicker
demo ( I961cd )
Версия 1.2.0-Alpha02
11 января 2023 г.
androidx.wear.compose:compose-*:1.2.0-alpha02
is released. Версия 1.2.0-Alpha02 содержит эти коммиты.
Изменения API
- Android Compose UI tests will now run layout passes for each frame when executing frames to get to idle (eg via
waitForIdle
). This may affect tests that assert on individual frames of layout animations. ( I8ea08 , b/222093277 ) - The parameter
minLines
is added to Wear Text for consistent behaviour withBasicText
( I24874 ) -
CompactChipTapTargetPadding
has been made public so that it appears in the documentation ( If1e70 , b/234119038 )
Bug Fixes
- Disable multiplatform builds for
wear.compose
packages ( Iad3d7 ) - Fix kdocs for
scrollToOption
( I6f9a0 ) -
PlaceholderState.rememberPlaceholderState()
updated to userememberUpdatedState
to that the state will update if theonContentReady
lambda. ( I02635 , b/260343754 ) - We have fixed a text jittering issue seen in the
Picker
component by leveraging the new compositing strategy added toModifier.graphicsLayer
. ( I99302 ) - We have fixed a bug that caused flickering in our
DatePicker
demo ( I660bd ) - We have improved the accessibility for the 12-hour time and date picker demos ( I05e12 )
- We have updated our time and date picker demos so that the pickers are not affected by RSB changes when unselected ( I4aecb )
Версия 1.2.0-альфа01
7 декабря 2022 г.
androidx.wear.compose:compose-*:1.2.0-alpha01
is released. Версия 1.2.0-Alpha01 содержит эти коммиты.
Новые возможности
- We've updated the experimental Placeholder functionality so that the “Wipe Off” effect is immediately applied when the content is ready rather than waiting for the next animation loop to start. We have also made some updates to the shimmer and wipe off animations. ( I5a7f4 )
Изменения API
- We have added a
HierarchicalFocusCoordinator
composable to enable marking sub-trees of the composition as focus enabled or focus disabled.( I827cb ) - We have added a new property to override the semantic role for
ToggleButton
.( I67132 ) - We have updated
TimeTextDefaults.TimeFormat12Hours
to remove AM/PM inTimeText
. This will change the default value oftimeSource
parameters inTimeText
API. ( I1eb7f ) - We have extended the Picker API to improve accessibility for screens with multi-picker. There is a new property
userScrollEnabled
to control whether the picker is active for user scrolling. ( I3c3aa )
Исправления ошибок
- We have changed the default border width for an
OutlinedButton/OutlinedCompactButton
from 2.dp to 1.dp to match final UX specs. ( Icf84d ) - In order to reduce the effect of the first item added to an empty
ScalingLazyColumn
appearing to scroll into place we have added an estimatedautoCentering topPadding
when the contents are empty. This change calculates the amount of top padding needed by assuming an initial item of height 0.dp. ForScalingLazyListAnchorType.ItemStart
this will calculate the correct top padding, forScalingLazyListAnchorType.ItemCenter
this calculation will be incorrect as the height of the items is needed to correctly size the contents resulting in a small scroll into place effect based on the items real height.( I239a4 ) - We have updated the background scrim applied to the
SwipeToDismiss
animation to match the Wear platform. ( I9003e ) - We have fixed
PositionIndicator
handling ofLazyListState
andScalingLazyListState
for list items of size 0 to avoid divide by zero errors.( Ic28dd )
Версия 1.1
Версия 1.1.2
8 февраля 2023 г.
androidx.wear.compose:compose-foundation:1.1.2
, androidx.wear.compose:compose-material:1.1.2
, and androidx.wear.compose:compose-navigation:1.1.2
are released. Version 1.1.2 contains these commits.
Bug Fixes
- We have fixed a bug that caused unnecessary recompositions in
ScalingLazyListState.centerItemIndex
by ensuring that it only pushes updates when the value actually changes ( Ia9f38 )
Версия 1.1.1
11 января 2023 г.
androidx.wear.compose:compose-foundation:1.1.1
, androidx.wear.compose:compose-material:1.1.1
, and androidx.wear.compose:compose-navigation:1.1.1
are released. Версия 1.1.1 содержит эти коммиты.
Bug Fixes
-
PlaceholderState.rememberPlaceholderState()
updated to userememberUpdatedState
to that the state will update if theonContentReady
lambda. ( I02635 , b/260343754 )
Version 1.1.0
7 декабря 2022 г.
androidx.wear.compose:compose-foundation:1.1.0
, androidx.wear.compose:compose-material:1.1.0
, and androidx.wear.compose:compose-navigation:1.1.0
are released. Версия 1.1.0 содержит эти коммиты.
Важные изменения с версии 1.0.0
- Stable release of Compose for Wear OS 1.1.0 ( read more ).
- For a list of the key changes in Wear Compose 1.1 see the release notes for ( Compose for Wear OS 1.1 Beta01 ).
Новые возможности
- We've updated the experimental Placeholder functionality so that the “Wipe Off” effect is immediately applied when the content is ready rather than waiting for the next animation loop to start. We have also made some updates to the shimmer and wipe off animations. ( I5a7f4 )
Bug Fixes
- We have changed the default border width for an
OutlinedButton/OutlinedCompactButton
from 2.dp to 1.dp to match final UX specs. ( Icf84d ) - In order to reduce the effect of the first item added to an empty
ScalingLazyColumn
appearing to scroll into place we have added an estimatedautoCentering topPadding
when the contents are empty. This change calculates the amount of top padding needed by assuming an initial item of height 0.dp. ForScalingLazyListAnchorType.ItemStart
this will calculate the correct top padding, forScalingLazyListAnchorType.ItemCenter
this calculation will be incorrect as the height of the items is needed to correctly size the contents resulting in a small scroll into place effect based on the items real height.( I239a4 ) - We have updated the background scrim applied to the
SwipeToDismiss
animation to match the Wear platform.( I9003e ) - We have fixed
PositionIndicator
handling ofLazyListState
andScalingLazyListState
for list items of size 0 to avoid divide by zero errors.( Ic28dd )
Версия 1.1.0-rc01
9 ноября 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-rc01
, androidx.wear.compose:compose-material:1.1.0-rc01
, and androidx.wear.compose:compose-navigation:1.1.0-rc01
are released . Версия 1.1.0-RC01 содержит эти коммиты.
Bug Fixes
- We have added baseline profile rules for
Placeholders
,ScrollAway
,RadioButton
,Switch
,Checkbox
,OutlinedButton
,OutlinedCompactButton
,OutlinedChip
andOutlinedCompactChip
. ( I8249c ) - We have fixed a bug in
Modifier.scrollAway
so that if the specifieditemIndex
is invalid (for example, if that item index is out of range), then theTimeText
will now still be displayed. ( I2137a ) - We have updated the
SwipeToDismissBox
animation to match the platform implementation. After the initial squeeze animation, the screen now slides off to the right once the dismissal has been triggered. ( I41d34 ) - As an optimization, we have updated
Modifier.scrollAway
to only read thescrollState
inside the measure block to avoid recomposing the modifier after each remeasure. ( I4c6f1 ) - We have added documentation and a sample to placeholders to show the correct ordering for
Modifier.placeholder
andModifier.placeholderShimmer
when applied to the same composable. ( Ie96f4 , b/256583229 ) - We have changed the default border width for an
OutlinedCompactChip/OutlinedChip
from 2.dp to 1.dp to match final UX specs. ( Ib3d8e ) - We have fixed a bug in
rememberPickerState
where updated inputs were not saved, so that composables were not updated after changes to the inputs. ( I49ff6 , b/255323197 ) - We have made some UI updates to the placeholders, 1) change the shimmer gradient to 1.5x the screen size, 2) add easing (cubic bezier) of the shimmer progression and 3) speed up the wipe-off animation (250ms). ( Id29c1 )
- We have corrected a UI bug in the placeholder wipeOff effect where Chip and Card backgrounds were wiping off slightly early due to not taking the component's position on screen into account. ( I2c7cb )
- We have updated the placeholder background drawing to merge colors rather than layer them where possible to reduce the risk of alpha blending of the different cropped layers from allowing underlying colors to bleed through at the placeholder background edges. ( I2ea26 )
- We have corrected the calculation of
ScalingLazyListState.centerItemIndex/centerItemOffset
so that if two items sit either side of the viewport center line the one that is closest will be considered as thecenterItem
. ( I30709 , b/254257769 ) - We have corrected a bug in the
ScalingLazyListState.layoutInfo.visibleItemsInfo
which was reporting incorrect offsets duringScalingLazyColumn
initialization. Now an empty list will be returned until all list items are visible and have the correct offsets. Check forScalingLazyListState.layoutInfo.visibleItemsInfo.isNotEmpty()
will confirm that theScalingLazyColumn
initialization is complete and items are visible. ( I3a3b8 )
Версия 1.1.0-бета01
24 октября 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-beta01
, androidx.wear.compose:compose-material:1.1.0-beta01
, and androidx.wear.compose:compose-navigation:1.1.0-beta01
are released . Версия 1.1.0-beta01 содержит эти коммиты.
What's in Compose for Wear OS 1.1
The 1.1.0-beta01 of Compose for Wear OS indicated that this release of the library is feature complete and the API locked.
- Wear Compose 1.1 release includes the following new functionality:
- Picker - Accessibility improvements to Picker so that multi-picker screens are navigable with screen readers and the content description is accessible
- Picker
contentDescription
parameter is now used only for the selected Picker option and takes a nullable String (in the previous commit, it was necessary to pass a mapping from option to the content description, but only the selected option was used). - Picker items are now always center-aligned, fixing a bug when setting
gradientRatio
to zero had the side-effect of changing the alignment. -
Chip/ToggleChip
- We have updated the default gradients forChip/ToggleChip
to bring them in line with the latest UX spec.ChipDefaults.gradientBackgroundChipColors
has been updated to start from 50% of primary rather than 32.5%. -
Chip/ToggleChip
- Added overloads for modifying Chip shapes -
Chip/Button/ToggleButton
- Added a new outlined style for Chips and Buttons and newOutlinedChip
andOutlinedButton
composables that provide a transparentChip/Button
with a thin border. - Card - Updated the default gradients for Cards to bring them in line with the latest UX spec.
CardDefaults.cardBackgroundPainter
has been updated to start from 30% of primary and end at 20% ofonSurfaceVariant
(was previously 20% to 10%onSurfaceVariant
).ToggleChip.toggleChipColors
changes from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. -
Button/ToggleButton
- Added properties for modifying button shapes. - Theme - Updated a number of the default colors in the
MaterialTheme
in order to improve accessibility as the original colors did not have sufficient contrast resulting in difficulties for users to differentiate chip/card/button backgrounds from the theme background color. -
InlineSlider/Stepper
- Button roles added so thatTalkback
can recognise them as buttons. - Scaffold -
PositionIndicator
now is positioned and sized so that it only takes the space needed. This is useful, for example, if semantic information is added to it, talkback now gets the correct bounds of thePositionIndicator
on screen. -
CurvedText/TimeText
- AddedModifier.scrollAway
, which scrolls an item vertically in/out of view, based on scroll state (with overloads to work withColumn
,LazyColumn
andScalingLazyColumn
).ScrollAway
is typically used to scroll aTimeText
out of view as the user starts to scroll a list of items upwards. -
CurvedText/TimeText
- Added support forfontFamily
,fontStyle
andfontSynthesis
inCurvedTextStyle
, usable oncurvedText
andbasicCurvedText
-
CurvedText/TimeText
- AddedfontWeight
to the constructor and copy method onCurvedTextStyle
-
ToggleControls
- Added animatedCheckbox
,Switch
andRadioButton
toggle controls for use withToggleChip
andSplitToggleChip
. These can be used instead of the static icons provided byToggleChipDefaults
(switchIcon
,checkboxIcon
andradioIcon
). - Placeholder - Added experimental placeholder support. This has three distinct visual effects designed to work together.
- Firstly a placeholder background brush effect used in containers such as Chip and Cards to draw over the normal background when waiting for content to load.
- Secondly a modifier (
Modifier.placeholder()
) to draw a stadium shaped placeholder widget over the top of content that is being loaded. - Thirdly a modifier gradient/shimmer effect (
Modifier.placeholderShimmer()
) that is drawn over the top of the other effects to indicate to users that we are waiting for data to load.- All of these effects are designed to be coordinated and shimmer and wipe-off in an orchestrated fashion.
- Core Compose dependencies updated from 1.2 to 1.3
Изменения API
- Font parameters (
fontFamily
,fontWeight
,fontStyle
&fontSynthesis
) can now be specified directly as parameters ofcurvedText
( Idc422 )
Bug Fixes
-
curveText
andbasicCurvedText
will now work properly with talkback (the have a properly sized and placed (but empty) compose-ui node associated with them, using the text as content description) ( I7af7c , b/210721259 ) - Bug fix to the
Picker
whenPickerState.repeatedItems = false
to add an explicit setting of autoCentering params on the Pickers internalScalingLazyColumn
to ensure that it is possible to scroll the zero'th option to the center of the view. ( I8a4d7 )
Version 1.1.0-alpha07
5 октября 2022 года
androidx.wear.compose:compose-foundation:1.1.0-alpha07
, androidx.wear.compose:compose-material:1.1.0-alpha07
, and androidx.wear.compose:compose-navigation:1.1.0-alpha07
are released . Version 1.1.0-alpha07 contains these commits.
Новые возможности
- We have added experimental placeholder support. This has three distinct visual effects designed to work together. Firstly a placeholder background brush effect used in containers such as Chip and Cards to draw over the normal background when waiting for content to load. Secondly a modifier (
Modifier.placeholder()
) to draw a stadium shaped placeholder widget over the top of content that is being loaded. Thirdly a modifier gradient/shimmer effect (Modifier.placeholderShimmer()
) that is drawn over the top of the other effects to indicate to users that we are waiting for data to load. All of these effects are designed to be coordinated and shimmer and wipe-off in an orchestrated fashion. ( I3c339 )
Изменения API
- Added support for
fontWeight
,fontFamily
,fontStyle
andfontSynthesis
inCurvedTextStyle
, usable oncurvedText
andbasicCurvedText
. Those parameter can be used to specify the font and style to use on the curved text.( Iaa1a8 ),( I72759 ) - Updated
Modifier.scrollAway
's offset parameter to Dp for consistency withModifier.offset
(previously it was in pixels). Also, refactored as aLayoutModifier
for efficiency. ( I9f94b ) - As part of the new toggle controls API, we have renamed
RadioButton's circleColor
toringColor
. ( I28fa9 ) - We have added animated
Checkbox
,Switch
andRadioButton
toggle controls for use withToggleChip
andSplitToggleChip
. These can be used instead of the static icons provided byToggleChipDefaults
(switchIcon
,checkboxIcon
andradioIcon
). ( I8a8c4 )
Version 1.1.0-alpha06
21 сентября 2022 года
androidx.wear.compose:compose-foundation:1.1.0-alpha06
, androidx.wear.compose:compose-material:1.1.0-alpha06
, and androidx.wear.compose:compose-navigation:1.1.0-alpha06
are released . Version 1.1.0-alpha06 contains these commits.
Новые возможности
- We have added
Modifier.scrollAway
, which scrolls an item vertically in/out of view, based on scroll state (with overloads to work withColumn
,LazyColumn
andScalingLazyColumn
).ScrollAway
is typically used to scroll aTimeText
out of view as the user starts to scroll a list of items upwards. ( I61766 )
Исправления ошибок
- The
PositionIndicator
now is positioned and sized so that it only takes the space needed. This is useful, for example, if semantic information is added to it, talkback now gets the correct bounds of thePositionIndicator
on screen. ( Ie6106 , b/244409133 )
Version 1.1.0-alpha05
7 сентября 2022 года
androidx.wear.compose:compose-foundation:1.1.0-alpha05
, androidx.wear.compose:compose-material:1.1.0-alpha05
, and androidx.wear.compose:compose-navigation:1.1.0-alpha05
are released . Version 1.1.0-alpha05 contains these commits.
Bug Fixes
- Button roles were added to
InlineSlider
andStepper
so that Talkback can recognise them as buttons. ( Icb46c , b/244260275 ) - We have corrected the z-order of position and page indicators in the Scaffold. The indicators will now sit on top of the vignette and so will not be obscured by the vignette if it is present. ( Ib988f , b/244207528 )
Version 1.1.0-alpha04
24 августа 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-alpha04
, androidx.wear.compose:compose-material:1.1.0-alpha04
, and androidx.wear.compose:compose-navigation:1.1.0-alpha04
are released . Version 1.1.0-alpha04 contains these commits.
Изменения API
- We have updated a number of the default colors in the MaterialTheme in order to improve accessibility as the original colors did not have sufficient contrast resulting in difficulties for users to differentiate chip/card/button backgrounds from the theme background color. The updated colors are surface(0xFF202124->0xFF303133), onPrimary(0xFF202124->0xFF303133), onSecondary(0xFF202124->0xFF303133), primaryVariant(0xFF669DF6->0xFF8AB4F8) and onError(0xFF202124->0xFF000000). The changes in colors though relatively subtle may impact existing screenshot tests. ( 81ab09 )
Bug Fixes
- Fix a logic bug in
ScalingLazyColumn
that could result in lists with a small (typically exactly 2) number of list items not completing initialization and as a result being transparent. ( 504347 )
Version 1.1.0-alpha03
10 августа 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-alpha03
, androidx.wear.compose:compose-material:1.1.0-alpha03
, and androidx.wear.compose:compose-navigation:1.1.0-alpha03
are released . Version 1.1.0-alpha03 contains these commits.
Новые возможности
- We have added a new outlined style for
Chips
andButtons
and newOutlinedChip
andOutlinedButton
composables that provide a transparentChip/Button
with a thin border. ( Id5972 )
Изменения API
- Added overloads for modifying button shapes ( Icccde )
Bug Fixes
- We have corrected the size of the toggle control area of the
ToggleChip
as it was not matching its UX spec. The UX Spec calls for a 4.dp spacer between the label and a 24x24.dp toggle control icon area giving a total 28.dp width. However the implementation is incorrectly giving 36x24.dp toggle control area. This results in taking away 8.dp of usable text label area. NOTE: This bug fix gives additional space for the text label and as result can (positively) impact the text layout for overflowing text. If you have screenshot tests includingToggleChips
they may need to be updated. ( I514c8 , b/240548670 )
Версия 1.1.0-альфа02
27 июля 2022 года
androidx.wear.compose:compose-foundation:1.1.0-alpha02
, androidx.wear.compose:compose-material:1.1.0-alpha02
, and androidx.wear.compose:compose-navigation:1.1.0-alpha02
are released . Version 1.1.0-alpha02 contains these commits.
Новые возможности
- We have switched Compose for Wear OS dependencies on core Compose libraries from 1.2.0 to 1.3.0-alpha0X
Изменения API
- Added overloads for modifying chip shapes ( I02e87 )
Bug Fixes
- We have animated the visibility of the vignette when showing/hiding Dialog, to be consistent with the existing scaling animation. ( Ida33e )
- We have fixed a bug where a divide-by-zero could occur with some fling behavior when scrolling. ( I86cb6 )
- Fixed a bug in the
ChipDefaults.childChipColor()
to ensure that the disabled background color is fully transparent. ( I2b3c3 , b/238057342 )
Версия 1.1.0-альфа01
29 июня 2022 г.
androidx.wear.compose:compose-foundation:1.1.0-alpha01
, androidx.wear.compose:compose-material:1.1.0-alpha01
, and androidx.wear.compose:compose-navigation:1.1.0-alpha01
are released . Версия 1.1.0-alpha01 содержит эти коммиты.
Изменения API
- Picker's
contentDescription
parameter is now used only for the selected Picker option and takes a nullable String (previously, it was necessary to pass a mapping from option to the content description, but only the selected option was used). ( Ife6a7 ) - We have made accessibility improvements to Picker so that multi-picker screens are navigable with screen readers and the content description is accessible ( I64edb )
Bug Fixes
- We have updated the baseline profile rules packaged with the Wear Compose library ( I9c694 )
- We have corrected the direction of the gradient for Chips in right to left mode. Was top left->bottom right, is now top right->bottom left. ( Ic2e77 )
- We have updated the default gradients for
Chip/ToggleChip/Card
to bring them in line with latest UX spec.ChipDefaults.gradientBackgroundChipColors
has been updated to start from 50% of primary rather than 32.5%.CardDefaults.cardBackgroundPainter
has been updated to start from 30% of primary and end at 20% ofonSurfaceVariant
(was previously 20% to 10%onSurfaceVariant
).ToggleChip.toggleChipColors
changes from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. ( I43bbd ) - We have added a background color (
MaterialTheme.color.surface
) behindChip/ToggleChips
that have gradient backgrounds in order to ensure that they are properly visible in the unlikely event that a light color is used behind them. ( Ibe1a4 , b/235937657 ) - Picker items are now always center-aligned, fixing a bug when setting
gradientRatio
to zero had the side-effect of changing the alignment. ( I712b8 )
Версия 1.0
Версия 1.0.2
7 сентября 2022 года
androidx.wear.compose:compose-foundation:1.0.2
, androidx.wear.compose:compose-material:1.0.2
, and androidx.wear.compose:compose-navigation:1.0.2
are released. Version 1.0.2 contains these commits.
Bug Fixes
- We have corrected the z-order of position and page indicators in the Scaffold. The indicators will now sit on top of the vignette and so will not be obscured by the vignette if it is present. ( Ib988f , b/244207528 )
Version 1.0.1
24 августа 2022 г.
androidx.wear.compose:compose-foundation:1.0.1
, androidx.wear.compose:compose-material:1.0.1
, and androidx.wear.compose:compose-navigation:1.0.1
are released. Version 1.0.1 contains these commits.
Bug Fixes
- Fix a logic bug in
ScalingLazyColumn
that could result in lists with a small (typically exactly 2) number of list items not completing initialization and as a result being transparent. ( 076c61 )
Версия 1.0.0
27 июля 2022 года
androidx.wear.compose:compose-foundation:1.0.0
, androidx.wear.compose:compose-material:1.0.0
, and androidx.wear.compose:compose-navigation:1.0.0
are released. Version 1.0.0 contains these commits.
Major features of 1.0.0
- This is the first stable release of Compose for Wear OS ( read more ).
- Compose for Wear OS builds upon the core Compose libraries providing additional wearable-specific components and, where appropriate, alternate implementations of core Compose components tailored to wearable devices.
- For a list of the key components in Wear Compose see the release notes for ( Compose for Wear OS Beta01 ).
Исправления ошибок
- We have animated the visibility of the vignette when showing/hiding Dialog, to be consistent with the existing scaling animation. ( Ida33e )
- We have fixed a bug where a divide-by-zero could occur with some fling behavior when scrolling. ( I86cb6 )
- Fixed a bug in the
ChipDefaults.childChipColor()
to ensure that the disabled background color is fully transparent. ( I2b3c3 , b/238057342 )
Version 1.0.0-rc02
22 июня 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-rc02
, androidx.wear.compose:compose-material:1.0.0-rc02
, and androidx.wear.compose:compose-navigation:1.0.0-rc02
are released . Version 1.0.0-rc02 contains these commits.
Bug Fixes
- We have corrected the direction of the gradient for Cards in right to left (RTL) mode. It was top left->bottom right, and it is now top right->bottom left. ( Ic2e77 )
- We have updated the default gradients for
Chip/ToggleChip/Card
to bring them in line with the latest UX spec.ChipDefaults.gradientBackgroundChipColors
has been updated to start from 50% of primary rather than 32.5%.CardDefaults.cardBackgroundPainter
has been updated to start from 30% of primary and end at 20% ofonSurfaceVariant
(was previously 20% to 10% onSurfaceVariant).ToggleChip.toggleChipColors
changes from a linear gradient of 75% surface to 32.5% primary to 0% surface to 50% primary. ( I43bbd ) - We have added a background color (
MaterialTheme.color.surface
) behindChip/ToggleChips
that have gradient backgrounds in order to ensure that they are properly visible in the unlikely event that a light color is used behind them. ( Ibe1a4 , b/235937657 ) - We have updated the baseline profile rules packaged with the Wear Compose library ( I9c694 )
Version 1.0.0-rc01
15 июня 2022 года
androidx.wear.compose:compose-foundation:1.0.0-rc01
, androidx.wear.compose:compose-material:1.0.0-rc01
, and androidx.wear.compose:compose-navigation:1.0.0-rc01
are released . Version 1.0.0-rc01 contains these commits.
Изменения API
- Interfaces in compose libraries are now built using jdk8 default interface methods ( I5bcf1 )
Bug Fixes
- We have removed the explicit call to
fillMaxWidth()
on list header as it is not needed and can result in problems if aScalinglazyColumn
has a mixture ofListHeader()
andChip()
components as the width will tend to grow/shrink asListHeader
items are scrolled in/out of view. ( I37144 , b/235074035 ) - We have fixed a bug in the
ScalingLazyColumn
that could result in the list items not drawing correctly until scrolled if the 0th list item was large enough (including padding) ( Ic6159 , b/234328517 ) - We have made a small adjustment in the
ScalingLazyColumn
easing as items reach the edge of the screen to match UX spec updates. Old valuesCubicBezierEasing(0.25f, 0.00f, 0.75f, 1.00f)
-> new valuesCubicBezierEasing(0.3f, 0f, 0.7f, 1f)
. To keep the old behavior you can override thescalingParams
ofScalingLazyColumn
( Ie375c ) - We have added padding to the
CompactChip
in order to ensure that its tap target size is at least 48.dp high to meet the Material accessibility guidelines. This might impact any layouts you have usingCompactChips
as they will be taking up additional space. ( I3d57c )
Version 1.0.0-beta03
1 июня 2022 года
androidx.wear.compose:compose-foundation:1.0.0-beta03
, androidx.wear.compose:compose-material:1.0.0-beta03
, and androidx.wear.compose:compose-navigation:1.0.0-beta03
are released . Version 1.0.0-beta03 contains these commits.
Новые возможности
- We have made
ScalingLazyColumn
work in Compose@Preview
mode. ( I3b3b6 , b/232947354 )
Изменения API
- We have changed the default value for the
ScalingLazyColumn.horizontalAlignment
property from Start toCenterHorizontally
to ensure that when list items do not fill the entire width of the column they will be aligned for maximum visibility. To switch back to the previous behavior sethorizontalAlignment = Alignment.Start
.( I9ed4b )
Известные проблемы
- CompactChip's tap/touch height is smaller than Material accessibility guidelines. This will be corrected in the next release (15th June) . If you are using CompactChip this will affect your layouts as CompactChips will now have additional padding above and below. Please adjust and test your layouts or see the bug comments for a workaround to use the existing behavior. ( b/234332135 )
Исправления ошибок
- New demo to animate adding or removing a start text on a
TimeText
. ( I16d75 ) - Add tests for
HorizontalPageIndicator.PagesState
( I64ed0 ) - Updating
TimeText
closer to UX specs ( Ib7ea1 )
Version 1.0.0-beta02
18 мая 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-beta02
, androidx.wear.compose:compose-material:1.0.0-beta02
, and androidx.wear.compose:compose-navigation:1.0.0-beta02
are released . Version 1.0.0-beta02 contains these commits.
Новые возможности
- Picker now always responds to scroll events even when in read-only mode. This avoids the need for users to first select a Picker by tapping, before they can scroll. In read-only mode, options other than that currently selected are obscured by a shim in
gradientColor
. ( I72925 ) - We have changed the UX behavior of
Chip/ToggleChip/CompactChip/SplitToggleChip
to stop them from doingfillMaxWidth
by default. Instead they will grow to fit their contents. To keep the previous behavior simply addmodifier = Modifier.fillMaxWidth()
( I60a2c , b/232206371 )
Bug Fixes
-
CurvedTextStyle
constructor taking aTextStyle
now also respects thefontWeight
(This may be added to the constructor and copy methods in future revisions of the API) ( Ieebb9 ) - Edge swiping improvements. When
Modifier.edgeSwipeToDismiss
is used and a swipe to the left is triggered from the edge area, it no longer triggers swipe-to-dismiss when swipe direction changes to the right. Previously, it was possible to trigger swipe-to-dismiss by swiping to the left and then swiping to the right.( I916ea ) -
HorizontalPageIndicator
now shows up to 6 pages on the screen. If there are more than 6 pages in total, it shows a half-size indicator on the left or right, with a smooth transition between pages.( I2ac29 ) - Improved default snap behavior on
ScalingLazyColumn
andPicker
( I49539 ) - Edge swiping improvements. When
Modifier.edgeSwipeToDismiss
is used, swipe-to-dismiss only triggers when first touch lands on the edge and swiped to the right, Previously it was possible to trigger swipe-to-dismiss by swiping from any part of the screen if a scroll reaches the start.( I8ca2a )
Version 1.0.0-beta01
11 мая 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-beta01
, androidx.wear.compose:compose-material:1.0.0-beta01
, and androidx.wear.compose:compose-navigation:1.0.0-beta01
are released . Version 1.0.0-beta01 contains these commits.
What's in Compose for Wear OS 1.0
The 1.0.0-beta01
of Compose for Wear OS marks an important milestone as the library is feature complete and the API locked.
Wear Compose Material components in the 1.0 release include:
- Material Theme - used as a replacement for the Compose for Mobile
MaterialTheme
, provides the colors, shapes and typography for building components on Wearables that implement the Wear Material Design UX guidelines out of the box. -
Button
,CompactButton
andToggleButton
- Button offers a single slot to take an icon, image or short text (3 characters max). Circular in shape with recommended sizes for default, large or small buttons.CompactButton
offers a single slot to take any content (icon, image or text) and is circular in shape with background size extra small.CompactButton
has optional transparent padding around the background that increases the clickable area.ToggleButton
is a button that offers a single slot to take any content (short text, icon or image) and has on/off (checked/unchecked) states with coloring and different icons to show whether checked or not - Cards - used to display information about applications such as notifications. Flexible design for different use cases with
AppCard
andTitleCard
giving different layouts and support for images as either card contents or backgrounds. - Chips - stadium shaped components similar to buttons, but with a larger area and multiple slots to allow for labels, secondary labels and icons. In different sizes and with support for images as backgrounds.
- ToggleChips and SplitToggleChips - a Chip with a checked/unchecked state and the addition of a
ToggleControl
slot to show an icon such as a switch or radio button to show the checked state of the component. In addition, theSplitToggleChip
has two tappable areas, one clickable and one toggleable. - CircularProgressIndicator - Wear Material progress indicator with two variations. The first expresses the proportion of completion of an ongoing task and supports a gap in the circular track between start and end angles. The second indicates indeterminate progress for an unspecified wait time.
- curvedText - forms part of the DSL for describing
CurvedLayouts
, along withcurvedRow
andcurvedColumn
, to lay out components around circular devices. See Wear Component Foundation below for more details onCurvedLayout
andCurvedModifier
(this plays a similar role to Modifiers in the non curved world and allows for configuration of various aspects of layout, padding, gradients, etc). - Dialog, Alert and Confirmation - Dialog displays a full-screen dialog, layered over any other content, and supports swipe-to-dismiss. It takes a single slot which is expected to be opinionated Wear Material dialog content such as Alert or Confirmation. Alert is opinionated dialog content with slots for icon, title and message. It has overloads for either two negative and positive buttons shown side-by-side or a slot for one or more vertically stacked chips. Confirmation is opinionated dialog content that displays a message for a given duration. It has a slot for an icon or image (that could be animated).
- HorizontalPageIndicator - shows horizontal page position in a fashion appropriate to the Wearable form factor. Designed to take the full screen and show a curved indicator on round devices. Can be used with the Accompanist page viewer.
- Icon - A Wear implementation of Icon which takes color and alpha from the Wear Material Theme. For a clickable icon, see Button or Chip.
- Picker - displays a scrollable list of items from which to pick. By default, items will be repeated 'infinitely' in both directions. Can be displayed in read-only mode to hide unselected options.
- PositionIndicator - shows scroll position or other positional indication in a fashion appropriate to the Wearable form factor. Designed to take the full screen and shows a curved indicator on round devices.
- Scaffold - implements the basic Wear Material Design visual layout structure. This component provides an API to put together several Wear Material components (such as
TimeText
,PositionIndicator
andVignette
) constructing the screen, ensuring proper layout strategy for them and collecting necessary data so these components will work together correctly. - ScalingLazyColumn - a scrolling scaling/fisheye list component that forms a key part of the Wear Material Design language. Provides scaling and transparency effects to the content items.
ScalingLazyColumn
is designed to be able to handle potentially large numbers of content items, which are only materialized and composed when needed. - Slider - allows users to make a selection from a range of values. The range of selections is shown as a bar, which can optionally be displayed with separators.
- Stepper - a full-screen component that allows users to make a selection from a range of values, using increase/decrease buttons at the top and bottom of the screen, with a slot in the middle for Text or a Chip.
- SwipeToDismissBox - handles the swipe-to-dismiss gesture. It takes a single slot for the background (only displayed during the swipe gesture) and the foreground content. Can optionally be combined with the androidx navigation library by using
SwipeDismissableNavHost
(see Wear Compose Navigation library below). - Text - A Wear implementation of the Compose Material Text component, taking color and alpha from the Wear Material Theme
- TimeText - a component for showing Time and application status at the top of the screen. Adjusts to screen shape by using curved text on round screens.
Vignette - a screen treatment for use in the Scaffold that blurs top and bottom of screen when scrollable content is in use.
The following components are also included from Wear Compose Foundation:
CurvedLayout - Wear Foundation
CurvedLayout
is a layout composable that places its children in an arc, rotating them as needed. This is similar to a Row layout curved into a segment of an annulus. Note that the content of aCurvedLayout
is not a composable lambda - rather, it is a DSL (domain-specific language). All elements in the CurvedLayout's DSL support an optional modifier parameter, created fromCurvedModifier
.basicCurvedText - an element in the
CurvedLayout
DSL,basicCurvedText
allows developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen).basicCurvedText
can be only created within theCurvedLayout
to ensure the best experience, like being able to specify the positioning, and usingCurvedModifiers
. Note that in most cases curvedText should be used instead, since it uses Material theming.curvedComposable - wraps normal composable content so that it can be used with
CurvedLayout
. IfcurvedComposable
has several elements inside, they will be drawn on top of each other (like a Box). To put several composables along a curve, wrap each one withcurvedComposable
.curvedRow and curvedColumn - similar to Row and Column,
curvedRow
andcurvedColumn
can be nested inside aCurvedLayout
to lay elements out as needed. For acurvedRow
, the angular layout direction and radial alignment may be specified. For acurvedColumn
, the angular alignment and radial direction may be specified.CurvedModifier - all curved components accept a modifier parameter that can be created using
CurvedModifier
: background, size, weight and padding are supported.The following component is also included from Wear Compose Navigation:
SwipeDismissableNavHost - provides a place in the Compose hierarchy for self-contained navigation to occur, with backwards navigation provided by a swipe gesture. Content is displayed within a
SwipeToDismissBox
, showing the current navigation level. During a swipe-to-dismiss gesture, the previous navigation level (if any) is shown in the background.See previous release notes for the various Alpha releases for more details of what has been delivered.
Изменения API
- Added
CurvedModifier.padding*
functions. These are used to specify additional space to be added around a curved component. ( I4dbb4 ) - Removed
CompositionLocal
internal class ( I42490 ) - We have added constant values for
Button
,CompactButton
andToggleButton
icon sizes, as guidance ( I57cab ) - Add enabled parameter to
AppCard
andTitleCard
. Now they have a similar API toandroidx.compose.material
Cards. When the parameter is set to false, the card will not be clickable. ( Idc48d , b/228869805 )
Исправления ошибок
- Stepper now disables the decrease and increase buttons when the lower/upper limits have been reached (and applies ContentAlpha.disabled to the iconColor) ( I4be9f )
- We have added 1dp padding around Picker contents when drawn with a gradient to prevent jitter on text seen when swiping. ( I0b7b9 )
- Add screenshot tests for
PositionIndicator
( I5e8bc ) - Add more tests for
AppCard
andTitleCard
( I85391 , b/228869805 )
Version 1.0.0-alpha21
20 апреля 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha21
, androidx.wear.compose:compose-material:1.0.0-alpha21
, and androidx.wear.compose:compose-navigation:1.0.0-alpha21
are released . Version 1.0.0-alpha21 contains these commits.
Новые возможности
- Added new curved modifiers to specify the background of a curved element:
CurvedModifier.background
,.radialGradientBackground
and.angularGradientBackground
( I8f392 ) - Allow curved text overflow mode (clip/ellipsis/visible) to be specified. ( I8e7aa )
- Added
CurvedModifier.weight
modifier, similar to the one in Compose. This can be used on children of curvedRow and CurvedLayout (for width) and children of curvedColumn (for height). ( I8abbd ) - Added
CurvedModifier.size
,.angularSize
and.radialSize
modifiers to specify the size of a curved element. ( I623c7 )
Изменения API
- Reorder parameters to ensure background is before color consistently across the Wear Compose API ( I43208 )
- Removed clockwise &
insideOut
parameters and replaced with more expressive constants on new classes. Curved layout direction can now beLayoutDirection
aware, and it is inherited when not specified ( If0e6a ) - We have replaced
autoCenter: Boolean
withautoCenter: AutoCentringParams
in order to fix an API issue with theScalingLazyColumn
. ( Ia9c90 ) - We have renamed
iconTintColor
andtoggleControlTintColor
toiconColor
andtoggleControlColor
throughout the API (Chip/ToggleChip/Dialog/Slider/Stepper/...) as the color is applied to the icon/toggleControl slot. ( Ied238 ) - Rewrite
PageIndicatorStyle
enum into value class ( I2dc72 ) - We have added
RowScope/ColumnScope/BoxScope
to some of the slots in our Composables to indicate to developers what the layouts assumptions are. This will allow developers to use additional modifiers on some slot content and avoid the need to provide extra layout elements. Additionally we have made some minor updates to the AppCard/TitleCard colors so thattimeColor
andappColor
default tocontentColor
, these properties can still all be individually overridden if needed. ( I26b59 ) - Made
SwipeToDismissBoxState.Companion
object private ( I39e84 ) - Fix parameters order for
InlineSlider
andStepper
. A simple change to follow api guidelines ( I11fec ) - We have removed the Saver object for
SwipeToDismissBoxState
as it was not used. ( Ifb54e ) - We have updated
CompactChip
to bring it inline with the latest UX Specification. Padding has been reduced to horizontal = 12.dp and vertical = 0.dp. The font for label has been changed from button to caption1. The recommended icon sizes are 20x20 when both icon and label are present and 24x24 for an icon only compact chip. For the icon only use case we have also ensured that the icon is center aligned. ( Iea2be ) - We have added a number of new fields to
ScalingLazyListLayoutInfo
to enable developers to know the amount ofcontentPadding
andautoCenteringPadding
that has been applied. These can be useful for developers when calculating fling/scroll ( I7577b ) - We have implemented in/out transitions for Dialog. A
showDialog
parameter has been added and the Dialog now controls its own visibility (this enables Dialog to run the intro and outro animations when the Dialog is shown/hidden). Note that the outro animation is not performed when the user leaves the dialog via swipe-to-dismiss. We have also added a default value for state in the recently addedSwipeToDismissBox
overload. ( I682a0 ) - In order to better support i18n and a11y we have changed
ToggleChip
andSplitToggleChip
so that they no longer have a default for thetoggleControl
slot. We have also changedToggleChipDefaults
so that the following methods now return ImageVector rather than Icon (note that as they no longer return @Composables they have changed to start with lower case),SwitchIcon()->switchIcon()
,CheckboxIcon->checkboxIcon()
andRadioIcon()->radioIcon()
- this allows and encourages developers to create their ownIcon()
composables with an appropriatecontentDescription
set. ( I5bb5b ) - We have added a
SwipeDismissableNavHostState
parameter toSwipeDismissableNavHost
. This supports use of edge-swiping on screens used as navigation destinations, becauseSwipeToDismissBoxState
can now be hoisted and used to initialize bothSwipeDismissableNavHostState
andModifier.edgeSwipeToDismiss
on screens that require edge-swiping. ( I819f5 , b/228336555 )
Bug Fixes
- Ensure curved layouts are updated when needed. ( Ie8bfa , b/229079150 )
- Bug fix for https://issuetracker.google.com/issues/226648931 ( Ia0a0a , b/226648931 )
- Removed unnecessary experimental annotations ( I88d7e )
Version 1.0.0-alpha20
6 апреля 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha20
, androidx.wear.compose:compose-material:1.0.0-alpha20
, and androidx.wear.compose:compose-navigation:1.0.0-alpha20
are released . Version 1.0.0-alpha20 contains these commits.
Новые возможности
- Add
edgeSwipeToDismiss
modifier forSwipeToDismiss
. AllowsswipeToDismiss
to be active only on the left edge of the viewport. Used when the center of the screen needs to be able to handle horizontal paging, such as 2-d scrolling a Map or swiping horizontally between pages.( I3fcec , b/200699800 )
Изменения API
- Base implementation of
CurvedModifiers
, this opens the way to introduce ways to customize curved content (but noCurvedModifiers
are provided yet, and the ability to create custom modifiers may be available later) ( I9b8df ) -
EdgeSwipe
modifier documentation and default values update for better understanding .( I6d00d ) - Add
PageIndicator
slot into Scaffold. By addingPageIndicator
directly into Scaffold we might assure that it will be correctly shown on circular devices. ( Ia6042 ) - Remove default Icons from
InlineSlider
and Stepper parameters. This will help developers to be more attentive to localization and accessibility requirements. Usages of default icons were shown in demos and samples. ( I7e6fd ) - Replace Trailing and Leading parameter names with Start and End in TimeText ( Iaac32 )
- We have added a
SwipeToDismissBox
overload with anonDismissed
parameter to support the common usage of triggering a navigation event when the swipe gesture has completed. ( I50353 , b/226565726 ) - Removed
ExperimentalWearMaterialApi
annotations fromTimeText
usage ( Ide520 ) - We have marked
ScalingLazyList/Column
scope and info interfaces as sealed as they are not intended for external developers to implement and this will allow us to add new members in them in future without binary breaking changes. ( I7d99f ) - We have added a new
flingBehaviour
property to the Picker and aPickerDefaults.flingBehaviour()
method to enable configuration of the fling behavior such as adding RSB support.PickerState
now implements theScrollableState
interface. ( Ib89c7 )
Bug Fixes
- Update the Android Runtime (ART) baseline profile rules for Wear Compose libraries. ART can leverage profile rules on devices in order to compile ahead-of-time a specific subset of the application to improve the performance of the application. Note that this will have no effect on debuggable applications. ( Iaa8ef )
- Improve documentation ( I2c051 )
Version 1.0.0-alpha19
23 марта 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha19
, androidx.wear.compose:compose-material:1.0.0-alpha19
, and androidx.wear.compose:compose-navigation:1.0.0-alpha19
are released . Version 1.0.0-alpha19 contains these commits.
Изменения API
- Renamed
CurvedRow
toCurvedLayout
, and reworked to be a scope with a DSL. Using this DSL, more complex curved layouts can be specified using a series of nestedcurvedRow
andcurvedColumn
(Which are the curved layout equivalents of Row and Column). Inside these layout elements, three elements can be used:curvedComposable
(to add any @Composable),basicCurvedText
(foundation's curved text) andcurvedText
(wear material aware curved text). ( Ib776a ) - Make the side for the
PositionIndicator
configurable. The basic PositionIndicator's position can now be configured to be End (layout direction-aware), OppositeRsb (takes into account screen rotation, to position itself opposite to the physical RSB), or the absolutes Left & Right. ( I2f1f3 ) - For
SwipeToDismissBox
, we have renamedSwipeDismissTarget
.Original toSwipeToDismissValue.Default
andSwipeDismissTarget.Dismissal
toSwipeToDismissValue.Dismissed
. We have also movedSwipeToDismissBoxDefaults.BackgroundKey
andSwipeToDismissBoxDefaults.ContentKey
toSwipeToDismissKeys.Background
,SwipeToDismissKeys.Content
respectively. ( I47a36 ) - We have added a read-only mode to Picker, for screens with multiple Pickers where only one Picker is editable at a time. When the Picker is read-only, it displays the currently selected option, and a label if one has been provided. ( I879de )
-
SwipeToDismissBoxState
has been refactored to restrict the scope ofExperimentalWearMaterialApi
toModifier.swipeable
andSwipeableState
, which are now used internally.SwipeToDismissBoxState
now hascurrentValue
,targetValue
,isAnimationRunning
andsnapTo
members to support common use cases - please let us know if you require any further properties to be made available. Also fixed the behavior ofSwipeableState
in the case where the swipe offset is within a rounding error of an anchor. ( I58302 )
Bug Fixes
- Simplified and fixed code to detect if the content of a
ScalingLazyColumn
can be scrolled (used to decide if we display a scrollbar or not) ( I7bce0 ) - Fixed a bug on Position Indicator when used with more than one state and switching between them ( I320b5 )
- We have updated the default Compose for Wear OS theme typography/fonts to match our latest UX guidance. Of note display1 (40.sp) and display2 (34.sp) are now smaller than their previous values and various other minor updates to line height and line spacing have been made. ( Ie3077 )
- We have added resistance to
SwipeToDismissBox
so that motion only happens when swiping to dismiss and not at all in the opposite direction. ( Ifdfb9 ) - We have changed some of the default parameter values for the
CircularProgressIndicator
functions to bring them in-line with Wear Material Design UX guidance. For the Spinner/Indeterminant version the size (40->24.dp), indicatorColor (primary->onBackground), trackColor transparency (30%->10%) and stroke width (4->3dp) have been updated. For the Progress/Determinate version the trackColor transparency (30%->10%) has been updated. ( I659cc ) - We have updated the default scaling params of the
ScalingLazyColumn
in-line with the latest Wear Material Design UX specifications. Visually this results in list items starting to be scaled closer to the list center, but being less scaled at the list edge than before. ( Ica8f3 ) - Some adjustments to
ScalingLazyColumnDefaults.snapFlingBehavior
to improve the end of the animation ( If3260 )
Version 1.0.0-alpha18
9 марта 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha18
, androidx.wear.compose:compose-material:1.0.0-alpha18
, and androidx.wear.compose:compose-navigation:1.0.0-alpha18
are released . Version 1.0.0-alpha18 contains these commits.
Изменения API
- Several improvements to PositionIndicator: ShowResult renamed PositionIndicatorVisibility. Some performance improvements to avoid recomputations when not needed ( Iaed9d )
- The recommended coloring for the
SplitToggleChip
has been updated. SplitToggleChip's now have a solid colored background when checked or unchecked with the coloring of the ToggleControl being the primary indication of whether the component is checked or not. We have added a newToggleDefaults.splitToggleChipColors()
to support the new color scheme. We have also simplified thetoggleChipColors()
methods removing the splitBackgroundOverlayColor ( I7e66e ) - We have added unadjustedSize to the
ScalingLazyListItemInfo
as it is not safe to calculate the original item size using the scaled size and scaling factor due to float maths precision. ( I54657 , b/221079441 ) - Add
HorizontalPageIndicator
. It represents a total number of pages and a selected page. Might be linear or curved, depending on the shape of the device. It also supports custom indicator shape, which defines how each indicator is visually represented. ( Iac898 ) - We have updated
PickerState
so that the numberOfOptions can be updated. This supports use-cases such as aDatePicker
, when the number of days in the month changes depending on the month selected. The constructor parameter for PickerState has changed to initialNumberOfOptions accordingly. ( Iad066 ) - Hide the
PositionIndicator
when is a scrollbar and can't scroll. ( Id0a7f ) - For consistency with Scaffold, our full-screen Dialog component now displays a
PositionIndicator
and aVignette
. We are also now usingScalingLazyColumn
instead ofColumn
, which means that the Dialog contents are now inScalingLazyListScope
(and typically need to be enclosed by item { /* content */ }). Dialog supports the verticalArrangement parameter accordingly. ( Idea13 ) - We have changed the name of
ToggleChip
andSplitToggleChip
toggleIcon property to toggleControl to better align with Material Design in order to help designers and developers navigate the API. ( If5921 , b/220129803 ) - We have added a new entry caption3 to the Wear Material Theme Typology.Caption3 is a small font used for the extra long-form writing like legal texts. ( I74b13 , b/220128356 )
Bug Fixes
- Stop the snapping animation when we are there. ( Idb69d )
- Animate changes in PositionIndicator. ( I94cb9 )
- Based on UI/UX feedback we have changed the
ScalingLazyColumn
autoCentering so that it will provide only enough space to make sure the items with indexScalingLazyListState.initialCenterItemIndex
or higher will be able to be fully scrolled to the center of the viewport. This allows developers to place one or two items about the item initially in the center which are not scrollable into the middle. This will mean that an autoCenter'ingScalingLazyColumn
will not be able to scroll above theinitialCenterItemIndex/initialCenterItemScrollOffset
( I22ee2 ) - We have added a demo for a Date Picker and fixed a bug in
PickerState
where the initiallySelectedOption was not applied until the Picker had been displayed. ( Id0d7e ) - In order to reduce the clipping of wider
ScalingLazyColumn
items on circular screens we have increased the default horizontal content padding from 8 to 10 dp. ( I0d609 ) - Ensure the
PositionIndicator
is shown when scrolling. ( Ied9a2 )
Version 1.0.0-alpha17
23 февраля 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha17
, androidx.wear.compose:compose-material:1.0.0-alpha17
, and androidx.wear.compose:compose-navigation:1.0.0-alpha17
are released . Version 1.0.0-alpha17 contains these commits.
Новые возможности
- We have added snap support that can be used with
ScalingLazyColumn
. SetflingBehavior = ScalingLazyColumnDefaults.flingWithSnapBehavior(state)
to enable snap support. ( I068d3 , b/217377069 ) - We have added demos for Picker used to select a time in either 24 hour or 12 hour clock. ( Ie5552 )
Изменения API
- Fix an issue with
TimeText
custom fonts & styles on square device ( Iea76e ) -
ScalingLazyListLayoutInfo
now hasreverseLayout
,viewportSize
and orientation properties matching those fromLazyListLayoutInfo
( I4f258 , b/217917020 ) -
ScalingLazyColumn
now has auserScrollEnabled
property matching that fromLazyList
( I164d0 , b/217912513 ) - Pickers now have a gradient on the top and bottom by default ( Iab92a )
Bug Fixes
- We have modified
ScalingLazyColumn
so that it no longer greedily fills all of the space in its parent. Instead it will take its size from the size of its contents. This makes it consistent with the behaviour ofLazyColumn
. If you want to reinstate the old behaviour then passModifier.fillMaxWidth()/width()/widthIn()
to theScalingLazyColumn
( I51bf8 ) - We have improved the exception message in
SwipeDismissableNavHost.kt
that was triggered if the navigation backstack was empty. ( I1b1dc )
Version 1.0.0-alpha16
9 февраля 2022 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha16
, androidx.wear.compose:compose-material:1.0.0-alpha16
, and androidx.wear.compose:compose-navigation:1.0.0-alpha16
are released . Version 1.0.0-alpha16 contains these commits.
Новые возможности
- Add
CircularProgressIndicator
. Progress indicators display the length of a process or an unspecified wait time. Supports a gap (cutout) for TimeText or other components if used full-screen. ( Iab8da )
Изменения API
- Pickers now have a
flingBehavior
parameter, the default value makes them snap to the closest option when scrolling/flinging. ( I09000 ) - Additional integer API for InlineSlider and Stepper ( I1b5d6 )
Bug Fixes
- We have changed the default initialCenterItemIndex for the
ScalingLazyListState
from 0->1. This means that unless overridden on state construction withScalingLazyListState.rememberScalingLazyListState(initialCenterItemIndex =
)
then the 2nd list item (index == 1) will be placed in the center of the viewport at initialization and the 1st (index == 0) item will be placed before it. This allows for a better default visual effect out of the box as most of the viewport will be filled with list items. ( I0c623 , b/217344252 ) - We have reduced the
ScalingLazyColumn
defaultextraPadding
that is provided to ensure that there are plenty of list items to draw (even when we are scaling some of them down in size) from 10% to 5%. This will avoid composing extra list items that might not appear in the viewport. If non standard scalingParams are being used (more extreme scaling for instance) the developer can adjust extra padding usingviewportVerticalOffsetResolver
. ( I76be4 ) - Fix an issue with TimeText on multiple lines on square device ( Ibd3fb )
- We have modified
ScalingLazyColumn
so that it no longer greedily fills all of the space in its parent. Instead it will take its size from the size of its contents. This makes it consistent with the behavior ofLazyColumn
. If you want to reinstate the old behavior then passModifier.fillMaxSize()
to theScalingLazyColumn
- NOTE: This change is incomplete and will be addressed in a follow up change in the next Alpha release. ( I3cbfa )
Version 1.0.0-alpha15
26 января 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha15
, androidx.wear.compose:compose-material:1.0.0-alpha15
, and androidx.wear.compose:compose-navigation:1.0.0-alpha15
are released . Version 1.0.0-alpha15 contains these commits.
Изменения API
- We have added a new property
autoCentering
to theScalingLazyColumn
. When true (the default) this will ensure that all items including the first and last can be scrolled so that they are visible in the center of the lists viewport. Note that if using auto-centering you will probably want to set vertical content padding to 0.dp. If both autoCentering and vertical content padding are provided then they will both result in additional space being available before the first and after the last list items allowing them to be scrolled even further. ( I2a282 , b/214922490 ) - We have added a
Dialog
component that enables any composable to trigger a full screen dialog that sits on top of other content. When shown, the dialog supports swipe-to-dismiss and will show its parent's content in the background during the swipe gesture. The dialog content is expected to beAlert
orConfirmation
(renamed from earlier componentsAlertDialog
andConfirmationDialog
) -Alert
,Confirmation
andDialog
are all in theandroidx.wear.compose.material.dialog
package. Alert and Confirmation can be used as navigation destinations. Also, added ColumnScope to Alert and Confirmation parameters as necessary. ( Ia9014 ) - We have removed
onSurfaceVariant2
from the Compose for WearOS Material Theme Colors and replaced uses in the library withonSurfaceVariant
. ( Icd592 ) - Added a method to programmatically select an option on the
PickerState
, the initially selected option can now also be specified when creating aPickerState
. ( I92bdf ) - We have added support for customizing the fling behavior of the
ScalingLazyColumn
. ( I1ad2e , b/208842968 ) - We have added
NavController.currentBackStackEntryAsState()
to theWear.Compose.Navigation
library. ( If9028 , b/212739653 ) - Added
Modifier.onRotaryScrollEvent()
andModifier.onPreRotaryScrollEvent()
for Wear devices with a rotating side button.( I18bf5 , b/210748686 )
Version 1.0.0-alpha14
12 января 2022 года
androidx.wear.compose:compose-foundation:1.0.0-alpha14
, androidx.wear.compose:compose-material:1.0.0-alpha14
, and androidx.wear.compose:compose-navigation:1.0.0-alpha14
are released . Version 1.0.0-alpha14 contains these commits.
Новые возможности
We have added a number of methods to
ScalingLazyListState
to allow developer control over scrolling to specific list items and also setting the initial list item and offset.As part of this change we have also modified the ScalingLazyList so that it is oriented around the center of the viewport of the ScalingLazyList rather than the start of the viewport.
A new property
anchorType: ScalingLazyListAnchorType = ScalingLazyListAnchorType.ItemCenter
has been added to theScalingLazyList
to control whether the center (ScalingLazyListAnchorType.ItemCenter
) orEdge
(ScalingLazyListAnchorType.ItemStart
) should be aligned to the viewport's centerline.As a result the
ScalingLazyListItemInfo.offset
andScalingLazyListItemInfo.adjustedOffset
have changed and will now reflect the offset of the item with respect to both the position of the list item and theanchorType
of the list. Eg for aScalingLazyColumn
withanchorType
ofItemCenter
and an list item positioned with its center on the centerline of the viewport the offset would be0
.The new methods are
scrollTo
,animatedScrollTo
,centerItemIndex
, andcenterItemOffset
. ( I61b61 )We have added a back button handler to
SwipeDismissableNavHost
, so that pressing back navigates to the previous level in the navigation hierarchy. ( I5b086 , b/210205624 )
Version 1.0.0-alpha13
15 декабря 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha13
, androidx.wear.compose:compose-material:1.0.0-alpha13
, and androidx.wear.compose:compose-navigation:1.0.0-alpha13
are released . Version 1.0.0-alpha13 contains these commits.
Изменения API
- We have made
RangeIcons
internal (referenced internally byInlineSlider
andStepper
). ( I927ec )
Bug Fixes
Fixed an issue where
SwipeDismissableNavHost
would add a destination to the Compose hierarchy before it has reached theCREATED
Lifecycle state, resulting in anIllegalStateException
. This fix was a prerequisite to updating dependency onnavigation-compose
to2.4.0-beta02
and beyond. ( I40a2b , b/207328687 )Added a Drawables enum class for getting drawable resources within the Wear Compose library, so that reflection is no longer needed. This fixes a bug where library drawables were removed when
minifyEnabled=true
orshrinkResources=true
). ( Ib2a98 )Added tests for
Stepper
in Wear Compose ( I2d03a )Added samples for
SwipeDismissableNavHost
in Wear Compose Navigation. ( I85f06 )
Version 1.0.0-alpha12
1 декабря 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha12
, androidx.wear.compose:compose-material:1.0.0-alpha12
, and androidx.wear.compose:compose-navigation:1.0.0-alpha12
are released . Version 1.0.0-alpha12 contains these commits.
Новые возможности
We have added a Stepper component which allows users to make a selection from a range of values. Stepper is a full-screen control with increase and decrease buttons at the top and bottom, and a slot in the middle (expected to take either a Chip or Text). The button icons can be customized if required. ( I625fe )
We have added 2 new composables for displaying dialogs: AlertDialog waits for a response from the user and displays a title, icon, message and either a) two buttons for simple positive/negative choices or b) vertically stacked chips or toggle chips for more flexible choices, ConfirmationDialog displays an acknowledgement with a timeout. This simple dialog has slots for a title and an (animated) icon. ( Ic2cf8 )
Изменения API
- Add units (millis) to suggested dialog duration values. ( I09b48 )
Версия 1.0.0-альфа11
17 ноября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha11
, androidx.wear.compose:compose-material:1.0.0-alpha11
, and androidx.wear.compose:compose-navigation:1.0.0-alpha11
are released . Version 1.0.0-alpha11 contains these commits.
Новые возможности
- We have added a picker component that lets the user select an item from a scrolling list. By default, the list of selectable items is repeated 'infinitely' in both directions, to give the impression of a rotating cylinder seen from the side. Two features will be added in later releases: snapping to a value after a swipe/fling; adding a function to PickerState to set/scroll to the current value. ( I6461b )
Изменения API
- Added a ScalingLazyItemScope and some new modifiers fillParentMaxSize/fillParentMaxWidth/fillParentMaxHeight to allow list items to be sized based on the size of the parent container. Items can be set to fill all or a fraction of the parent's size. This exposes functionality already available in the LazyRow/Column ( I4612f )
- Added support to ScalingLazyColumn to allow items to have a key. Also added convenience methods to allow adding of items from Arrays and Lists. ( Ic1f89 )
Bug Fixes
- Additional examples for TimeText ( I8cb64 )
Версия 1.0.0-альфа10
3 ноября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha10
, androidx.wear.compose:compose-material:1.0.0-alpha10
, and androidx.wear.compose:compose-navigation:1.0.0-alpha10
are released . Version 1.0.0-alpha10 contains these commits.
Новые возможности
Added an InlineSlider for wear compose. InlineSlider allows users to make a selection from a range of values. The range of selections is shown as a bar between the minimum and maximum values of the range, from which users may select a single value. ( If0148 )
Check out the new Compose for WearOS Codelab !
Изменения API
- Macrobenchmark now has a
minSdkVersion
of23
. ( If2655 )
Bug Fixes
- Update transition handling in SwipeDismissableNavHost in a SideEffect ( I04994 , b/202863359 )
- Update transition handling in SwipeDismissableNavHost ( I1cbe0 , b/202863359 )
Версия 1.0.0-альфа09
27 октября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha09
, androidx.wear.compose:compose-material:1.0.0-alpha09
, and androidx.wear.compose:compose-navigation:1.0.0-alpha09
are released . Version 1.0.0-alpha09 contains these commits.
Новые возможности
- We have launched the Developer Preview of Compose on Wear OS - see our blog post which reviews the main composables and links to further resources to starting using them.
Изменения API
- We have added support for developers to be able to customize all of the colors in the Wear Material Design Color theme. ( I4759b , b/199754668 )
Исправления ошибок
- Added SwipeToDismissBox samples that persist state ( Ibaffe )
- Added links to developer.android.com guides from KDocs for CurvedText, TimeText and SwipeToDismissBox. ( I399d4 )
- SwipeDismissableNavHost now throws if there's no current destination (indicates that the NavGraph was not built with the wear.compose.navigation.composable utility function) ( I91403 )
- Added additional documentation and examples for time source usage in TimeText ( I4f6f0 )
Version 1.0.0-alpha08
13 октября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha08
, androidx.wear.compose:compose-material:1.0.0-alpha08
, and androidx.wear.compose:compose-navigation:1.0.0-alpha08
are released . Version 1.0.0-alpha08 contains these commits.
Изменения API
- We have renamed AppCard and TitleCard
body
properties tocontent
and moved them to the end of the property list to allow them to be provided as a trailing lambda. Also renamedbodyColor
tocontentColor
for consistency with the new slot names. ( I57e78 )
Bug Fixes
- Added links to developer.android.com guides from KDocs for button, card, chip, theme, position indicator and scaling lazy column components. ( I22428 )
- Fix WearOS SwipeToDismissBox sometimes not handling swipes. ( I9387e )
- Added samples for Button, CompactButton, Chip, CompactChip, AppCard, TitleCard, ToggleButton, ToggleChip, SplitToggleChip ( Iddc15 )
- Added microbenchmark performance tests for Card, Chip, ToggleChip, TimeText and ScalingLazyColumn. ( If2fe9 )
Версия 1.0.0-альфа07
29 сентября 2021 года
androidx.wear.compose:compose-foundation:1.0.0-alpha07
, androidx.wear.compose:compose-material:1.0.0-alpha07
, and androidx.wear.compose:compose-navigation:1.0.0-alpha07
are released . Версия 1.0.0-alpha07 содержит эти коммиты.
Новые возможности
- Added a CurvedText component in material, a component allowing developers to easily write curved text following the curvature of a circle (usually at the edge of a circular screen). ( I19593 )
Изменения API
- Added tests for TimeText ( Idfead )
- Transform ArcPaddingValues into an interface. ( Iecd4c )
- Added animation to SwipeToDismissBox ( I9ad1b )
- Added hasBackground parameter to the SwipeToDismissBox API so that the swipe gesture can be disabled when there is no background content to display. ( I313d8 )
-
rememberNavController()
now takes a optional set ofNavigator
instances that will be added to the returnedNavController
to better support optional Navigators such as those from Accompanist Navigation Material . ( I4619e ) - Reference NamedNavArgument from navigation-common and remove copy from wear.compose.navigation. ( I43af6 )
Bug Fixes
- Fixed CurvedRow test flakiness on smaller devices. ( If7941 )
- Fixed possible flickering on CurvedRow when the content updates, and ensures the curved row is remeasured ( Ie4e06 )
- ChipDefaults.gradientBackgroundChipColors() has been updated in line with UX Spec changes. The gradient now starts with MaterialTheme.colors.primary with alpha 32.5% and ends with MaterialTheme.colors.surface with alpha @ 0% over a background of MaterialTheme.colors.surface @ 75% alpha. ( Id1548 )
- We have updated the colors for ToggleChips when in the selected state to match the latest Wear Material Design UX Spec guidance. When selected ToggleChips now have a gradient background from MaterialTheme.color.surface @ 0% alpha, top left, to MaterialTheme.color.primary @ 32% alpha, bottom right, over a background of MaterialTheme.color.surface @ 75% alpha. This results in a more subtle difference between checked and unchecked for the ToggleChip. ( Idd40b )
Версия 1.0.0-альфа06
15 сентября 2021 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha06
, androidx.wear.compose:compose-material:1.0.0-alpha06
, and androidx.wear.compose:compose-navigation:1.0.0-alpha06
are released . Версия 1.0.0-alpha06 содержит эти коммиты.
Новые возможности
- We have added Scaffold a top level application composable that provides a structure for handling PositionIndicators (like Scroll or Volume) position, an area at the top of the screen for displaying the time and application status, and also supports a Vignette to blur the screen top and bottom edge for scrollable content. The main area of the Scaffold is where the application contents are placed. ( I5e0bf )
- Added TimeText implementation for Wear Compose ( I5654c )
Wear Compose Navigation Library
We have added the first release of the Wear Compose Navigation library, which provides integration between the Wear Compose and Androidx Navigation libraries. It provides a simple means to navigate between @Composable functions as the destinations in your application.
This initial release provides:
- A
SwipeDismissableNavHost
composable that hosts a navigation graph and provides backwards navigation via swipe gestures -
NavGraphBuilder.composable
extension to assist with constructing navigation graphs -
rememberSwipeDismissableNavController()
to allow hoisting state
- A
Example usage where we create two screens and navigate between them:
val navController = rememberSwipeDismissableNavController() SwipeDismissableNavHost( navController = navController, startDestination = "start" ) { composable("start") { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, modifier = Modifier.fillMaxSize(), ) { Button(onClick = { navController.navigate("next") }) { Text("Go") } } } composable("next") { Column( horizontalAlignment = Alignment.CenterHorizontally, verticalArrangement = Arrangement.Center, modifier = Modifier.fillMaxSize(), ) { Text("Swipe to go back") } } }
Wear Compose Navigation is packaged as a separate library so that simple WearCompose applications that implement their own hand-rolled navigation are not required to depend on the Androidx Navigation library.
Изменения API
- Updated
SwipeDismissableNavHost
to supportrememberSaveable
by setting the key identity for background and content ( I746fd ) - We have added a PositionIndicator adapter that can handle LazyListState ( I21b88 )
- Updated SwipeToDismissBox to support rememberSaveable ( Ie728b )
- We have added reverseLayout support to the ScalingLazyColumn. This allows for the reversing of the direction of scrolling and layout ( I9e2fc )
- Deprecated
performGesture
andGestureScope
, which have been replaced byperformTouchInput
andTouchInjectionScope
. ( Ia5f3f , b/190493367 ) - We have renamed VignetteValue to VignettePosition and renamed VignetteValue.Both renamed to VignettePosition.TopAndBottom. ( I57ad7 )
- We have renamed ScalingLazyColumnState to ScalingLazyListState, ScalingLazyColumnItemInfo to ScalingLazyListItemInfo, ScalingLazyColumnLayoutInfo to ScalingLazyListLayoutInfo and ScalingLazyColumnScope to ScalingLazyListScope in case we decide to add a ScalingLazyRow implementation in the future. ( I22734 )
Исправления ошибок
- Updated CompactChip documentation to describe what happens if neither an icon nor a label is provided. ( I4ba88 )
- We have made some adjustments to the Wear card components. ( I6b3d0 )
- TitleCard spacing between Title and Body reduced from 8.dp to 2.dp.
- TitleCard header font changed from body to title3.
- Card background gradient changed to make the background appear darker.
Версия 1.0.0-альфа05
September 1, 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha05
and androidx.wear.compose:compose-material:1.0.0-alpha05
are released. Версия 1.0.0-alpha05 содержит эти коммиты.
Изменения API
- Mark ArcPaddingValues as @Stable ( I57deb )
- ScalingLazyColumnState now implements the ScrollableState interface giving developers programmatic access to scroll the component. ( I47dbc )
Bug Fixes
- We have reduced the spacing between Icon and Text in Chip and ToggleChip to bring them in line with updates to the UX Spec. ( I83802 )
Версия 1.0.0-альфа04
18 августа 2021 г.
androidx.wear.compose:compose-foundation:1.0.0-alpha04
and androidx.wear.compose:compose-material:1.0.0-alpha04
are released. Версия 1.0.0-alpha04 содержит эти коммиты.
Новые возможности
- Added a SwipeToDismissBox and swipeable modifier that can be used to support a left-to-right swipe-to-dismiss gesture. Although independent of navigation components, this is expected to be used to exit one screen and navigate to another. Added integration tests to demo swipe-to-dismiss. ( I7bbaa )
- We have added ScalingLazyColumnItemInfo and ScalingLazyColumnLayoutInfo interfaces to ScalingLazyColumnState class to enable developers to know the actual positions and sizes of items in the ScalingLazyColumn after scaling has been applied. We have also fixed a bug with the way that scaling was calculated when 'top' content padding is applied to the ScalingLazyColumn. ( I27c07 )
Изменения API
- Add CurvedTextStyle class to specify curved text styling Options. Similar to TextStyle, but now only supports color, fontSize and background. More styling options will be added in the future. ( I96ac3 )
- We have added ScalingLazyColumnItemInfo and ScalingLazyColumnLayoutInfo interfaces to ScalingLazyColumnState class to enable developers to know the actual positions and sizes of items in the ScalingLazyColumn after scaling has been applied. We have also fixed a bug with the way that scaling was calculated when 'top' content padding is applied to the ScalingLazyColumn. ( I27c07 )
- Added
@ExperimentalWearMaterialApi
toSwipeDismissTarget
enum, part of theSwipeToDismissBox
API. ( I48b5e )
Bug Fixes
- Added test material for SwipeToDismissBox ( I9febc )
Версия 1.0.0-альфа03
August 4, 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha03
and androidx.wear.compose:compose-material:1.0.0-alpha03
are released. Версия 1.0.0-alpha03 содержит эти коммиты.
Изменения API
- Added CurvedText component, that allows developers to easily write text following the curvature a circle (usually at the edge of a circular screen) ( Id1267 )
- We have renamed
CardDefaults.imageBackgroundPainter()
toCardDefaults.imageWithScrimBackgroundPainter()
to make it clear that the background image with have a scrim drawn over it. ( I53206 ) - Adding ScalingLazyColumn component that provides a list component for Wear Material that gives a fisheye view with the list contents scaling down in size and becoming transparent as they scale towards the edge of the component. ( I7070c )
Bug Fixes
- We changed the default color of the appName content in AppCard in response to a UX Spec update. The default color for the appName is now
MaterialTheme.colors.onSurfaceVariant
. Additionally added a missing parameter doc description for the title slot. ( Ic4ad1 )
Версия 1.0.0-альфа02
July 21, 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha02
and androidx.wear.compose:compose-material:1.0.0-alpha02
are released. Версия 1.0.0-alpha02 содержит эти коммиты.
Новые возможности
- Added a new class CurvedRow to laid out composables in an arc ( I29941 )
- Added a new type of card for use in applications (TitleCard), also add support for having images as the background to Cards to emphasize their contents ( I53b0f )
Изменения API
- Add support for radial alignment to CurvedRow (similar to the vertical alignment in a row) ( Id9de5 )
- Add a new class CurvedRow to laid out composables in an arc ( I29941 )
- Added a new type of card for use in applications (TitleCard), also add support for having images as the background to Cards to emphasize their contents ( I53b0f )
- Added toggle icons (checkbox, switch and radio buttons) to ToggleChipDefaults to make it easier for developers to configure ToggleChip and SplitToggleChips ( I7b639 )
- The start and end content padding for Chips has been updated so that it is consistently 14.dp regardless of whether the Chip has an icon present or not (was previously 12.dp if icon present and 14.dp if not) ( I34c86 )
Bug Fixes
- Add tests for CurvedRow ( I93cdb )
- Tying Wear Compose dependencies to Compose 1.0.0-rc01. ( Ie6bc9 )
- Changed the handing of background image painting in Cards and Chips so that the image is Cropped rather than being stretched in order to maintain image proportions. ( I29b41 )
- Added more demos and integration tests for Button and ToggleButton. ( 5e27ed2 )
- Added more Chip tests to cover the content colors for imageBackgroundChips ( Ia9183 )
Версия 1.0.0-альфа01
July 1, 2021
androidx.wear.compose:compose-foundation:1.0.0-alpha01
and androidx.wear.compose:compose-material:1.0.0-alpha01
are released. Версия 1.0.0-alpha01 содержит эти коммиты.
Новые возможности
Wear Compose is a Kotlin, Compose-based library that supports Wear Material design, an extension of Material Design for WearOS wearables. This first alpha release contains early, functional implementations of the following:
- Material theme - configures the colors, typography and shapes consistently across the components used from this library.
- Chip, CompactChip - chips are stadium shaped and variations are available to take icon, label and secondary label content.
- - ToggleChip, SplitToggleChip - a specialized type of chip that includes a slot for a bi-state toggle icon such as a radio button or checkbox. In addition, the SplitToggleChip has two tappable areas, one clickable and one toggleable.
- Button, CompactButton - buttons are circular in shape, with a single content slot for an icon or minimal text (maximum 3 characters).
- ToggleButton - a button that turns an action on or off, with a single slot for icon or minimal text (maximum 3 characters).
- Card, AppCard - rectangular shaped with rounded corners, offering slots for content such as app icon, time, title and body.
Future releases will extend the Widget set adding support for Wear Material Design pickers, sliders, lists, page indicators, dialogs, scroll rsb indicators, toasts and more.
Additionally support will be provided for other Wearable Specific features such as curved layouts and text, as well as scaffolding to make it easy for developers to build Wearable apps/overlays.
Wear Compose Material is designed with the same principles as Compose Material, although being targeted at wearables. The Wear Compose Material library should be used in place of the Compose Material library when building for a Wearable device.
The two “Material” libraries should be considered mutually exclusive and should not be mixed in the same app. If developers find themselves including the Compose Material library in their dependencies it would suggest that either a) there are components missing from the Wear Compose Material library, please let us know what you need, or b) are using a component that we do not recommend for use on a Wearable Device.