이전 버전과 호환되는 UI 만들기
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
이 클래스에서는 최신 버전의 Android에서 사용 가능한 UI 구성요소와 API를 이전 버전과 호환되는 방식으로 사용하여 애플리케이션이 계속 이전 버전의 플랫폼에서 실행되도록 하는 방법을 보여줍니다.
이 클래스 전체에 걸쳐 Android 3.0(API 레벨 11)에서 도입된 새로운 작업 모음 탭 기능이 기본 예로 역할을 하지만 다른 UI 구성요소와 API 기능에 이러한 기법을 적용해도 됩니다.
과정
- 새로운 API 추상화
- 애플리케이션에 필요한 기능과 API를 파악합니다. UI 구성요소의 구현을 애플리케이션에 추상화하는 애플리케이션별 중개 자바 인터페이스를 정의하는 방법을 알아봅니다.
- 새로운 API 프록시
- 최신 API를 사용하는 인터페이스 구현을 만드는 방법을 알아보세요.
- 이전 API로 구현 만들기
- 이전 API를 사용하는 인터페이스의 맞춤 구현을 만드는 방법을 알아봅니다.
- 버전 인식 구성요소 사용
- 런타임에 사용할 구현을 선택하고 애플리케이션에서 인터페이스를 사용하는 방법을 알아봅니다.
참고 사항
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2024-02-22(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"]],["최종 업데이트: 2024-02-22(UTC)"],[],[],null,["# Create backward-compatible UIs\n\nThis class demonstrates how to use UI components and APIs available in newer versions of Android in a backward-compatible way, ensuring that your application still runs on previous versions of the platform.\n\nThroughout this class, the new [Action Bar Tabs](/guide/topics/ui/actionbar#Tabs) feature introduced in Android 3.0 (API level 11) serves as the guiding example, but you can apply these techniques to other UI components and API features.\n\nLessons\n-------\n\n**[Abstract the new APIs](/training/backward-compatible-ui/abstracting)**\n: Determine which features and APIs your application needs. Learn how to define application-specific, intermediary Java interfaces that abstract the implementation of the UI component to your application.\n\n**[Proxy to the new APIs](/training/backward-compatible-ui/new-implementation)**\n: Learn how to create an implementation of your interface that uses newer APIs.\n\n**[Create an implementation with older APIs](/training/backward-compatible-ui/older-implementation)**\n: Learn how to create a custom implementation of your interface that uses older APIs.\n\n**[Use the version-aware component](/training/backward-compatible-ui/using-component)**\n: Learn how to choose an implementation to use at runtime, and begin using the interface in your application.\n\n### You should also read\n\n- [How to have your (Cup)cake and eat it too](http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html)"]]