• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.xtremelabs.robolectric.shadows;
2 
3 import android.app.TabActivity;
4 import android.widget.TabHost;
5 import android.widget.TabWidget;
6 import com.xtremelabs.robolectric.internal.Implementation;
7 import com.xtremelabs.robolectric.internal.Implements;
8 import com.xtremelabs.robolectric.internal.RealObject;
9 
10 @SuppressWarnings({"UnusedDeclaration"})
11 @Implements(TabActivity.class)
12 public class ShadowTabActivity extends ShadowActivityGroup {
13 
14     @RealObject TabActivity realTabActivity;
15     TabHost tabhost;
16     @Implementation
getTabHost()17     public TabHost getTabHost() {
18     	if (tabhost==null) {
19     		tabhost = new TabHost(realTabActivity);
20     	}
21         return tabhost;
22     }
23 
24     @Implementation
getTabWidget()25     public TabWidget getTabWidget() {
26         return getTabHost().getTabWidget();
27     }
28 }
29