Kể từ ngày 27 tháng 3 năm 2025, bạn nên sử dụng android-latest-release
thay vì aosp-main
để xây dựng và đóng góp cho AOSP. Để biết thêm thông tin, hãy xem phần Thay đổi đối với AOSP.
Ghi chú phát hành về thư viện giao diện người dùng trên ô tô
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Trang này mô tả các bản cập nhật đã thực hiện cho thư viện Giao diện người dùng trên ô tô trong từng bản phát hành được liệt kê bên dưới.
car-ui-lib 2.6.0
Tính năng mới
- Thêm trình nghe nhấn cho biểu trưng
CarUiToolbar
.
Các vấn đề đã được giải quyết
- Khắc phục sự cố nội dung hộp thoại tràn của
CarUiToolbar
vẫn còn lỗi thời khi cập nhật thông qua trình bổ trợ.
- Khắc phục vấn đề thanh cuộn của
CarUiRecyclerView
không hiển thị do áp dụng các phần lồng ghép không chính xác.
- Khắc phục lỗi khi trình bổ trợ trả về
InsetsChangedListener
rỗng.
- Thêm một bước kiểm tra để thực thi nội dung hiển thị trong
AppStyledView
không được sử dụng Theme.CarUi
.
- Sửa vị trí
AppStyledView
mặc định trong màn hình ngang lớn.
- Thêm tuỳ chỉnh nền
AppStyledView
và độ mờ.
- Thêm tính năng hỗ trợ cho các lệnh gọi đến
AppStyledDialog#setContentView()
sau khi AppStyledView
hiển thị.
Ngừng sử dụng các phương thức sau:
CarUi#installBaseLayoutAround(View, InsetsChangedListener, boolean)
, hãy sử dụng CarUi#InsetsChangedListener(Context, View, InsetsChangedListener, boolean)
.
CarUi#installBaseLayoutAround(View, InsetsChangedListener, boolean,
boolean)
, hãy sử dụng CarUi#InsetsChangedListener(Context, View,
InsetsChangedListener, boolean, boolean)
.
car-ui-lib-plugin-apis 1.5.0
Tính năng mới
- Thêm tuỳ chỉnh cho trình nghe nhấn vào biểu trưng
CarUiToolbar
.
Ngừng sử dụng các mục sau:
PluginFactoryOEMV6
, hãy sử dụng PluginFactoryOEMV7
.
ToolbarControllerOEMV2
, hãy sử dụng ToolbarControllerOEMV3
.
car-ui-lib 2.5.1
Các vấn đề đã được giải quyết
- Khắc phục vấn đề ProGuard ngăn tải trình bổ trợ car-ui-lib.
- Khắc phục khả năng tương thích chuyển tiếp cho các trình bổ trợ có thể gây ra NPE trong thời gian chạy.
- Thực thi việc trình bổ trợ car-ui-lib phải là ứng dụng hệ thống.
- Khắc phục lỗi
CarUiRecyclerView
không hiển thị thanh cuộn trong một số trường hợp.
- Khắc phục lỗi các thẻ đã chọn không cập nhật khi sử dụng trình bổ trợ.
- Khắc phục các vấn đề về việc tạo bản sao
SearchView
khi sử dụng trình bổ trợ.
- Khởi chạy lệnh gọi lại trạng thái hạn chế trải nghiệm người dùng của dịch vụ ô tô bằng ngữ cảnh Hoạt động để có cấu hình hiển thị chính xác.
- Cập nhật chú thích về tính chất rỗng.
car-ui-lib 2.5.0
Các vấn đề đã được giải quyết
- Tối ưu hoá thời gian khởi động trình bổ trợ.
- Khắc phục vấn đề ứng dụng luôn trả về 1 dưới dạng phiên bản trình bổ trợ được hỗ trợ tối đa.
- Xoá chế độ ghi đè giao diện để buộc
Theme.CarUi
từ AppStyledView
.
- Thêm phương thức có thể ghi đè để đặt tiêu đề trên
ListPreferenceFragment
.
car-ui-lib-plugin-apis 1.4.0
Tính năng mới
- Cho phép nhà sản xuất thiết bị gốc (OEM) tuỳ chỉnh
CarUiPreference
.
Ngừng sử dụng các mục sau:
PluginFactoryOEMV5
, hãy sử dụng PluginFactoryOEMV6
.
car-ui-lib 2.4.0
Tính năng mới
- Thêm tính năng hỗ trợ cho quá trình chuyển đổi sang
AppStyledView
.
Các vấn đề đã được giải quyết
- Cập nhật
AppStyledRecyclerViewAdapter
để không còn ở chế độ công khai.
- Cung cấp một phương thức tiện lợi cho ngữ cảnh với tính năng tối ưu hoá cho
AppStyledDialogController
.
- Di chuyển định nghĩa
AppStyledViewNavIcon
sang AppStyledDialogController
.
- Xoá tính năng ghi đè bắt buộc giao diện thành
Theme.CarUi
trong AppStyledView
.
- Thêm hiệu ứng chuyển đổi để hỗ trợ việc kết xuất màn hình
AppStyledView
.
- Thêm
car_ui_recycler_view_no_scrollbar
vào danh sách các mục có thể được phủ lên.
- Tạo thư viện Gradle cho
CarUiRecyclerView
espresso ViewActions
và ViewMatchers
.
- Tái cấu trúc thành phần hiển thị theo kiểu ứng dụng để sử dụng
ScrollView
.
car-ui-lib-plugin-apis 1.3.0
Tính năng mới
Ngừng sử dụng các mục sau:
PluginFactoryOEMV4
, hãy sử dụng PluginFactoryOEMV5
.
RecyclerViewOEMV1
, hãy sử dụng RecyclerViewOEMV2
.
OnScrollListenerOEMV1
, hãy sử dụng RecyclerViewOEMV2.OnScrollListenerOEMV2
.
car-ui-lib 2.3.0
Tính năng mới
Thêm thành phần mới:
Thêm tính năng hỗ trợ cho các thuộc tính thanh cuộn sau:
android:fadeScrollbars
android:scrollbars
android:scrollbarThumbVertical
android:scrollbarTrackVertical
android:scrollbarStyle
android:scrollbarFadeDuration
android:verticalScrollbarPosition
android:requiresFadingEdge
Các vấn đề đã được giải quyết
Khắc phục CarUiRecyclerView
không duy trì vị trí khi tạo lại Activity
.
Khắc phục sự cố không tương thích của quá trình chuyển đổi tuần tự bitmap giữa mã ứng dụng và dịch vụ IME.
Bật tính năng sử dụng NavHostFragment
với PreferenceFragment
.
car-ui-lib-plugin-apis 1.2.0
Tính năng mới
Thay thế việc sử dụng giao diện java.util.function
bằng các giao diện thư viện sau:
com.android.car.ui.plugin.oemapis.BiConsumer
com.android.car.ui.plugin.oemapis.Consumer
com.android.car.ui.plugin.oemapis.Function
Ngừng sử dụng các mục sau:
PluginFactoryOEMV3
, hãy sử dụng PluginFactoryOEMV4
.
ToolbarControllerOEMV1
, hãy sử dụng ToolbarControllerOEMV2
.
ContentListItemOEMV1
, hãy sử dụng ContentListItemOEMV2
.
ImeSearchInterfaceOEMV1
, hãy sử dụng ImeSearchInterfaceOEMV2
.
Thay thế cách triển khai thư viện của giao diện rỗng bằng cách triển khai androidx.annotations
.
car-ui-lib-plugin-apis 1.1.1
Bản phát hành này cập nhật minSdkVersion
lên 28.
car-ui-lib 2.2.1
Bản phát hành này:
- Giới thiệu
CarUiFooterPreference
- Cập nhật
minSdkVersion
thành 28.
car-ui-lib-plugin-apis 1.1.0
Bản phát hành này:
- Ngừng sử dụng
AppStyledViewControllerOEMV1
Giới thiệu AppStyledViewControllerOEMV2
Tích hợp các thay đổi từ AppStyledViewControllerOEMV1
:
public abstract int getContentAreaHeight();
public abstract int getContentAreaWidth();
Ngừng sử dụng PluginFactoryOEMV1
và PluginFactoryOEMV2
Giới thiệu giao diện PluginFactoryOEMV3
.
car-ui-lib 2.1.0
Bản phát hành này:
Thêm các API ứng dụng khách AppStyledView
:
public int getContentAreaHeight();
public int getContentAreaWidth();
Giới thiệu CarUiPrimarySwitchPreference
Cập nhật hàm khởi tạo AppStyledDialogController
để yêu cầu Activity
thay vì Context
:
Thêm:
public AppStyledDialogController(android.app.Activity);
Ngừng sử dụng:
public AppStyledDialogController(android.content.Context);
car-ui-lib-plugin-apis 1.0.1
Bản phát hành này thêm chú thích về tính chất rỗng.
car-ui-lib-plugin-apis 1.0.0
Bản phát hành này giới thiệu tính năng hỗ trợ cho các API trình bổ trợ car-ui-lib
sau:
AppStyledViewDialog
CarUiRecyclerView
CarUiToolbar
CarUiListItems
car-ui-lib 2.0.0
Phiên bản này, có trên Google Maven, giới thiệu tính năng hỗ trợ trình bổ trợ car-ui-lib
cho các thành phần sau:
AppStyledViewDialog
CarUiRecyclerView
CarUiToolbar
CarUiListItems
car-ui-lib 1.0.0
Bản phát hành này có trên AOSP cho Android 12 trở xuống và hỗ trợ:
Nội dung và mã mẫu trên trang này phải tuân thủ các giấy phép như mô tả trong phần Giấy phép nội dung. Java và OpenJDK là nhãn hiệu hoặc nhãn hiệu đã đăng ký của Oracle và/hoặc đơn vị liên kết của Oracle.
Cập nhật lần gần đây nhất: 2025-06-12 UTC.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-06-12 UTC."],[],[],null,["# Car UI library release notes\n\nThis page describes updates made to the Car UI library in each of the releases\nlisted below.\n\ncar-ui-lib 2.6.0\n----------------\n\n### New features\n\n- Added a tap listener for the `CarUiToolbar` logo.\n\n### Issues addressed\n\n- Fixed an issue where `CarUiToolbar`'s overflow dialog content would remain stale when making the updates through the plugin.\n- Fixed an issue where `CarUiRecyclerView`'s scrollbar was not visible because incorrect insets were applied.\n- Fixed an issue when the plugin returned a null `InsetsChangedListener`.\n- Added a check to enforce content rendered in `AppStyledView` must not use `Theme.CarUi`.\n- Fixed default `AppStyledView` positioning in large landscape screens.\n- Added customization of `AppStyledView` background and dim amount.\n- Added support for calls to `AppStyledDialog#setContentView()` after `AppStyledView` is shown.\n\nDeprecated these methods:\n\n- `CarUi#installBaseLayoutAround(View, InsetsChangedListener, boolean)`, use `CarUi#InsetsChangedListener(Context, View, InsetsChangedListener, boolean)` instead.\n- `CarUi#installBaseLayoutAround(View, InsetsChangedListener, boolean,\n boolean)`, use `CarUi#InsetsChangedListener(Context, View,\n InsetsChangedListener, boolean, boolean)` instead.\n\ncar-ui-lib-plugin-apis 1.5.0\n----------------------------\n\n### New features\n\n- Added customization of `CarUiToolbar` logo tap listener.\n\nDeprecated these items:\n\n- `PluginFactoryOEMV6`, use `PluginFactoryOEMV7` instead.\n- `ToolbarControllerOEMV2`, use `ToolbarControllerOEMV3` instead.\n\ncar-ui-lib 2.5.1\n----------------\n\n### Issues addressed\n\n- Fixed a ProGuard issue that was preventing loading the car-ui-lib plugin.\n- Fixed forward compatibility for plugins that would cause NPE at runtime.\n- Enforce that car-ui-lib plugin has to be a system app.\n- Fixed `CarUiRecyclerView` not showing scrollbar in some scenarios.\n- Fixed selected tabs not updating when the plugin is used.\n- Fixed issues with instantiating `SearchView` when the plugin is used.\n- Initialize Car service UX restriction state callback using Activity context for correct display configuration.\n- Updated nullness annotations.\n\ncar-ui-lib 2.5.0\n----------------\n\n### Issues addressed\n\n- Optimized plugin startup time.\n- Fixed an issue where apps were always returning 1 as max supported plugin version.\n- Removed the overwriting of theme to force `Theme.CarUi` from `AppStyledView`.\n- Added overridable method to set title on `ListPreferenceFragment`.\n\ncar-ui-lib-plugin-apis 1.4.0\n----------------------------\n\n### New features\n\n- Allow OEM customization of `CarUiPreference`.\n\nDeprecated these items:\n\n- `PluginFactoryOEMV5`, use `PluginFactoryOEMV6` instead.\n\ncar-ui-lib 2.4.0\n----------------\n\n### New features\n\n- Added support for the transition to `AppStyledView`.\n\n### Issues addressed\n\n- Updated `AppStyledRecyclerViewAdapter` to no longer be public.\n- Provided a convenience method for context with optimization for `AppStyledDialogController`.\n- Moved the `AppStyledViewNavIcon` definition to `AppStyledDialogController`.\n- Removed forced overwriting of theme to `Theme.CarUi` in `AppStyledView`.\n- Added transitions to support the rendering of `AppStyledView` screens.\n- Added `car_ui_recycler_view_no_scrollbar` to the list of items that can be overlaid.\n- Created a Gradle library for `CarUiRecyclerView` espresso `ViewActions` and `ViewMatchers`.\n- Refactored the app-styled view to use `ScrollView`.\n\ncar-ui-lib-plugin-apis 1.3.0\n----------------------------\n\n### New features\n\nDeprecated these items:\n\n- `PluginFactoryOEMV4`, use `PluginFactoryOEMV5` instead.\n- `RecyclerViewOEMV1`, use `RecyclerViewOEMV2` instead.\n- `OnScrollListenerOEMV1`, use `RecyclerViewOEMV2.OnScrollListenerOEMV2` instead.\n\ncar-ui-lib 2.3.0\n----------------\n\n### New features\n\nAdded new component:\n\n- `CarUiShortcutsPopup`\n\nAdded support for the following scrollbar attributes:\n\n- `android:fadeScrollbars`\n- `android:scrollbars`\n- `android:scrollbarThumbVertical`\n- `android:scrollbarTrackVertical`\n- `android:scrollbarStyle`\n- `android:scrollbarFadeDuration`\n- `android:verticalScrollbarPosition`\n- `android:requiresFadingEdge`\n\n### Addressed issues\n\n- Fixed `CarUiRecyclerView`, which did not maintain position upon `Activity`\n recreation.\n\n- Resolved bitmap serialization incompatibility between the client code and\n the IME service.\n\n- Enabled usage of `NavHostFragment` with `PreferenceFragment`.\n\ncar-ui-lib-plugin-apis 1.2.0\n----------------------------\n\n### New features\n\nReplaced usage of `java.util.function` interfaces with the following library\ninterfaces:\n\n- `com.android.car.ui.plugin.oemapis.BiConsumer`\n- `com.android.car.ui.plugin.oemapis.Consumer`\n- `com.android.car.ui.plugin.oemapis.Function`\n\nDeprecated these items:\n\n- `PluginFactoryOEMV3`, use `PluginFactoryOEMV4` instead.\n- `ToolbarControllerOEMV1`, use `ToolbarControllerOEMV2` instead.\n- `ContentListItemOEMV1`, use `ContentListItemOEMV2` instead.\n- `ImeSearchInterfaceOEMV1`, use `ImeSearchInterfaceOEMV2` instead.\n\nReplaced the library implementation of nullness interfaces with implementations\nof `androidx.annotations`.\n\ncar-ui-lib-plugin-apis 1.1.1\n----------------------------\n\nThis release updates the `minSdkVersion` to 28.\n\ncar-ui-lib 2.2.1\n----------------\n\nThis release:\n\n- Introduces `CarUiFooterPreference`\n- Updates the `minSdkVersion` to 28.\n\ncar-ui-lib-plugin-apis 1.1.0\n----------------------------\n\nThis release:\n\n- Deprecates `AppStyledViewControllerOEMV1`\n- Introduces `AppStyledViewControllerOEMV2`\n\n- Incorporates changes from `AppStyledViewControllerOEMV1`:\n\n public abstract int getContentAreaHeight();\n public abstract int getContentAreaWidth();\n\n- Deprecates `PluginFactoryOEMV1` and `PluginFactoryOEMV2`\n\n- Introduces the `PluginFactoryOEMV3` interface.\n\ncar-ui-lib 2.1.0\n----------------\n\nThis release:\n\n- Adds `AppStyledView` client APIs:\n\n public int getContentAreaHeight();\n public int getContentAreaWidth();\n\n- Introduces `CarUiPrimarySwitchPreference`\n\n- Updates the `AppStyledDialogController` constructor to require `Activity`\n instead of `Context`:\n\n - Adds:\n\n public AppStyledDialogController(android.app.Activity);\n\n - Deprecates:\n\n public AppStyledDialogController(android.content.Context);\n\ncar-ui-lib-plugin-apis 1.0.1\n----------------------------\n\nThis release adds nullness annotations.\n\ncar-ui-lib-plugin-apis 1.0.0\n----------------------------\n\nThis release introduces support for the following `car-ui-lib` plugin APIs:\n\n- `AppStyledViewDialog`\n- `CarUiRecyclerView`\n- `CarUiToolbar`\n- `CarUiListItems`\n\ncar-ui-lib 2.0.0\n----------------\n\nThis version, available on [Google\nMaven](https://maven.google.com/web/index.html?#com.android.car.ui),\nintroduces `car-ui-lib` plugin support for these components:\n\n- `AppStyledViewDialog`\n- `CarUiRecyclerView`\n- `CarUiToolbar`\n- `CarUiListItems`\n\ncar-ui-lib 1.0.0\n----------------\n\nThis release is available on AOSP for Android 12 and lower and provides\nsupport for:\n\n- `AppStyledViewDialog`\n- [`CarUiRecyclerView`](/docs/devices/automotive/hmi/car_ui/caruirecyclerview)\n- [`CarUiToolbar`](/docs/devices/automotive/hmi/car_ui/toolbar_rro)\n- [`CarUiListItems`](/docs/devices/automotive/hmi/car_ui/caruilistitem)\n- Dialog\n- Resource customization through [runtime resource overlays (RROs)](/docs/core/architecture/rros)\n- [`PreferencesFragment`](/docs/devices/automotive/hmi/car_ui/caruipreference)\n- [Rotary support](/docs/devices/automotive/hmi/rotary_controller/oem_integration)\n- `WideScreenImeKeyboard`"]]