首页 > 解决方案 > 是否可以在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.

这次崩溃是由于手机设置主题有错误的父项,所以现在我将这些设备放在“已知崩溃列表”中,但我想做某种检测,所以我想知道是否有办法获取系统设置的主题?

标签: androidthemes

解决方案


推荐阅读