extend your class with Tabactivity. setContent with Mapview. simple.
Edit:
well.
this is the sample code for activity looks.
public class BS_Main extends TabActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TabHost tabHost = getTabHost();
tabHost.addTab(tabHost.newTabSpec("tab1").setContent(R.id.mapview).setIndicator("mapview_name",getResources().getDrawable(R.drawable.map_icon)));
tabHost.addTab(tabHost.newTabSpec("tab2").setContent(R.id.anotherview).setIndicator("tab2_name",getResources().getDrawable(R.drawable.anotherview_icon)));
}
}
the layout of tab activity looks.
<?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">
<TabWidget android:id="@android:id/tabs" android:layout_width="fill_parent" android:layout_height="fill_parent" />
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:id="@android:id/tabcontent"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<mapview tag here with ur map Api key>
<anotherview tag>
</FrameLayout>
thats it.refer this link too.
Praveen Chandrasekaran
2010-04-16 09:43:49