aboutsummaryrefslogtreecommitdiff
path: root/sample/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sample/src/main')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt24
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml14
2 files changed, 20 insertions, 18 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 dd81ce1..e735b38 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -107,10 +107,7 @@ class MainActivity : KPrefActivity() {
checkbox(R.string.checkbox_3, { KPrefSample.check3 }, { KPrefSample.check3 = it }) {
descRes = R.string.desc_dependent
enabler = { KPrefSample.check2 }
- onDisabledClick = { itemView, _, _ ->
- itemView.context.toast("I am still disabled")
- true
- }
+ onDisabledClick = { itemView.context.toast("I am still disabled") }
}
colorPicker(R.string.text_color, { KPrefSample.textColor }, { KPrefSample.textColor = it; reload() }) {
@@ -139,13 +136,13 @@ class MainActivity : KPrefActivity() {
text(R.string.text, { KPrefSample.text }, { KPrefSample.text = it }) {
descRes = R.string.text_desc
- onClick = { itemView, _, item ->
+ onClick = {
itemView.context.materialDialog {
title("Type Text")
input("Type here", item.pref, { _, input -> item.pref = input.toString() })
inputRange(0, 20)
}
- true
+
}
}
@@ -161,28 +158,26 @@ class MainActivity : KPrefActivity() {
}
plainText(R.string.swipe_showcase) {
- onClick = { _, _, _ -> startActivityWithEdge(SWIPE_EDGE_LEFT); false }
+ onClick = { startActivityWithEdge(SWIPE_EDGE_LEFT) }
}
plainText(R.string.image_showcase) {
- onClick = { _, _, _ -> kauLaunchMediaPicker(ImagePickerActivity::class.java, REQUEST_MEDIA); false }
+ onClick = { kauLaunchMediaPicker(ImagePickerActivity::class.java, REQUEST_MEDIA) }
}
plainText(R.string.video_overlay_showcase) {
- onClick = { _, _, _ -> kauLaunchMediaPicker(VideoPickerActivityOverlay::class.java, REQUEST_MEDIA); false }
+ onClick = { kauLaunchMediaPicker(VideoPickerActivityOverlay::class.java, REQUEST_MEDIA) }
}
plainText(R.string.adapter_showcase) {
- onClick = { _, _, _ ->
- startActivity(AdapterActivity::class.java, bundleBuilder = {
+ onClick = { startActivity(AdapterActivity::class.java, bundleBuilder = {
withSceneTransitionAnimation(this@MainActivity)
})
- false
}
}
plainText(R.string.kau_about_app) {
- onClick = { _, _, _ -> kauLaunchAbout(AboutActivity::class.java); false }
+ onClick = { kauLaunchAbout(AboutActivity::class.java) }
}
header(R.string.long_prefs)
@@ -211,7 +206,7 @@ class MainActivity : KPrefActivity() {
fun subPrefs(): KPrefAdapterBuilder.() -> Unit = {
text(R.string.text, { KPrefSample.text }, { KPrefSample.text = it }) {
descRes = R.string.text_desc
- onClick = { itemView, _, item ->
+ onClick = {
itemView.context.materialDialog {
title("Type Text")
input("Type here", item.pref, { _, input ->
@@ -220,7 +215,6 @@ class MainActivity : KPrefActivity() {
})
inputRange(0, 20)
}
- true
}
}
}
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index db01fae..f57f8c4 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -6,13 +6,21 @@
<item text="" />
-->
+ <version title="v3.6.0" />
+ <item text=":core: Created BundleUtils" />
+ <item text=":core: [Breaking] Refactored startActivity functions" />
+ <item text=":kpref-activity: [Breaking] Simplified listener function parameters" />
+ <item text=":kpref-activity: [Breaking] Added dynamic string loading options" />
+ <item text="" />
+ <item text="(See Migrations.md for further details on breaking changes)" />
+
<version title="v3.5.1" />
<item text="Add Portuguese translations" />
<item text="Add Galician translations" />
<item text="Add some minor util elements" />
<item text="Update dependencies (sdk 27)" />
- <version title="v3.5.0" />
+ <version title="v3.5.0" />
<item text="Update dependencies, many of which with major version increments" />
<item text="Add Vietnamese translations" />
<item text="Add Italian translations" />
@@ -21,8 +29,8 @@
<item text=":adapter: Add helper methods to enhance FastAdapter for Kotlin" />
<item text=":core: Create ProgressAnimator class" />
<item text=":searchview: Add searchview holder interface" />
-
- <version title="v3.4.5" />
+
+ <version title="v3.4.5" />
<item text="Add French translations" />
<item text="Add Spanish translations" />
<item text="Add German translations" />