Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/192.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.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:通过intent在tabhost中打开其他应用程序。Don';t在fullscrreen中打开新视图_Android_Tabs_Android Intent - Fatal编程技术网

Android:通过intent在tabhost中打开其他应用程序。Don';t在fullscrreen中打开新视图

Android:通过intent在tabhost中打开其他应用程序。Don';t在fullscrreen中打开新视图,android,tabs,android-intent,Android,Tabs,Android Intent,我的应用程序中有一个选项卡布局。我的最后一个选项卡仅用于显示安装在我的平板电脑上的其他应用程序。这个应用程序不是我的。我是从市场上安装的。 此时,我可以触摸选项卡,另一个应用程序将全屏在新页面/视图中打开。但我不想离开我的应用程序。该应用程序应嵌套在我的应用程序中,以便其他应用程序在我的应用程序的选项卡栏下运行 通过intent打开其他应用程序的代码: public class MyActivity extends Activity{ public void onCreate(Bundle s

我的应用程序中有一个选项卡布局。我的最后一个选项卡仅用于显示安装在我的平板电脑上的其他应用程序。这个应用程序不是我的。我是从市场上安装的。 此时,我可以触摸选项卡,另一个应用程序将全屏在新页面/视图中打开。但我不想离开我的应用程序。该应用程序应嵌套在我的应用程序中,以便其他应用程序在我的应用程序的选项卡栏下运行

通过intent打开其他应用程序的代码:

public class MyActivity extends Activity{

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Intent i = getPackageManager().getLaunchIntentForPackage("org.kman.WifiManager");
    startActivity(i);
    }
} 
选项卡布局部分:

spec = tabHost.newTabSpec("mytab").setIndicator("MyTab",
            res.getDrawable(R.drawable.address_book_new))
                    .setContent(new Intent(this, MyActivity.class));
    tabHost.addTab(spec);
有关于如何在“主机”选项卡中显示应用程序的提示吗


Thx B770

即使启动了其他应用程序,用户也不会“离开”您的应用程序。这就是活动堆栈和后退按钮的全部要点。用户知道你的应用程序只需一个后退按钮


我认为你的要求是不可能的。作为一个用户,我不喜欢它。另一个应用程序开发人员不会预料到非全屏布局。对于操作系统来说,它也带来了各种各样的事件处理挑战

谢谢你的回答。问题是,没有后退按钮。整个系统栏被删除,因此用户无法使用任何设置等。这就是为什么这个应用程序应该在选项卡栏中运行。目前,用户卡在应用程序中,无法离开。