diff options
Diffstat (limited to 'core-ui')
-rw-r--r-- | core-ui/build.gradle | 1 | ||||
-rw-r--r-- | core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt | 12 | ||||
-rw-r--r-- | core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/InkPageIndicator.java | 11 | ||||
-rw-r--r-- | core-ui/src/main/res-public/layout/kau_elastic_recycler_activity.xml (renamed from core-ui/src/main/res/layout/kau_elastic_recycler_activity.xml) | 0 | ||||
-rw-r--r-- | core-ui/src/main/res-public/layout/kau_recycler_detached_background.xml (renamed from core-ui/src/main/res/layout/kau_recycler_detached_background.xml) | 0 | ||||
-rw-r--r-- | core-ui/src/main/res-public/layout/kau_recycler_textslider.xml (renamed from core-ui/src/main/res/layout/kau_recycler_textslider.xml) | 0 | ||||
-rw-r--r-- | core-ui/src/main/res-public/values/public.xml | 3 |
7 files changed, 11 insertions, 16 deletions
diff --git a/core-ui/build.gradle b/core-ui/build.gradle index c4dcc72..da6715c 100644 --- a/core-ui/build.gradle +++ b/core-ui/build.gradle @@ -3,7 +3,6 @@ ext.kauSubModuleMinSdk = project.CORE_MIN_SDK apply from: '../android-lib.gradle' dependencies { - compile project(':core') compile project(':adapter') 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 5cdfc92..3c477c1 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 @@ -119,8 +119,7 @@ class ElasticDragDismissFrameLayout @JvmOverloads constructor( } else { // settle back to natural position animate() .translationY(0f) - .scaleX(1f) - .scaleY(1f) + .scaleXY(1f) .setDuration(200L) .setInterpolator(AnimHolder.fastOutSlowInInterpolator(context)) .setListener(null) @@ -176,11 +175,7 @@ class ElasticDragDismissFrameLayout @JvmOverloads constructor( } translationY = dragTo - if (shouldScale) { - val scale = 1 - (1 - dragDismissScale) * dragFraction - scaleX = scale - scaleY = scale - } + 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 @@ -191,8 +186,7 @@ class ElasticDragDismissFrameLayout @JvmOverloads constructor( draggingUp = false draggingDown = draggingUp translationY = 0f - scaleX = 1f - scaleY = 1f + scaleXY = 1f } dispatchDragCallback(dragFraction, dragTo, Math.min(1f, Math.abs(totalDrag) / dragDismissDistance), totalDrag) diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/InkPageIndicator.java b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/InkPageIndicator.java index cad6997..65eb5b7 100644 --- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/InkPageIndicator.java +++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/InkPageIndicator.java @@ -36,6 +36,7 @@ import android.view.animation.Interpolator; import java.util.Arrays; +import ca.allanwang.kau.logging.KL; import ca.allanwang.kau.ui.R; import ca.allanwang.kau.utils.AnimHolder; import ca.allanwang.kau.utils.ColorUtilsKt; @@ -384,7 +385,7 @@ public class InkPageIndicator extends View implements ViewPager.OnPageChangeList if ((joiningFraction == 0f || joiningFraction == INVALID_FRACTION) && dotRevealFraction == 0f - && !(page == currentPage && selectedDotInPosition == true)) { + && !(page == currentPage && selectedDotInPosition)) { // case #1 – At rest unselectedDotPath.addCircle(dotCenterX[page], dotCenterY, dotRadius, Path.Direction.CW); @@ -632,8 +633,8 @@ public class InkPageIndicator extends View implements ViewPager.OnPageChangeList }); // slightly delay the start to give the joins a chance to run // unless dot isn't in position yet – then don't delay! - moveSelected.setStartDelay(selectedDotInPosition ? animDuration / 4l : 0l); - moveSelected.setDuration(animDuration * 3l / 4l); + moveSelected.setStartDelay(selectedDotInPosition ? animDuration / 4L : 0L); + moveSelected.setDuration(animDuration * 3L / 4L); moveSelected.setInterpolator(interpolator); return moveSelected; } @@ -641,9 +642,7 @@ public class InkPageIndicator extends View implements ViewPager.OnPageChangeList private void setJoiningFraction(int leftDot, float fraction) { if (leftDot < joiningFractions.length) { - if (leftDot == 1) { - Log.d("PageIndicator", "dot 1 fraction:\t" + fraction); - } + if (leftDot == 1) KL.INSTANCE.v("PageIndicator dot 1 fraction:\t$fraction"); joiningFractions[leftDot] = fraction; postInvalidateOnAnimation(); diff --git a/core-ui/src/main/res/layout/kau_elastic_recycler_activity.xml b/core-ui/src/main/res-public/layout/kau_elastic_recycler_activity.xml index 055d61d..055d61d 100644 --- a/core-ui/src/main/res/layout/kau_elastic_recycler_activity.xml +++ b/core-ui/src/main/res-public/layout/kau_elastic_recycler_activity.xml diff --git a/core-ui/src/main/res/layout/kau_recycler_detached_background.xml b/core-ui/src/main/res-public/layout/kau_recycler_detached_background.xml index 7295d66..7295d66 100644 --- a/core-ui/src/main/res/layout/kau_recycler_detached_background.xml +++ b/core-ui/src/main/res-public/layout/kau_recycler_detached_background.xml diff --git a/core-ui/src/main/res/layout/kau_recycler_textslider.xml b/core-ui/src/main/res-public/layout/kau_recycler_textslider.xml index eacd5be..eacd5be 100644 --- a/core-ui/src/main/res/layout/kau_recycler_textslider.xml +++ b/core-ui/src/main/res-public/layout/kau_recycler_textslider.xml diff --git a/core-ui/src/main/res-public/values/public.xml b/core-ui/src/main/res-public/values/public.xml index 59e34a6..aed5f9f 100644 --- a/core-ui/src/main/res-public/values/public.xml +++ b/core-ui/src/main/res-public/values/public.xml @@ -1,5 +1,8 @@ <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_elastic_recycler_activity' type='layout' /> + <public name='kau_recycler_detached_background' type='layout' /> + <public name='kau_recycler_textslider' type='layout' /> <public name='kau_shadow_overlay' type='color' /> <public name='Kau.Translucent' type='style' /> <public name='Kau.Translucent.NoAnimation' type='style' /> |