From fc3a16a95ab3935aacd39ebeb020b19bb375b856 Mon Sep 17 00:00:00 2001 From: Marc Auberer Date: Sat, 13 Feb 2021 19:53:34 +0100 Subject: [PATCH] Bump version to 1.1.1 --- README.md | 4 +++- .../java/com/chillibits/simplesettingssample/MainActivity.kt | 2 +- build.gradle | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4f8ea6ab..e740329e 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ If you want to test the library, please visit the sample app on [Google Play](ht ## Usage The first step for using this library is, to add it to the dependency section in your project: ```gradle -implementation 'com.chillibits:simplesettings:1.1.0' +implementation 'com.chillibits:simplesettings:1.1.1' // Required dependencies implementation 'com.google.android.material:material:' @@ -67,6 +67,8 @@ SimpleSettings(this).show { ``` This is especially useful, when you need to generate your preferences at runtime. You can use loops and conditions as you can see above. +*Note: If you want to pass a string / drawable / layout with its resource id, please use the properties with the `Res` suffix. For example: `titleRes = R.string.app_name`.* + *Note: It is not mandatory to pass keys to each preference. In this cases, the library does auto-generate a key by converting the title of each preference to CamelCase.*
**Examples**: ``` diff --git a/app/src/main/java/com/chillibits/simplesettingssample/MainActivity.kt b/app/src/main/java/com/chillibits/simplesettingssample/MainActivity.kt index 00ab89fe..02b9f3a5 100644 --- a/app/src/main/java/com/chillibits/simplesettingssample/MainActivity.kt +++ b/app/src/main/java/com/chillibits/simplesettingssample/MainActivity.kt @@ -86,7 +86,7 @@ class MainActivity : AppCompatActivity(), SimpleSettingsConfig.OptionsItemSelect // Programmatic settings data (especially useful for generating settings options at runtime) SimpleSettings(this, config).show { Section { - title = "Section" + titleRes = R.string.app_name for (i in 1..numberOfSwitchPreferences) { SwitchPref { title = "SwitchPreference $i" diff --git a/build.gradle b/build.gradle index 505ddcb7..ddd018ba 100644 --- a/build.gradle +++ b/build.gradle @@ -3,8 +3,8 @@ */ buildscript { - ext.library_version = '1.1.0' - ext.library_version_code = 1100 + ext.library_version = '1.1.1' + ext.library_version_code = 1101 ext.kotlin_version = '1.4.30' repositories { google()