aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/build.gradle2
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/ColorPickerTest.kt79
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AdapterActivity.kt2
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt1
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt5
-rw-r--r--sample/src/main/play/contact-email.txt (renamed from sample/src/main/play/contactEmail)0
-rw-r--r--sample/src/main/play/default-language.txt (renamed from sample/src/main/play/defaultLanguage)0
-rw-r--r--sample/src/main/play/listings/en-CA/listing/full-description.txt (renamed from sample/src/main/play/en-CA/listing/fulldescription)0
-rw-r--r--sample/src/main/play/listings/en-CA/listing/short-description.txt (renamed from sample/src/main/play/en-CA/listing/shortdescription)0
-rw-r--r--sample/src/main/play/listings/en-CA/listing/title-txt (renamed from sample/src/main/play/en-CA/listing/title)0
-rw-r--r--sample/src/main/play/release-notes/en-CA/default.txt (renamed from sample/src/main/play/en-CA/whatsnew)0
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml15
12 files changed, 16 insertions, 88 deletions
diff --git a/sample/build.gradle b/sample/build.gradle
index 9880735..cacd21f 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -117,7 +117,7 @@ android {
dependencies {
implementation project(':about')
- implementation project(':adapter')
+ implementation project(':fastadapter')
implementation project(':colorpicker')
implementation project(':core')
implementation project(':core-ui')
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/ColorPickerTest.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/ColorPickerTest.kt
deleted file mode 100644
index ef53817..0000000
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/ColorPickerTest.kt
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2018 Allan Wang
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package ca.allanwang.kau.sample
-
-import android.view.View
-import androidx.test.espresso.DataInteraction
-import androidx.test.espresso.Espresso.onData
-import androidx.test.espresso.Espresso.onView
-import androidx.test.espresso.ViewAssertion
-import androidx.test.espresso.action.ViewActions.click
-import androidx.test.espresso.matcher.ViewMatchers.withId
-import androidx.test.espresso.matcher.ViewMatchers.withText
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.MediumTest
-import androidx.test.rule.ActivityTestRule
-import ca.allanwang.kau.colorpicker.CircleView
-import org.hamcrest.Matchers.anything
-import org.junit.Rule
-import org.junit.Test
-import org.junit.runner.RunWith
-import kotlin.test.assertEquals
-import kotlin.test.fail
-
-/**
- * Created by Allan Wang on 22/02/2018.
- *
- * Tests related to the :colorpicker module
- */
-@RunWith(AndroidJUnit4::class)
-@MediumTest
-class ColorPickerTest {
-
- @get:Rule
- val activity: ActivityTestRule<MainActivity> = ActivityTestRule(MainActivity::class.java)
-
- private fun DataInteraction.click(position: Int) =
- atPosition(position).perform(click())
-
- private fun View.colorSelected(selected: Boolean) {
- val circle = this as? CircleView ?: fail("View is not a CircleView")
- assertEquals(
- selected,
- circle.colorSelected,
- "CircleView ${circle.tag} ${if (selected) "is not" else "is"} actually selected"
- )
- }
-
- private val colorSelected = ViewAssertion { view, _ -> view.colorSelected(true) }
-
- private val colorNotSelected = ViewAssertion { view, _ -> view.colorSelected(false) }
-
- @Test
- fun colorClick() {
- onView(withText(R.string.accent_color)).perform(click())
- val colors = onData(anything()).inAdapterView(withId(R.id.md_grid))
-
- colors.click(0).check(colorNotSelected) // enter sub grid
- colors.click(0).check(colorSelected) // click first grid item
- colors.atPosition(1).check(colorNotSelected)
- colors.atPosition(2).check(colorNotSelected)
- .perform(click()).check(colorSelected)
- colors.atPosition(0).check(colorNotSelected)
- .perform(click()).check(colorSelected)
- // first item is now selected
- }
-}
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AdapterActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AdapterActivity.kt
index 2fedbeb..8c35c77 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AdapterActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AdapterActivity.kt
@@ -22,7 +22,7 @@ import ca.allanwang.kau.ui.activities.ElasticRecyclerActivity
import ca.allanwang.kau.utils.toast
import com.mikepenz.fastadapter.IItem
import com.mikepenz.fastadapter.adapters.ItemAdapter
-import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial
+import com.mikepenz.google_material_typeface_library.GoogleMaterial
/**
* Created by Allan Wang on 2017-07-17.
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt
index 0f20880..80a75bf 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/KPrefSample.kt
@@ -17,7 +17,6 @@ package ca.allanwang.kau.sample
import android.graphics.Color
import ca.allanwang.kau.kpref.KPref
-import ca.allanwang.kau.kpref.kpref
/**
* Created by Allan Wang on 2017-06-07.
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 b848812..f4a09cf 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -39,8 +39,7 @@ import ca.allanwang.kau.utils.toast
import ca.allanwang.kau.utils.withSceneTransitionAnimation
import ca.allanwang.kau.xml.showChangelog
import com.afollestad.materialdialogs.input.input
-import com.mikepenz.iconics.typeface.library.googlematerial.GoogleMaterial
-import java.lang.RuntimeException
+import com.mikepenz.google_material_typeface_library.GoogleMaterial
class MainActivity : KPrefActivity() {
@@ -107,7 +106,7 @@ class MainActivity : KPrefActivity() {
accentColor = KPrefSample::accentColor
}
- override fun onCreateKPrefs(savedInstanceState: android.os.Bundle?): KPrefAdapterBuilder.() -> Unit = {
+ override fun onCreateKPrefs(savedInstanceState: Bundle?): KPrefAdapterBuilder.() -> Unit = {
header(R.string.header)
diff --git a/sample/src/main/play/contactEmail b/sample/src/main/play/contact-email.txt
index 3e03392..3e03392 100644
--- a/sample/src/main/play/contactEmail
+++ b/sample/src/main/play/contact-email.txt
diff --git a/sample/src/main/play/defaultLanguage b/sample/src/main/play/default-language.txt
index ffdd217..ffdd217 100644
--- a/sample/src/main/play/defaultLanguage
+++ b/sample/src/main/play/default-language.txt
diff --git a/sample/src/main/play/en-CA/listing/fulldescription b/sample/src/main/play/listings/en-CA/listing/full-description.txt
index 2d9fe89..2d9fe89 100644
--- a/sample/src/main/play/en-CA/listing/fulldescription
+++ b/sample/src/main/play/listings/en-CA/listing/full-description.txt
diff --git a/sample/src/main/play/en-CA/listing/shortdescription b/sample/src/main/play/listings/en-CA/listing/short-description.txt
index 9424ee8..9424ee8 100644
--- a/sample/src/main/play/en-CA/listing/shortdescription
+++ b/sample/src/main/play/listings/en-CA/listing/short-description.txt
diff --git a/sample/src/main/play/en-CA/listing/title b/sample/src/main/play/listings/en-CA/listing/title-txt
index c3c5422..c3c5422 100644
--- a/sample/src/main/play/en-CA/listing/title
+++ b/sample/src/main/play/listings/en-CA/listing/title-txt
diff --git a/sample/src/main/play/en-CA/whatsnew b/sample/src/main/play/release-notes/en-CA/default.txt
index 1d15ce2..1d15ce2 100644
--- a/sample/src/main/play/en-CA/whatsnew
+++ b/sample/src/main/play/release-notes/en-CA/default.txt
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index 53265d0..62614ed 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -6,12 +6,21 @@
<item text="" />
-->
+ <version title="v5.1.0" />
+ <item text=":adapter: Moved fastadapter elements to new module, :fastadapter:. To migrate, simply rename the dependency. If you don't use fast adapter, no changes are necessary" />
+ <item text=":adapter: Make NoAnimatorChange an object; previously a class" />
+ <item text=":core: KPref now supports in memory only variants for testing; pass KPrefBuilderInMemory to KPref constructor" />
+ <item text=":core: KPref initializer takes in SharedPreferences so user can configure it" />
+ <item text="" />
+
<version title="v5.0.0" />
+ <item text="Update Android SDK to 29 and Kotlin to 1.3.31" />
+ <item text="Update translations" />
<item text=":core: Update Material Dialogs to 3.x" />
+ <item text=":core: Change ProgressAnimator API" />
+ <item text=":core: Remove cursor tinting in EditText as it used reflection" />
<item text=":colorpicker: Strip down to just the interface; unless you require the accent palette, it may be fine to just use MD's color extension" />
- <item text="" />
- <item text="" />
- <item text="" />
+ <item text=":gradle-plugin: Convert to kotlin, rework dependencies, and remove extension hooks" />
<item text="" />
<version title="v4.1.0" />