
org.robolectric.shadows.ShadowTabActivity Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of framework Show documentation
Show all versions of framework Show documentation
An alternative Android testing framework.
The 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;
@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 - 2025 Weber Informatics LLC | Privacy Policy