android - 是否可以在Android中获取系统设置的主题?
问题描述
使用 android.provider.Settings.ACTION_WIFI_ADD_NETWORKS 意图时,我在某些设备上发生崩溃(参考:https ://developer.android.com/guide/topics/connectivity/wifi-save-network-passpoint-config )。
例如在 OnePlus 中:https ://forums.oneplus.com/threads/crash-launching-android-settings-wifi_add_networks-intent.1353760/
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.android.settings/com.android.settings.wifi.addappnetworks.AddAppNetworksActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
这次崩溃是由于手机设置主题有错误的父项,所以现在我将这些设备放在“已知崩溃列表”中,但我想做某种检测,所以我想知道是否有办法获取系统设置的主题?
解决方案
推荐阅读
- vue.js - 如何在vue js的过滤器搜索中添加大于等于的条件
- python - 以大多数pythonic方式从字典列表生成配置样式文件
- python - Python中1到N之间所有素数的总和[第2部分]
- html - Html5边框-半径反向填充
- javascript - 使用 WebRTC 进行简单的视频聊天和直播
- sql-server - 使用 Join 语句创建视图
- rsa - 有什么方法可以将 RSA 私钥转换为 x509 格式?
- c++ - 如何在最短的时间内处理大文件(c++、openmp、输入文件:FASTQ/FASTA)
- amazon-s3 - 将 amazon mysql 数据库导出到 Excel 工作表
- elixir - phoenix 传递变量来查看