Last active
September 12, 2020 16:13
-
-
Save marcauberer/c69febc6f275dfdbc134883782f38531 to your computer and use it in GitHub Desktop.
SimpleSettings - Customization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun showPreferences() { | |
val config = SimpleSettingsConfig().apply { | |
showResetOption = true | |
preferenceCallback = this@MainActivity | |
} | |
SimpleSettings(this@MainActivity, config).show(R.xml.preferences) | |
} | |
override fun onPreferenceClick(context: Context, key: String): Preference.OnPreferenceClickListener? { | |
return when(key) { | |
"preference" -> WebsiteClickListener(this@MainActivity, getString(R.string.url_github)) | |
else -> super.onPreferenceClick(context, key) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment