zoukankan      html  css  js  c++  java
  • android:process用于在新进程中启动Activity

    在AndroidMenifest.xml文件中使用android:process可以在新进程中启动Activity

            <activity android:name="cn.sinonet.uhome.ui.Loading"
                android:label="@string/app_name" android:process=":process.main"
                android:screenOrientation="portrait">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>

            <activity android:name="com.haier.uhome.videointercom.ui.HaierCommonAct"
                android:icon="@drawable/uhome" android:label="可视对讲"
                android:launchMode="singleInstance" android:process=":process.sub">
                <intent-filter>
                    <action android:name="android.intent.action.MAIN" />
                    <category android:name="android.intent.category.LAUNCHER" />
                </intent-filter>
            </activity>

    在两个Activity的IntentFilter都设定为action.MAIN和category.LAUNCHER 安装以后在桌面会出现两个应用图标

  • 相关阅读:
    MYSQL中排序
    编写一个 SQL 查询,获取 Employee 表中第二高的薪水(Salary)
    job1
    python中对于数组的操作
    python中将字符串转为字典类型
    python中的周几
    python 链接redis 获取对应的值
    jenkins 设置定时任务规则
    如何安全close go 的channel
    [转]
  • 原文地址:https://www.cnblogs.com/fengzhblog/p/2762123.html
Copyright © 2011-2022 走看看