英文:
How to open little popup menu for selecting wifi in android?
问题
我注意到一些安卓应用中出现了这种半屏的WiFi选择菜单。
我想在自己的应用中使用这个菜单,让用户有可能在不跳转到设置应用的情况下选择WiFi。
我没有找到任何关于如何实现这一点的指示。然而,Android Studio的布局检查器显示它属于系统,而不属于应用。
有人知道如何打开这个菜单吗?
英文:
I noticed this half screen wifi selection menu in some Android Apps.
I would like to use this menu in my own app, to give the user the possibility to select the wifi without jumping to settings app.
I didn't find any instruction how to do this. However AndroidStudios Layout Inspector showed me that its belonging to the system, not to the app.
Anyone knows how to open this menu ?
答案1
得分: 2
这被称为设置面板:
链接:https://medium.com/google-developer-experts/exploring-android-q-settings-panels-d308525b8345
英文:
It's called a Settings Panel:
https://medium.com/google-developer-experts/exploring-android-q-settings-panels-d308525b8345
答案2
得分: 2
你正在寻找 Settings Panel
。
这适用于 Android Q。
以下是调用示例。
startActivityForResult(Intent(Settings.Panel.ACTION_INTERNET_CONNECTIVITY), INTERNET_SETTINGS_REQUEST)
英文:
You are looking for Settings Panel
This is for Android Q.
Here's an example to how to call it.
startActivityForResult(Intent(Settings.Panel.ACTION_INTERNET_CONNECTIVITY), INTERNET_SETTINGS_REQUEST)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论