aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md4
-rw-r--r--buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy2
-rw-r--r--core-ui/src/main/res-public/values/public.xml10
-rw-r--r--core/src/main/res-public/values/public.xml118
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt16
5 files changed, 139 insertions, 11 deletions
diff --git a/README.md b/README.md
index 4c0963c..edf6878 100644
--- a/README.md
+++ b/README.md
@@ -44,9 +44,9 @@ Note that if you use any particular submodule, it will automatically include all
```gradle
dependencies {
- //All submodules extend this
+ // all submodules extend this
implementation "ca.allanwang.kau:core:$KAU"
- //All submodules with extensive ui extend this
+ // all submodules with extensive ui extend this
implementation "ca.allanwang.kau:core-ui:$KAU"
implementation "ca.allanwang.kau:about:$KAU"
diff --git a/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy b/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy
index 49efbe7..d767a8a 100644
--- a/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy
+++ b/buildSrc/src/main/groovy/ca/allanwang/kau/Versions.groovy
@@ -46,7 +46,7 @@ class Versions {
static def junit = '4.12'
static def testRunner = '1.0.1'
- static def gradlePlugin = '3.2.0'
+ static def gradlePlugin = '3.2.1'
static def mavenPlugin = '2.1'
static def playPublishPlugin = '1.2.2'
diff --git a/core-ui/src/main/res-public/values/public.xml b/core-ui/src/main/res-public/values/public.xml
new file mode 100644
index 0000000..f46b3eb
--- /dev/null
+++ b/core-ui/src/main/res-public/values/public.xml
@@ -0,0 +1,10 @@
+<resources xmlns:tools='http://schemas.android.com/tools' tools:ignore='ResourceName'>
+<!-- AUTO-GENERATED FILE. DO NOT MODIFY. public.xml is generated by the generatepublicxml gradle task -->
+ <public name='kau_recycler_detached_background' type='layout' />
+ <public name='kau_elastic_recycler_activity' type='layout' />
+ <public name='kau_recycler_textslider' type='layout' />
+ <public name='Kau.Translucent' type='style' />
+ <public name='Kau.Translucent.NoAnimation' type='style' />
+ <public name='Kau.Translucent.SlideBottom' type='style' />
+ <public name='Kau.Translucent.SlideTop' type='style' />
+</resources> \ No newline at end of file
diff --git a/core/src/main/res-public/values/public.xml b/core/src/main/res-public/values/public.xml
new file mode 100644
index 0000000..ea8ed73
--- /dev/null
+++ b/core/src/main/res-public/values/public.xml
@@ -0,0 +1,118 @@
+<resources xmlns:tools='http://schemas.android.com/tools' tools:ignore='ResourceName'>
+<!-- AUTO-GENERATED FILE. DO NOT MODIFY. public.xml is generated by the generatepublicxml gradle task -->
+ <public name='kau_slide_in_top' type='anim' />
+ <public name='kau_slide_in_left' type='anim' />
+ <public name='kau_slide_out_right' type='anim' />
+ <public name='kau_slide_out_right_top' type='anim' />
+ <public name='kau_fade_in' type='anim' />
+ <public name='kau_slide_out_top' type='anim' />
+ <public name='kau_slide_out_bottom' type='anim' />
+ <public name='kau_fade_out' type='anim' />
+ <public name='kau_slide_out_left' type='anim' />
+ <public name='kau_slide_out_left_top' type='anim' />
+ <public name='kau_slide_in_bottom' type='anim' />
+ <public name='kau_slide_in_right' type='anim' />
+ <public name='kau_transparent' type='drawable' />
+ <public name='kau_selectable_white' type='drawable' />
+ <public name='kau_shadow_overlay' type='color' />
+ <public name='kau_activity_horizontal_margin' type='dimen' />
+ <public name='kau_activity_vertical_margin' type='dimen' />
+ <public name='kau_dialog_margin' type='dimen' />
+ <public name='kau_dialog_margin_bottom' type='dimen' />
+ <public name='kau_fab_margin' type='dimen' />
+ <public name='kau_appbar_padding_top' type='dimen' />
+ <public name='kau_splash_logo' type='dimen' />
+ <public name='kau_progress_bar_height' type='dimen' />
+ <public name='kau_account_image_size' type='dimen' />
+ <public name='kau_status_bar_height' type='dimen' />
+ <public name='kau_drag_dismiss_distance' type='dimen' />
+ <public name='kau_drag_dismiss_distance_large' type='dimen' />
+ <public name='kau_spacing_normal' type='dimen' />
+ <public name='kau_spacing_micro' type='dimen' />
+ <public name='kau_spacing_large' type='dimen' />
+ <public name='kau_spacing_xlarge' type='dimen' />
+ <public name='kau_spacing_huge' type='dimen' />
+ <public name='kau_padding_small' type='dimen' />
+ <public name='kau_padding_normal' type='dimen' />
+ <public name='kau_padding_large' type='dimen' />
+ <public name='kau_fab_size' type='dimen' />
+ <public name='kau_fab_radius' type='dimen' />
+ <public name='kau_display_4_text_size' type='dimen' />
+ <public name='kau_avatar_size' type='dimen' />
+ <public name='kau_avatar_bounds' type='dimen' />
+ <public name='kau_avatar_padding' type='dimen' />
+ <public name='kau_avatar_margin' type='dimen' />
+ <public name='kau_avatar_ripple_radius' type='dimen' />
+ <public name='kau_about_app' type='string' />
+ <public name='kau_about_x' type='string' />
+ <public name='kau_add_account' type='string' />
+ <public name='kau_amoled' type='string' />
+ <public name='kau_back' type='string' />
+ <public name='kau_cancel' type='string' />
+ <public name='kau_changelog' type='string' />
+ <public name='kau_close' type='string' />
+ <public name='kau_contact_us' type='string' />
+ <public name='kau_copy' type='string' />
+ <public name='kau_custom' type='string' />
+ <public name='kau_dark' type='string' />
+ <public name='kau_default' type='string' />
+ <public name='kau_do_not_show_again' type='string' />
+ <public name='kau_done' type='string' />
+ <public name='kau_error' type='string' />
+ <public name='kau_exit' type='string' />
+ <public name='kau_exit_confirmation' type='string' />
+ <public name='kau_exit_confirmation_x' type='string' />
+ <public name='kau_glass' type='string' />
+ <public name='kau_got_it' type='string' />
+ <public name='kau_great' type='string' />
+ <public name='kau_hide' type='string' />
+ <public name='kau_light' type='string' />
+ <public name='kau_login' type='string' />
+ <public name='kau_logout' type='string' />
+ <public name='kau_logout_confirm_as_x' type='string' />
+ <public name='kau_lorem_ipsum' type='string' />
+ <public name='kau_manage_account' type='string' />
+ <public name='kau_maybe' type='string' />
+ <public name='kau_menu' type='string' />
+ <public name='kau_no' type='string' />
+ <public name='kau_no_results_found' type='string' />
+ <public name='kau_none' type='string' />
+ <public name='kau_ok' type='string' />
+ <public name='kau_play_store' type='string' />
+ <public name='kau_rate' type='string' />
+ <public name='kau_report_bug' type='string' />
+ <public name='kau_search' type='string' />
+ <public name='kau_send_feedback' type='string' />
+ <public name='kau_send_via' type='string' />
+ <public name='kau_settings' type='string' />
+ <public name='kau_share' type='string' />
+ <public name='kau_text_copied' type='string' />
+ <public name='kau_thank_you' type='string' />
+ <public name='kau_uh_oh' type='string' />
+ <public name='kau_warning' type='string' />
+ <public name='kau_x_days' type='plurals' />
+ <public name='kau_x_hours' type='plurals' />
+ <public name='kau_x_minutes' type='plurals' />
+ <public name='kau_x_seconds' type='plurals' />
+ <public name='kau_yes' type='string' />
+ <public name='kau_permission_denied' type='string' />
+ <public name='kau_0' type='string' />
+ <public name='kau_bullet_point' type='string' />
+ <public name='Kau' type='style' />
+ <public name='Kau.Translucent' type='style' />
+ <public name='KauFadeIn' type='style' />
+ <public name='KauFadeInFadeOut' type='style' />
+ <public name='KauSlideInRight' type='style' />
+ <public name='KauSlideInBottom' type='style' />
+ <public name='KauSlideInFadeOut' type='style' />
+ <public name='KauSlideInSlideOutRight' type='style' />
+ <public name='KauSlideInSlideOutBottom' type='style' />
+ <public name='kau_enter_slide_bottom' type='transition' />
+ <public name='kau_enter_slide_top' type='transition' />
+ <public name='kau_exit_slide_bottom' type='transition' />
+ <public name='kau_exit_slide_top' type='transition' />
+ <public name='kau_enter_slide_right' type='transition' />
+ <public name='kau_exit_slide_right' type='transition' />
+ <public name='kau_exit_slide_left' type='transition' />
+ <public name='kau_enter_slide_left' type='transition' />
+</resources> \ No newline at end of file
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
index 78f4f80..ce61e8f 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
@@ -15,14 +15,9 @@ import ca.allanwang.kau.utils.tint
*/
open class KPrefSeekbar(val builder: KPrefSeekbarContract) : KPrefItemBase<Int>(builder) {
- protected val min = builder.min
- protected val max = builder.max
- protected val increment = builder.increments
-
- init {
- if (increment <= 0)
- throw IllegalArgumentException("Seekbar must increment by at least 1")
- }
+ protected inline val min get() = builder.min
+ protected inline val max get() = builder.max
+ protected inline val increment get() = builder.increments
override fun KClick<Int>.defaultOnClick() = Unit
@@ -83,6 +78,11 @@ open class KPrefSeekbar(val builder: KPrefSeekbarContract) : KPrefItemBase<Int>(
override var max: Int = 100
override var increments: Int = 1
+ set(value) {
+ if (value <= 0)
+ throw IllegalArgumentException("Seekbar must increment by at least 1")
+ field = value
+ }
override var toText: (Int) -> String = Int::toString