aboutsummaryrefslogtreecommitdiff
path: root/core-ui/src/main/kotlin
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-12-24 00:27:25 -0500
committerGitHub <noreply@github.com>2018-12-24 00:27:25 -0500
commita380adea1052d39f23c9c4d432a9380ce347d6c4 (patch)
treecdbb6835cdc3c04df24af2323341d765f64ab2e3 /core-ui/src/main/kotlin
parent98a7f378399546086e23e25514b705e037068058 (diff)
downloadkau-a380adea1052d39f23c9c4d432a9380ce347d6c4.tar.gz
kau-a380adea1052d39f23c9c4d432a9380ce347d6c4.tar.bz2
kau-a380adea1052d39f23c9c4d432a9380ce347d6c4.zip
Migrate to androidx (#178)
* Initial refactor * Remove alpha version usages * Update test code * Add tests for checkbox * Fix invalid card import * Remove more old support content * Update kotlin version * Add back kotterknife with new imports * Update docs * Use bold notice * Add changelog * Remove deprecation for kotterknife * Remove unused dependencies * Update changelog
Diffstat (limited to 'core-ui/src/main/kotlin')
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/activities/ElasticRecyclerActivity.kt9
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/BoundedCardView.kt2
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt2
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt2
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/InkPageIndicator.java4
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt2
6 files changed, 11 insertions, 10 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 3951970..5b0e97b 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
@@ -2,10 +2,10 @@ package ca.allanwang.kau.ui.activities
import android.os.Build
import android.os.Bundle
-import android.support.annotation.RequiresApi
-import android.support.v7.widget.RecyclerView
-import android.support.v7.widget.Toolbar
import android.transition.TransitionInflater
+import androidx.annotation.RequiresApi
+import androidx.appcompat.widget.Toolbar
+import androidx.recyclerview.widget.RecyclerView
import ca.allanwang.kau.internal.KauBaseActivity
import ca.allanwang.kau.ui.R
import ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout
@@ -16,7 +16,7 @@ import kotlinx.android.synthetic.main.kau_elastic_recycler_activity.*
*
* A generic activity comprised of an ElasticDragDismissFrameLayout, CoordinatorLayout, Toolbar, RecyclerView, and Fab
* [ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout]
- * [android.support.v7.widget.RecyclerView]
+ * [androidx.recyclerview.widget.RecyclerView]
*
* The recyclerview defaults to a linearlayoutmanager, and the adapter is automatically bounded
*
@@ -39,6 +39,7 @@ abstract class ElasticRecyclerActivity : KauBaseActivity() {
setContentView(R.layout.kau_elastic_recycler_activity)
setSupportActionBar(kau_toolbar)
if (!onCreate(savedInstanceState, configs)) return
+
kau_draggable.addListener(object : ElasticDragDismissFrameLayout.SystemChromeFader(this) {
override fun onDragDismissed() {
window.returnTransition = TransitionInflater.from(this@ElasticRecyclerActivity)
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/BoundedCardView.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/BoundedCardView.kt
index 5fc3e06..25a05df 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/BoundedCardView.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/BoundedCardView.kt
@@ -2,8 +2,8 @@ package ca.allanwang.kau.ui.views
import android.content.Context
import android.graphics.Rect
-import android.support.v7.widget.CardView
import android.util.AttributeSet
+import androidx.cardview.widget.CardView
import ca.allanwang.kau.ui.R
import ca.allanwang.kau.utils.parentViewGroup
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt
index 5db5eaa..5cb4329 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/MeasuredImageView.kt
@@ -1,7 +1,7 @@
package ca.allanwang.kau.ui.views
import android.content.Context
-import android.support.v7.widget.AppCompatImageView
+import androidx.appcompat.widget.AppCompatImageView
import android.util.AttributeSet
/**
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 f357f79..b89373e 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
@@ -20,7 +20,7 @@ import android.app.Activity
import android.content.Context
import android.graphics.Color
import android.os.Build
-import android.support.annotation.RequiresApi
+import androidx.annotation.RequiresApi
import android.transition.TransitionInflater
import android.util.AttributeSet
import android.view.MotionEvent
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 a963556..13381aa 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
@@ -27,14 +27,14 @@ import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.RectF;
-import android.support.annotation.ColorInt;
-import android.support.v4.view.ViewPager;
+import androidx.annotation.ColorInt;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Interpolator;
import java.util.Arrays;
+import androidx.viewpager.widget.ViewPager;
import ca.allanwang.kau.ui.R;
import ca.allanwang.kau.utils.AnimHolder;
import ca.allanwang.kau.utils.ColorUtilsKt;
diff --git a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt
index bcd930f..a53ee9d 100644
--- a/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt
@@ -2,7 +2,7 @@ package ca.allanwang.kau.ui.widgets
import android.content.Context
import android.graphics.Color
-import android.support.v4.widget.TextViewCompat
+import androidx.core.widget.TextViewCompat
import android.text.TextUtils
import android.util.AttributeSet
import android.view.Gravity