COUI 界面Demo
正式版
5
查看
0
讨论
6
收藏
new_releases 更新日志
COUI 2.1.0 brings the icons and the motion in line with ColorOS 17: every extended icon is now the drawing ColorOS itself uses, and every component's animation and touch handling was checked against the COUI 17 code again — popup menus, press feedback, top bars, page switches, overscroll, dialogs, sheets, pickers and the rest.
A few small breaking changes. Read the upgrade guide before updating.
Breaking
Extended icons are the ColorOS 17 drawings, in a single weight: COUIIcons.Light, Normal, Regular, Medium and Demibold are removed. Use COUIIcons.<Name>; the names are unchanged, the shapes are new, so check icon sizes in your layouts.
NavigationRailDefaults.SelectedPressedAlpha, UnselectedPressedAlpha and UnselectedAlpha are removed; NavigationRailItem takes the COUI rail colours (NavigationRailDefaults.itemColors()).
FloatingAccessoryNavigationBar gained visible after backgroundModifier; pass it by name.
Changed without any code edit on your side
Popup menus deform and follow the finger for the whole press-and-slide, also after the list inside starts scrolling (the panel used to spring back on touch screens), and stretch from the side facing the anchor.
Press feedback starts at touch-down on list rows, cards, tabs and buttons, also inside scrolling lists, and a release keeps the momentum of the press.
Top bars follow the scroll on a spring and snap on one, as ColorOS does; COUIScrollBehavior(followScroll = false) keeps the 1:1 movement.
Page switches run COUI's 350ms curve with a 30% covered shift, and predictive back settles on springs, in both NavDisplays; coui-nav rounds the moving page with the screen corner.
Overscroll release only springs back; the scroll bar no longer blocks the list's edge.
List, multi-select and spinner (dialog mode) preferences open the COUI single-choice dialog.
Switch thumbs follow the finger 1:1; snackbars fill the available width; material icon buttons and the search capsule show no press mask, as ColorOS 17 top-bar buttons.
Glass buttons and the search capsule keep their glass look while they blur or fade in the toolbar search and top-bar search transitions; they used to turn a flat grey.
Dialogs scroll title and message together with faded edges; bottom sheets keep their speed when reversed; pickers land a fling on the shown row and stop at the ends; text fields, tabs, segmented buttons, chips, sliders, progress, navigation bars, floating toolbars and the FAB got their COUI enter, exit, press and state motion.
Added
COUIFlingBehavior / rememberCOUIFlingBehavior(): the COUI 17 list fling.
Modifier.couiTouchFeedback, public CircularPressIndication, couiSpring and COUISpringEasing.
NavigationBar(targetState) { } menu switch animation, ChipTabContent, ChipGroup(animationsEnabled), Checkbox(style = CheckboxStyle.Shape), IntentSlider(holdToSpeedUp), ExpandableFloatingActionButton(collapseOnItemClick), SidePaneLayout(onMaskClick), ArrowPreference badges and end icon, paused on the rotating progress indicators and LoadingPreferenceCategory.
The example app now carries the library version.
Dependencies
implementation("io.github.suqi8.coui.kmp:coui-ui:2.1.0")
implementation("io.github.suqi8.coui.kmp:coui-preference:2.1.0")
implementation("io.github.suqi8.coui.kmp:coui-icons:2.1.0")
Example app
COUI-2.1.0-universal.apk: Android, signed with the release key.
COUI-2.1.0-windows-x64.zip: Windows, unzip and run COUI.exe (Java runtime included).
COUI-2.1.0-macos-arm64.dmg: macOS on Apple silicon.
COUI-2.1.0-ios-arm64-unsigned.ipa: iOS, unsigned; sign it yourself to install.
description 应用介绍
COUI demo
基于miuix
https://github.com/suqi8/coui/releases