//================================================ Helper Methods ==================================================
private void showDrawer(final RuntimeDrawer drawer, final CompletionCallback callback) {
switch (drawer.getDrawer().getPosition()) {
case LEFT:
showDrawer(leftDrawerContent, currentLeftDrawer, drawer, new CompletionCallback() {
@Override
public void onComplete() {
currentLeftDrawer = drawer;
DeferredCommand.addCommand(new Command() {
public void execute() {
if (callback != null) {
callback.onComplete();
}
}
});
}
});
break;
case RIGHT:
showDrawer(rightDrawerContent, currentRightDrawer, drawer, new CompletionCallback() {
@Override
public void onComplete() {
currentRightDrawer = drawer;
DeferredCommand.addCommand(new Command() {
public void execute() {
if (callback != null) {
callback.onComplete();
}
}
});
}
});
break;
default:
showDrawer(bottomDrawerContent, currentBottomDrawer, drawer, new CompletionCallback() {
@Override
public void onComplete() {
currentBottomDrawer = drawer;
DeferredCommand.addCommand(new Command() {
public void execute() {