[android-developers] Re: Can I create Tabs from Activity

2010-05-19 Thread Nithin
Got it.. TabHost tabHost = new TabHost(SampleTab.this); TabWidget tabW = new TabWidget(this); FrameLayout frame = new FrameLayout(this); frame.setId(android.R.id.tabcontent); tabW.addView(frame); tabW.setId(android.R.id.tabs); tabHost.addView(tabW); tabHost.setup();

[android-developers] Re: Can I create Tabs from Activity

2010-05-19 Thread skink
On May 19, 4:48 am, Nithin nithin.war...@gmail.com wrote: Got it.. TabHost tabHost = new TabHost(SampleTab.this); TabWidget tabW = new TabWidget(this); FrameLayout frame = new FrameLayout(this); frame.setId(android.R.id.tabcontent); tabW.addView(frame); tabW.setId(android.R.id.tabs);

[android-developers] Re: Can I create Tabs from Activity

2010-05-19 Thread Nithin
Yes.. Thanks a lot pskink.. you again... Nithin On May 19, 12:36 pm, skink psk...@gmail.com wrote: On May 19, 4:48 am, Nithin nithin.war...@gmail.com wrote: Got it.. TabHost tabHost = new TabHost(SampleTab.this); TabWidget tabW = new TabWidget(this); FrameLayout frame = new

[android-developers] Re: Can I create Tabs from Activity

2010-05-18 Thread Nithin
http://groups.google.com/group/android-developers/browse_thread/thread/3d510d76d38cde51/a8c686fd834a2196 From this link, I realized TabHost is assosiated with TabActivity, So we can't create Tabs without tabActivity. When executed I got this exception in Logcat.. Your TabHost must have a

Re: [android-developers] Re: Can I create Tabs from Activity

2010-05-18 Thread skink
Nithin wrote: http://groups.google.com/group/android-developers/browse_thread/thread/3d510d76d38cde51/a8c686fd834a2196 From this link, I realized TabHost is assosiated with TabActivity, So we can't create Tabs without tabActivity. your assumption is wrong, read the above thread again, pay

[android-developers] Re: Can I create Tabs from Activity

2010-05-18 Thread Nithin
Hi, I am trying like this, public class SampleTab extends Activity implements TabHost.TabContentFactory { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); TabHost tabHost = new TabHost(this);