XML如下 如何以最快的速度查找到
android:name="android.intent.category.LAUNCHER"
的这个节点!并删除掉!
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:versionCode="1" android:versionName="1.0.0" package="com.android.test1"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="@string/app_name" android:icon="@drawable/logo" android:name="TestApplication" android:debuggable="false" android:taskAffinity="com.android.test1">
<activity android:theme="@style/ContentOverlay" android:name="SwitchUser" android:exported="true" android:configChanges="keyboardHidden|orientation" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="com.android.test1.intent.action.USER_SWITCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@style/ContentOverlay" android:name="UserTest1AttentionFansList" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="com.android.test1.intent.action.BLOG_DELETE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:name="SplashActivity" android:alwaysRetainTaskState="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /><!--查找此节点-->
</intent-filter>
</activity> </application>
</manifest>
android:name="android.intent.category.LAUNCHER"
的这个节点!并删除掉!
<?xml version="1.0" encoding="UTF-8"?>
<manifest android:versionCode="1" android:versionName="1.0.0" package="com.android.test1"
xmlns:android="http://schemas.android.com/apk/res/android">
<application android:label="@string/app_name" android:icon="@drawable/logo" android:name="TestApplication" android:debuggable="false" android:taskAffinity="com.android.test1">
<activity android:theme="@style/ContentOverlay" android:name="SwitchUser" android:exported="true" android:configChanges="keyboardHidden|orientation" android:windowSoftInputMode="stateAlwaysHidden">
<intent-filter>
<action android:name="com.android.test1.intent.action.USER_SWITCH" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@style/ContentOverlay" android:name="UserTest1AttentionFansList" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="com.android.test1.intent.action.BLOG_DELETE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:name="SplashActivity" android:alwaysRetainTaskState="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" /><!--查找此节点-->
</intent-filter>
</activity> </application>
</manifest>
解决方案 »
- 急救……Winform画面加载速度慢
- Winform, webbrowser, 怎样实现将窗体内其他控件的内容拖放到webbrowser中?或者相反?
- 有一个文件类型*.fx但没有支持,我想自己加外接程序来做关键字着色支持,应该怎么搞??
- 我将一个DataTable中的列名和内容导入到一个Excel后,打开生成的Excel文件时,为什么总是提示:
- 求个思路
- 如何判断当前页面是否位于框架内?
- 函数计算超时问题
- 水晶报表寻求急救:::打印时出“cannot find keycodev2.dll or invalid kecode:::
- 緊急求助,我要倒了!
- c# 请教个问题 关于basler sdk
- 在winform中如何把sqlserver中的表机构导出到access中 动态的
- 软件双语版如何做
doc.Load(path);
XmlNode xn = doc.SelectSingleNode(node);
有个RemoveChild 你自己去整吧
http://wenku.baidu.com/view/a7f8d9f9770bf78a652954db.html
doc.Load(@"C:\test.xml");
XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
nsmgr.AddNamespace("android", "http://schemas.android.com/apk/res/android"); XmlNodeList nodelist = doc.SelectNodes("//category[@android:name='android.intent.category.DEFAULT']", nsmgr);
foreach(XmlNode node in nodelist)
{
XmlNode parent=node.ParentNode;
parent.RemoveChild(node);
}
doc.Save(@"C:\test.xml");
XmlDocument doc = new XmlDocument();
doc.Load(@"C:\test.xml");
XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
nsmgr.AddNamespace("android", "http://schemas.android.com/apk/res/android"); XmlNode node = doc.SelectSingleNode("//category[@android:name='android.intent.category.LAUNCHER']", nsmgr);
XmlNode parent = node.ParentNode;
parent.RemoveChild(node);
doc.Save(@"C:\test.xml"); 关键是那个命名空间!