Android中因为没有使用wifi模块 因此:将WIDGETS-->Settings shortcut-->中的Wi-Fi移除

1.通过WIDGETWS->Settings shortcut找到他的定义

Settings/res/values/strings.xml

<string name="settings_shortcut">Settings shortcut</string>

2.通过定义settings_shortcut找到

Settings/AndroidManifest.xml

<activity android:name="CreateShortcut" android:label="@string/settings_shortcut"
android:theme="@style/Theme.CreateShortCut">
<intent-filter>
<action android:name="android.intent.action.CREATE_SHORTCUT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>

不难发现,要想在CreateShortcut中显示,Activity在必须要有

<category android:name="com.android.settings.SHORTCUT" />

如果我们想将设置我ifi项添加到shortcut列表,我们只需要在androidmanifest.xml中声明 <activity android:name="Settings$WifiSettingsActivity"部分加上

<category android:name="com.android.settings.SHORTCUT" />

即可。

那么若不想有Settings shortcut那么删除掉该句即可

<category android:name="com.android.settings.SHORTCUT" />





更多相关文章

  1. Android(安卓)自定义View跟随页面切换小圆点
  2. Android(安卓)Studio 检测不到 Genymotion 模拟器
  3. JNI基础实验一:调用.so文件--友善之臂Tiny210 android 串口/pwm/A
  4. 【Android(安卓)开发教程】经过预定义的查询字符串常量
  5. android 中apk如何防止反编译?
  6. Android(安卓)API——自定义组件(Custom Components)
  7. 自定义ListView中的分割线
  8. 自定义圆形进度条ProgressBar的三种方式
  9. [置顶] 自定义的解压进度条 关于ProgressBar的使用

随机推荐

  1. android 2.3 从零开始学习—环境的搭建以
  2. Android面试系列2018总结(全方面覆盖Andr
  3. Android和设计模式:模板模式
  4. [Android] Android进程和线程模型
  5. android就一定比java差?
  6. 安卓(android)开发应该怎么学?需要哪些基础
  7. Android/OPhone开发完全讲义(china-pub首
  8. 豪赌Web apps,谷歌Chrome开发工具直通Andr
  9. android 依赖冲突解决
  10. Android通讯录数据库介绍与基本操作(增删