Android上的3只显示无线系统设置 [英] Show only wireless system settings on Android 3

查看:117
本文介绍了Android上的3只显示无线系统设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这code完美的作品:

This code works perfectly:

startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS));

但是Android 3显示另一种preferences。我怎么能显示用户只无线设置?

But Android 3 show also another preferences. How do I can show to user only wireless settings?

UPD这code:

Intent intent=new Intent(Intent.ACTION_MAIN);
intent.setClassName("com.android.phone", "com.android.phone.Settings");
startActivity(intent);

启动移动设置。是否有类似的东西为Wi-Fi(交上\\关,设置IP地址等)?

starts a mobile settings. Is there something like that for wi-fi (turn in\off, setting ip-address etc)?

推荐答案

您可以通过添加下面的群众演员你的意图,只显示无线设置片段

You can show only the wireless settings fragment by adding the following extras to your intent

Intent i = new Intent(Settings.ACTION_WIRELESS_SETTINGS);
i.putExtra(":android:show_fragment", "com.android.settings.wifi.WifiSettings");
i.putExtra(":android:no_headers", true);

startActivity(i);

这篇关于Android上的3只显示无线系统设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆