aboutsummaryrefslogtreecommitdiff
path: root/sample/src
diff options
context:
space:
mode:
Diffstat (limited to 'sample/src')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt16
-rw-r--r--sample/src/main/res/values/strings.xml1
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml4
3 files changed, 17 insertions, 4 deletions
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
index 09002d4..1528970 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -16,10 +16,7 @@ import ca.allanwang.kau.searchview.SearchView
import ca.allanwang.kau.searchview.bindSearchView
import ca.allanwang.kau.swipe.SWIPE_EDGE_LEFT
import ca.allanwang.kau.ui.views.RippleCanvas
-import ca.allanwang.kau.utils.materialDialog
-import ca.allanwang.kau.utils.navigationBarColor
-import ca.allanwang.kau.utils.startActivity
-import ca.allanwang.kau.utils.toast
+import ca.allanwang.kau.utils.*
import ca.allanwang.kau.xml.showChangelog
import com.mikepenz.google_material_typeface_library.GoogleMaterial
@@ -185,6 +182,17 @@ class MainActivity : KPrefActivity() {
onClick = { _, _, _ -> kauLaunchAbout(AboutActivity::class.java); false }
}
+ header(R.string.long_prefs)
+
+ checkbox(R.string.checkbox_3, { KPrefSample.check2 }, { KPrefSample.check2 = it; reloadByTitle(R.string.checkbox_3) }) {
+ descRes = R.string.kau_lorem_ipsum
+ }
+
+ text(R.string.text, { KPrefSample.text }, { KPrefSample.text = it }) {
+ descRes = R.string.kau_lorem_ipsum
+ textGetter = { string(R.string.kau_lorem_ipsum) }
+ }
+
}
fun subPrefs(): KPrefAdapterBuilder.() -> Unit = {
diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml
index 086b27b..a887ad3 100644
--- a/sample/src/main/res/values/strings.xml
+++ b/sample/src/main/res/values/strings.xml
@@ -24,4 +24,5 @@
<string name="video_overlay_showcase">Video Overlay Showcase</string>
<string name="adapter_showcase">Adapter Showcase</string>
<string name="about_kau">KAU (Kotlin Android Utils) is a collection of common extension functions and complex UIs that can be used in almost all apps. It is meant to implement the shared components, so you can focus on what makes your app unique.</string>
+ <string name="long_prefs">Long Prefs</string>
</resources>
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index 3eb5287..1d46757 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -8,6 +8,10 @@
<version title="v3.3.2"/>
<item text=":kpref-activity: Add visibility toggle to Core contract. Items can override this to show/hide given preferences based on boolean callbacks." />
+ <item text=":kpref-activity: Add width constraint for long text items" />
+ <item text="" />
+ <item text="" />
+ <item text="" />
<version title="v3.3.1"/>
<item text=":core: Open up all logger functions" />