Skip to content

配合 PreferenceFragment 使用 #1

Description

@Krosxx
  1. 下载 SmartKeyDataStore.kt 到你的项目

  2. 设置 preferenceManager.preferenceDataStore = SmartKeyDataStore(YourConfig)

   class SettingsFragment : PreferenceFragmentCompat() {
        override fun onCreatePreferences(savedInstanceState: Bundle?, rootKey: String?) {
            preferenceManager.preferenceDataStore = SmartKeyDataStore(AppConfig)
            setPreferencesFromResource(R.xml.root_preferences, rootKey)
        }
    }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions