【发布时间】:2021-10-13 15:32:11
【问题描述】:
我想知道如何在 Flipper 共享首选项查看器插件中显示多个共享首选项键。 KEY_FOO、KEY_BAR、KEY_BAZ 是共享首选项文件的字符串常量。
类似
class App: Application() {
override fun onCreate() {
super.onCreate()
setupFlipper()
}
private fun setupFlipper() {
if (BuildConfig.DEBUG && FlipperUtils.shouldEnableFlipper(this)) {
val client = AndroidFlipperClient.getInstance(this)
client.addPlugin(InspectorFlipperPlugin(this, DescriptorMapping.withDefaults()))
client.addPlugin(
SharedPreferencesFlipperPlugin(applicationContext, KEY_FOO)
)
client.addPlugin(
SharedPreferencesFlipperPlugin(applicationContext, KEY_BAR)
)
client.addPlugin(
SharedPreferencesFlipperPlugin(applicationContext, KEY_BAZ)
)
client.start()
}
}
}
【问题讨论】:
标签: android sharedpreferences flipper fbflipper