aboutsummaryrefslogtreecommitdiff
path: root/core-ui/src/main
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2019-09-08 01:25:23 -0700
committerGitHub <noreply@github.com>2019-09-08 01:25:23 -0700
commitc6140c1008b042376bab328780f1686b75a9f839 (patch)
tree7a4578d02c9d93f922b721610124d445f7209ed3 /core-ui/src/main
parenta9407288fad0d30e71e2f6862b66533e043f9311 (diff)
parentff2a6237d1412b400644650f12389fefe73480c8 (diff)
downloadkau-c6140c1008b042376bab328780f1686b75a9f839.tar.gz
kau-c6140c1008b042376bab328780f1686b75a9f839.tar.bz2
kau-c6140c1008b042376bab328780f1686b75a9f839.zip
Merge pull request #221 from AllanWang/android-readability
Android readability
Diffstat (limited to 'core-ui/src/main')
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt4
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt4
-rw-r--r--core-ui/src/main/res-public/values/public.xml6
3 files changed, 9 insertions, 5 deletions
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt
index aff4d1c..3e7254f 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt
@@ -53,7 +53,9 @@ abstract class ElasticRecyclerActivity : KauBaseActivity() {
super.onCreate(savedInstanceState)
setContentView(R.layout.kau_elastic_recycler_activity)
setSupportActionBar(kau_toolbar)
- if (!onCreate(savedInstanceState, configs)) return
+ if (!onCreate(savedInstanceState, configs)) {
+ return
+ }
kau_draggable.addListener(object : ElasticDragDismissFrameLayout.SystemChromeFader(this) {
override fun onDragDismissed() {
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
index 52672fa..6095a32 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
@@ -204,7 +204,9 @@ class ElasticDragDismissFrameLayout @JvmOverloads constructor(
}
translationY = dragTo
- if (shouldScale) scaleXY = 1 - (1 - dragDismissScale) * dragFraction
+ if (shouldScale) {
+ scaleXY = 1 - (1 - dragDismissScale) * dragFraction
+ }
// if we've reversed direction and gone past the settle point then clear the flags to
// allow the list to get the scroll events & reset any transforms
diff --git a/core-ui/src/main/res-public/values/public.xml b/core-ui/src/main/res-public/values/public.xml
index f62ed25..c8c2e56 100644
--- a/core-ui/src/main/res-public/values/public.xml
+++ b/core-ui/src/main/res-public/values/public.xml
@@ -1,10 +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' />
- <public name='kau_recycler_detached_background' type='layout' />
- <public name='kau_elastic_recycler_activity' type='layout' />
- <public name='kau_recycler_textslider' type='layout' />
</resources> \ No newline at end of file