Starting March 27, 2025, we recommend using android-latest-release
instead of aosp-main
to build and contribute to AOSP. For more information, see Changes to AOSP.
Develop apps without the Car UI library
Stay organized with collections
Save and categorize content based on your preferences.
The
Car UI Library (car-ui-library)
is a self-consistent automotive UI library that can be customized by OEMs. Google strongly
recommends you use the car-ui-library to create your app. If this isn't feasible, there are
two alternatives:
- From Android 12, you can use
car-rotary-lib
,
a subset of car-ui-library.
- On Android 11, you MUST implement your own
FocusParkingView
, FocusArea
, and
DirectManipulationHelper
as described below.
Implement FocusParkingView
You either can implement your own FocusParkingView
or copy the class from the
car-ui-library to your project.
To implement FocusParkingView
:
- Hard code the accessibility class name so that the
RotaryService
can recognize it:
@Override
public CharSequence getAccessibilityClassName() {
return "com.android.car.ui.FocusParkingView";
}
Implement FocusArea
Like FocusParkingView
, you can either implement your own FocusArea
or copy the class from the car-ui-library to your project.
To implement FocusArea
:
- Hard code the accessibility class name so that rotary service can recognize it:
@Override
public CharSequence getAccessibilityClassName() {
return "com.android.car.ui.FocusArea";
}
Implement DirectManipulationHelper
This is a utility class. You can copy the class from the car-ui-library to your project.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-06-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-12 UTC."],[],[],null,["# Develop apps without the Car UI library\n\nThe\n[Car UI Library (car-ui-library)](/docs/automotive/hmi/car_ui)\nis a self-consistent automotive UI library that can be customized by OEMs. Google strongly\nrecommends you use the car-ui-library to create your app. If this isn't feasible, there are\ntwo alternatives:\n\n- From Android 12, you can use `car-rotary-lib`, a subset of car-ui-library.\n- On Android 11, you MUST implement your own `FocusParkingView`, `FocusArea`, and `DirectManipulationHelper` as described below.\n\nImplement FocusParkingView\n--------------------------\n\nYou either can implement your own `FocusParkingView` or copy the class from the\ncar-ui-library to your project.\n\nTo implement `FocusParkingView`:\n\n1. Hard code the accessibility class name so that the `RotaryService` can recognize it: \n\n ```\n @Override\n public CharSequence getAccessibilityClassName() {\n return \"com.android.car.ui.FocusParkingView\";\n }\n ```\n\nImplement FocusArea\n-------------------\n\nLike `FocusParkingView`, you can either implement your own `FocusArea`\nor copy the class from the car-ui-library to your project.\n\nTo implement `FocusArea`:\n\n1. Hard code the accessibility class name so that rotary service can recognize it: \n\n ```\n @Override\n public CharSequence getAccessibilityClassName() {\n return \"com.android.car.ui.FocusArea\";\n }\n ```\n\nImplement DirectManipulationHelper\n----------------------------------\n\nThis is a utility class. You can copy the class from the car-ui-library to your project."]]