2025년 3월 27일부터 AOSP를 빌드하고 기여하려면 aosp-main
대신 android-latest-release
를 사용하는 것이 좋습니다. 자세한 내용은 AOSP 변경사항을 참고하세요.
자동차 UI 라이브러리 없이 앱 개발
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
자동차 UI 라이브러리(car-ui-library)는 OEM에서 맞춤설정할 수 있는 일관된 자동차 UI 라이브러리입니다. car-ui-library를 사용하여 앱을 만드는 것이 좋습니다. 이렇게 할 수 없다면 두 가지 대안이 있습니다.
- Android 12부터 car-ui-library의 일부인
car-rotary-lib
를 사용할 수 있습니다.
- Android 11에서는 아래 설명처럼 자체
FocusParkingView
, FocusArea
, DirectManipulationHelper
를 구현해야 합니다.
FocusParkingView 구현
자체 FocusParkingView
를 구현하거나 car-ui-library에서 프로젝트로 클래스를 복사하면 됩니다.
FocusParkingView
를 구현하려면 다음을 실행하세요.
RotaryService
에서 인식할 수 있도록 접근성 클래스 이름을 하드 코딩합니다.
@Override
public CharSequence getAccessibilityClassName() {
return "com.android.car.ui.FocusParkingView";
}
FocusArea 구현
FocusParkingView
와 마찬가지로 자체 FocusArea
를 구현하거나 car-ui-library에서 프로젝트로 클래스를 복사하면 됩니다.
FocusArea
를 구현하려면 다음을 실행하세요.
- 로터리 서비스에서 인식할 수 있도록 접근성 클래스 이름을 하드 코딩합니다.
@Override
public CharSequence getAccessibilityClassName() {
return "com.android.car.ui.FocusArea";
}
DirectManipulationHelper 구현
유틸리티 클래스입니다. car-ui-library에서 프로젝트로 클래스를 복사하면 됩니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","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-07-27(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."]]