Home | History | Annotate | Download | only in backward-compatible-ui
      1 page.title=Creating Backward-Compatible UIs
      2 
      3 trainingnavtop=true
      4 startpage=true
      5 next.title=Abstracting the New Implementation
      6 next.link=abstracting.html
      7 
      8 @jd:body
      9 
     10 <div id="tb-wrapper">
     11 <div id="tb">
     12 
     13 <h2>Dependencies and prerequisites</h2>
     14 
     15 <ul>
     16   <li>API level 5</li>
     17   <li><a href="{@docRoot}tools/extras/support-library.html">The Android Support Package</a></li>
     18 </ul>
     19 
     20 <h2>You should also read</h2>
     21 
     22 <ul>
     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>
     25 </ul>
     26 
     27 <h2>Try it out</h2>
     28 
     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>
     33 </div>
     34 
     35 </div>
     36 </div>
     37 
     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>
     39 
     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>
     41 
     42 <h2 id="lessons">Lessons</h2>
     43 
     44 
     45 <dl>
     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>
     48 
     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>
     51 
     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>
     54 
     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>
     57 </dl>
     58