Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/214.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 如何在tabhost FrameLayout中显示活动?_Android_Android Tabhost_Android Tablelayout - Fatal编程技术网

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);

放一些代码片段。提供一些代码以帮助您。。