1 page.title=Creating Backward-Compatible UIs
5 next.title=Abstracting the New Implementation
6 next.link=abstracting.html
13 <h2>Dependencies and prerequisites</h2>
17 <li><a href="{@docRoot}sdk/compatibility-library.html">The Android Support Package</a></li>
20 <h2>You should also read</h2>
23 <li><a href="{@docRoot}resources/samples/ActionBarCompat/index.html">ActionBarCompat</a></li>
24 <li><a href="http://android-developers.blogspot.com/2010/07/how-to-have-your-cupcake-and-eat-it-too.html">How to have your (Cup)cake and eat it too</a></li>
29 <div class="download-box">
30 <a href="http://developer.android.com/shareables/training/TabCompat.zip"
31 class="button">Download the sample app</a>
32 <p class="filename">TabCompat.zip</p>
38 <p>This 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.</p>
40 <p>Throughout this class, the new <a href="{@docRoot}guide/topics/ui/actionbar.html#Tabs">Action Bar Tabs</a> 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.</p>
42 <h2 id="lessons">Lessons</h2>
46 <dt><strong><a href="abstracting.html">Abstracting the New APIs</a></strong></dt>
47 <dd>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.</dd>
49 <dt><strong><a href="new-implementation.html">Proxying to the New APIs</a></strong></dt>
50 <dd>Learn how to create an implementation of your interface that uses newer APIs.</dd>
52 <dt><strong><a href="older-implementation.html">Creating an Implementation with Older APIs</a></strong></dt>
53 <dd>Learn how to create a custom implementation of your interface that uses older APIs.</dd>
55 <dt><strong><a href="using-component.html">Using the Version-Aware Component</a></strong></dt>
56 <dd>Learn how to choose an implementation to use at runtime, and begin using the interface in your application.</dd>