有没有办法为 android Settings.Panel.ACTION_WIFI 创建自定义 UI

发布于 2025-01-15 22:26:30 字数 375 浏览 2 评论 0原文

我试图使用 wifi 开/关选项。我通过 Settings.Panel.ACTION_WIFI 进入,它按预期工作。然而,系统 UI 在某些设备上存在问题。它在平板电脑中变得扭曲。现在我正在尝试将此 UI 修复到设备的中心。是否有任何选项可以覆盖默认系统窗口并将此对话框放置到设备的中心?我使用的代码是 Intent wifiIntent = new Intent(Settings.Panel.ACTION_WIFI); 启动活动(wifiIntent);

输入图片此处描述

I was trying to use the wifi on/off option. I came through Settings.Panel.ACTION_WIFI and it is working as expected. However the system UI has issues in some of the devices. It is getting distorted in tablets. Now I'm trying to fix this UI to the center of the device. Is there any option to override the default system window and place this dialog to the center of device ? The code I used is
Intent wifiIntent = new Intent(Settings.Panel.ACTION_WIFI);
startActivity(wifiIntent);

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文