@Kroll.setProperty(runOnUiThread = true)
 @Kroll.method(runOnUiThread = true)
 public void setActiveTab(Object tab) {
   if (peekView() != null) {
     TiUITabGroup tg = (TiUITabGroup) peekView();
     tg.changeActiveTab(tab);
   } else {
     // handles the case where the setActiveTab is called before the TabGroup has finished opening
     // and thus would prevent the initial tab from being set
     initialActiveTab = tab;
   }
 }
  public void handlePostOpen(Activity activity) {
    ((TiTabActivity) activity).setTabGroupProxy(this);
    this.weakActivity = new WeakReference<TiTabActivity>((TiTabActivity) activity);
    TiUITabGroup tg = (TiUITabGroup) view;
    if (tabs != null) {
      for (TabProxy tab : tabs) {
        addTabToGroup(tg, tab);
      }
    }
    tg.changeActiveTab(initialActiveTab);

    opened = true;
    fireEvent(TiC.EVENT_OPEN, null);
  }