package org.robolectric.shadows.support.v4;

import static org.robolectric.shadow.api.Shadow.directlyOn;

import android.support.v4.widget.DrawerLayout;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;
import org.robolectric.shadows.ShadowViewGroup;

@Implements(DrawerLayout.class)
public class ShadowDrawerLayout extends ShadowViewGroup {
  @RealObject private DrawerLayout realDrawerLayout;
  private DrawerLayout.DrawerListener drawerListener;

  @Implementation
  public void setDrawerListener(DrawerLayout.DrawerListener drawerListener) {
    this.drawerListener = drawerListener;
    directlyOn(realDrawerLayout, DrawerLayout.class).setDrawerListener(drawerListener);
  }

  public DrawerLayout.DrawerListener getDrawerListener() {
    return drawerListener;
  }
}

@@ -146,16 +146,42 @@
 Layout;%0A
+import android.view.View;%0A
 import o
@@ -881,11 +881,475 @@
 ner;%0A  %7D
+%0A%0A  /**%0A   * Drawer animations are disabled in unit tests.%0A   */%0A  @Implementation%0A  public void openDrawer(View drawerView, boolean animate) %7B%0A    directlyOn(realDrawerLayout, DrawerLayout.class).openDrawer(drawerView, false);%0A  %7D%0A%0A  /**%0A   * Drawer animations are disabled in unit tests.%0A   */%0A  @Implementation%0A  public void closeDrawer(View drawerView, boolean animate) %7B%0A    directlyOn(realDrawerLayout, DrawerLayout.class).closeDrawer(drawerView, false);%0A  %7D
 %0A%7D%0A

Add openDrawer/closeDrawer support to ShadowDrawerLayout.