博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Android中因为没有使用wifi模块 因此:将WIDGETS-->Settings sh...
阅读量:7008 次
发布时间:2019-06-28

本文共 959 字,大约阅读时间需要 3 分钟。

hot3.png

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" />

转载于:https://my.oschina.net/u/183217/blog/142346

你可能感兴趣的文章
Ubuntu 14.04 安装 boost 1_57_0
查看>>
Thread类的join()方法
查看>>
二叉树的定义与前序、中序、后序遍历
查看>>
Laravel学习--关于Relation的坑
查看>>
mysql jdbc性能优化之mybatis/callablestatement调用存储过程mysql jdbc产生不必要的元数据查询(已解决,cpu负载减少20%)...
查看>>
Q_DECLARE_PRIVATE与Q_DECLARE_PUBLIC
查看>>
springboot数据库连接池使用策略
查看>>
eclipse定制化配置调优、初始化配置指南、可以解决启动慢等问题
查看>>
react实现多行文本超出加省略号
查看>>
回调函数
查看>>
DORIS-软件网址
查看>>
单例模式
查看>>
SICP 习题 (1.10)解题总结
查看>>
Windows 下OpenSSL 安装
查看>>
SpringBoot整合Kotlin构建Web服务
查看>>
基于Mixin Network的PHP比特币开发教程 之一:创建机器人
查看>>
区块链是一个公共数据库,要放在一个块内
查看>>
vuex实现及简略解析
查看>>
Docker 使用 supervisord 管理 lumen队列与crontab
查看>>
vue-router源码解析(二)插件实现
查看>>