All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.robolectric.shadows.ShadowTabActivity Maven / Gradle / Ivy

There is a newer version: 3.1.4
Show newest version
package org.robolectric.shadows;

import android.app.TabActivity;
import android.widget.TabHost;
import android.widget.TabWidget;
import org.robolectric.annotation.Implementation;
import org.robolectric.annotation.Implements;
import org.robolectric.annotation.RealObject;

/**
 * Shadow for {@link android.app.TabActivity}.
 */
@SuppressWarnings({"UnusedDeclaration"})
@Implements(TabActivity.class)
public class ShadowTabActivity extends ShadowActivityGroup {
  @RealObject private TabActivity realTabActivity;
  private TabHost tabhost;

  @Implementation
  public TabHost getTabHost() {
    if (tabhost==null) {
      tabhost = new TabHost(realTabActivity);
    }
    return tabhost;
  }

  @Implementation
  public TabWidget getTabWidget() {
    return getTabHost().getTabWidget();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy