Android 如何在tabhost FrameLayout中显示活动?
实际上,这个屏幕中有五个选项卡。还有一个标题“显示地图”,用来显示地图。当我单击选项卡项目时,相应的屏幕将显示在框架布局中 如图所示 同样,我想在相同的框架布局中显示地图,单击显示为标题的“显示地图” 这是我的密码Android 如何在tabhost FrameLayout中显示活动?,android,android-tabhost,android-tablelayout,Android,Android Tabhost,Android Tablelayout,实际上,这个屏幕中有五个选项卡。还有一个标题“显示地图”,用来显示地图。当我单击选项卡项目时,相应的屏幕将显示在框架布局中 如图所示 同样,我想在相同的框架布局中显示地图,单击显示为标题的“显示地图” 这是我的密码 LinearLayout im=(LinearLayout)findViewById(R.id.appactivity); im.setOnClickListener(new OnClickListener() { @Override public
LinearLayout im=(LinearLayout)findViewById(R.id.appactivity);
im.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
//I need to write the code to display the map in FrameLayout here.
}
});
addTab("Search",0, getResources().getDrawable( R.drawable.search_tab ), Venkat.class);
addTab("Favorite",1, getResources().getDrawable( R.drawable.fav_tab ),FavlistScreen.class);
addTab("List",2, getResources().getDrawable( R.drawable.list_tab ),AdslistScreen.class);
addTab("Filter",3, getResources().getDrawable( R.drawable.fav_tab ), FilterScreen.class);
addTab("Contact Us",4, getResources().getDrawable( R.drawable.contact_tab ), HomeScreen.class);
放一些代码片段。提供一些代码以帮助您。。