Time for action - sliding drawer integration

Now it's time to plug the SlidingDrawer example into the "layouts" example. This, like all the other integrations, involves a new Activity, and registering the new Activity with Android and LayoutSelectorActivity.

  1. Create a new Java source file in the root package of the "layouts" example project named SlidingDrawerActivity.java. Open this in your editor or IDE.
  2. The new SlidingDrawerActivity needs to extend the Activity class:
    public class SlidingDrawerActivity extends Activity {
    
  3. Override the onCreate method:
    protected void onCreate(Bundle savedInstanceState) {
    
  4. Invoke the super class to set up its state:
    super.onCreate(savedInstanceState);
    
  5. Set the content view of the new Activity to the sliding_drawer XML ...

Get Android User Interface Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.