如何在应用程序中访问com.android.internal.R.bool?

问题描述 投票:10回答:2

我想访问以获取此参数

com.android.internal.R.bool.config_wifi_background_scan_support但它给出了像com.android.internal.R这样的错误无法解决?

我正试图用这种方式:this.getResources().getSystem().getIdentifier("config_wifi_background_scan_support","id", "android")

但我一无所获。

任何人都知道如何在com.android.internal.R.bool获取信息?

android android-wifi
2个回答
19
投票

你几乎是对的。

Resources.getSystem().getIdentifier("config_wifi_background_scan_support","bool", "android");

为您提供正确的ID。


-1
投票

com.android.internal.R是一个隐藏的Android API。

这个link解释了它的用法。

© www.soinside.com 2019 - 2024. All rights reserved.