hi! I just started with android and now i have a problem! I want to add a button in a tab. In time I just can show text and i don ´t know how i add this button!
my code is: in the .xml file: <?xml version="1.0" encoding="utf-8"?> <TabHost xmlns:android="http://schemas.android.com/apk/res/android" android:id="@android:id/tabhost" android:layout_width="fill_parent" android:layout_height="fill_parent" > <LinearLayout android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="wrap_content" /> <FrameLayout android:id="@android:id/tabcontent" android:layout_width="fill_parent" android:layout_height="fill_parent"> <TextView android:id="@+id/textview1" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Tickets" /> <TextView android:id="@+id/textview2" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Tasks" /> <TextView android:id="@+id/textview3" android:layout_width="fill_parent" android:layout_height="fill_parent" android:text="Settings" /> </FrameLayout> </LinearLayout> </TabHost> and my .java file: package com.example.workingcodes; import android.app.TabActivity; import android.os.Bundle; import android.widget.TabHost; public class WorkingCodes extends TabActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TabHost mTabHost = getTabHost(); mTabHost.addTab(mTabHost.newTabSpec("tab_test1").setIndicator ("Tickets").setContent(R.id.textview1)); mTabHost.addTab(mTabHost.newTabSpec("tab_test2").setIndicator ("Tasks").setContent(R.id.textview2)); mTabHost.addTab(mTabHost.newTabSpec("tab_test3").setIndicator ("Settings").setContent(R.id.textview3)); mTabHost.setCurrentTab(2); } } I want a button in the third tab! How i do this?! plz help! wkr chri --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---