自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
Car UI 程式庫版本資訊
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁面說明在下列各個版本中對 Car UI 程式庫所做的更新。
car-ui-lib 2.6.0
新功能
- 已為
CarUiToolbar
標誌新增輕觸事件監聽器。
已解決的問題
- 修正透過外掛程式更新時,
CarUiToolbar
的溢位對話方塊內容會保持不變的問題。
- 修正
CarUiRecyclerView
的捲軸無法顯示的問題,因為套用了不正確的內嵌。
- 修正外掛程式傳回空值
InsetsChangedListener
的問題。
- 新增檢查功能,強制規定在
AppStyledView
中轉譯的內容不得使用 Theme.CarUi
。
- 修正大螢幕橫向模式中預設的
AppStyledView
位置。
- 新增
AppStyledView
背景和調暗量自訂選項。
- 新增支援在顯示
AppStyledView
後呼叫 AppStyledDialog#setContentView()
。
已淘汰下列方法:
CarUi#installBaseLayoutAround(View, InsetsChangedListener, boolean)
,請改用 CarUi#InsetsChangedListener(Context, View, InsetsChangedListener, boolean)
。
CarUi#installBaseLayoutAround(View, InsetsChangedListener, boolean,
boolean)
,請改用 CarUi#InsetsChangedListener(Context, View,
InsetsChangedListener, boolean, boolean)
。
car-ui-lib-plugin-apis 1.5.0
新功能
- 新增
CarUiToolbar
標誌輕觸事件監聽器的自訂功能。
淘汰以下項目:
PluginFactoryOEMV6
,請改用 PluginFactoryOEMV7
。
ToolbarControllerOEMV2
,請改用 ToolbarControllerOEMV3
。
car-ui-lib 2.5.1
已解決的問題
- 修正 ProGuard 問題,該問題會導致無法載入 car-ui-lib 外掛程式。
- 修正會在執行階段導致 NPE 的元件程式庫,讓其與未來版本相容。
- 強制規定 car-ui-lib 外掛程式必須是系統應用程式。
- 修正
CarUiRecyclerView
在某些情況下未顯示捲動條的問題。
- 修正了在使用外掛程式時,所選分頁無法更新的問題。
- 修正使用外掛程式時,將
SearchView
例項化的問題。
- 使用 Activity 內容初始化 Car 服務使用者體驗限制狀態回呼,以便正確顯示設定。
- 更新空值註解。
car-ui-lib 2.5.0
已解決的問題
- 縮短外掛程式啟動時間。
- 修正應用程式一律會將 1 傳回為最大支援外掛程式版本的問題。
- 移除主題覆寫功能,以便強制從
AppStyledView
覆寫 Theme.CarUi
。
- 新增可覆寫的方法,在
ListPreferenceFragment
上設定標題。
car-ui-lib-plugin-apis 1.4.0
新功能
- 允許原始設備製造商 (OEM) 自訂
CarUiPreference
。
淘汰以下項目:
PluginFactoryOEMV5
,請改用 PluginFactoryOEMV6
。
car-ui-lib 2.4.0
新功能
- 新增對轉換至
AppStyledView
的支援。
已解決的問題
- 將
AppStyledRecyclerViewAdapter
更新為非公開。
- 為
AppStyledDialogController
提供最佳化背景的方便方法。
- 將
AppStyledViewNavIcon
定義移至 AppStyledDialogController
。
- 已移除
AppStyledView
中主題強制覆寫為 Theme.CarUi
的功能。
- 新增轉場效果,支援
AppStyledView
畫面的轉譯。
- 將
car_ui_recycler_view_no_scrollbar
新增至可重疊的項目清單。
- 為
CarUiRecyclerView
espresso ViewActions
和 ViewMatchers
建立 Gradle 程式庫。
- 重構應用程式樣式檢視畫面,以便使用
ScrollView
。
car-ui-lib-plugin-apis 1.3.0
新功能
淘汰以下項目:
PluginFactoryOEMV4
,請改用 PluginFactoryOEMV5
。
RecyclerViewOEMV1
,請改用 RecyclerViewOEMV2
。
OnScrollListenerOEMV1
,請改用 RecyclerViewOEMV2.OnScrollListenerOEMV2
。
car-ui-lib 2.3.0
新功能
新增元件:
新增下列捲軸列屬性支援:
android:fadeScrollbars
android:scrollbars
android:scrollbarThumbVertical
android:scrollbarTrackVertical
android:scrollbarStyle
android:scrollbarFadeDuration
android:verticalScrollbarPosition
android:requiresFadingEdge
已解決的問題
修正 CarUiRecyclerView
,該項功能無法在 Activity
重建時維持位置。
解決用戶端程式碼與 IME 服務之間的點陣圖序列化不相容問題。
啟用 NavHostFragment
與 PreferenceFragment
的使用方式。
car-ui-lib-plugin-apis 1.2.0
新功能
將 java.util.function
介面的用法替換為下列程式庫介面:
com.android.car.ui.plugin.oemapis.BiConsumer
com.android.car.ui.plugin.oemapis.Consumer
com.android.car.ui.plugin.oemapis.Function
淘汰以下項目:
PluginFactoryOEMV3
,請改用 PluginFactoryOEMV4
。
ToolbarControllerOEMV1
,請改用 ToolbarControllerOEMV2
。
ContentListItemOEMV1
,請改用 ContentListItemOEMV2
。
ImeSearchInterfaceOEMV1
,請改用 ImeSearchInterfaceOEMV2
。
將空值介面的程式庫實作項目,替換為 androidx.annotations
的實作項目。
car-ui-lib-plugin-apis 1.1.1
這個版本會將 minSdkVersion
更新為 28。
car-ui-lib 2.2.1
本版本:
- 導入
CarUiFooterPreference
- 將
minSdkVersion
更新至 28。
car-ui-lib-plugin-apis 1.1.0
本版本:
- 淘汰
AppStyledViewControllerOEMV1
導入 AppStyledViewControllerOEMV2
納入 AppStyledViewControllerOEMV1
的變更:
public abstract int getContentAreaHeight();
public abstract int getContentAreaWidth();
淘汰 PluginFactoryOEMV1
和 PluginFactoryOEMV2
介紹 PluginFactoryOEMV3
介面。
car-ui-lib 2.1.0
本版本:
新增 AppStyledView
用戶端 API:
public int getContentAreaHeight();
public int getContentAreaWidth();
導入 CarUiPrimarySwitchPreference
更新 AppStyledDialogController
建構函式,要求使用 Activity
而非 Context
:
新增:
public AppStyledDialogController(android.app.Activity);
淘汰:
public AppStyledDialogController(android.content.Context);
car-ui-lib-plugin-apis 1.0.1
這個版本新增了空值註解。
car-ui-lib-plugin-apis 1.0.0
這個版本支援下列 car-ui-lib
外掛程式 API:
AppStyledViewDialog
CarUiRecyclerView
CarUiToolbar
CarUiListItems
car-ui-lib 2.0.0
這個版本可在 Google Maven 上使用,並為下列元件提供 car-ui-lib
外掛程式支援:
AppStyledViewDialog
CarUiRecyclerView
CarUiToolbar
CarUiListItems
car-ui-lib 1.0.0
這個版本適用於 Android 12 以下版本的 Android 開放原始碼計畫,並支援以下項目:
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-06-12 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-06-12 (世界標準時間)。"],[],[],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`"]]