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 安装以后在桌面会出现两个应用图标

  • 相关阅读:
    算法经典文章收藏
    Python 学习文章收藏
    Leetcode 刷题计划
    CLR via C# 学习计划
    算法导论 学习计划
    算法导论学习笔记 一 分治算法
    Mongodb 学习笔记
    Python模拟HttpRequest的方法总结
    在Github上搭建自己的博客(Windows平台)
    Git Shell 基本命令(官网脱水版)
  • 原文地址:https://www.cnblogs.com/fengzhblog/p/2762123.html
Copyright © 2011-2022 走看看