aboutsummaryrefslogtreecommitdiff
path: root/sample/src
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2020-02-23 16:03:12 -0800
committerGitHub <noreply@github.com>2020-02-23 16:03:12 -0800
commit61dddd883908a803e3ee55de537e0a30ee4ef90d (patch)
tree1c0793625b9d05c98b4d0abfccd35ffa90819094 /sample/src
parent3fa13a3a84d34fd0d96f26d6c5dea0e0671dd6c4 (diff)
parent5038b93102949bb127b6cb9cb26809490739b3fa (diff)
downloadkau-61dddd883908a803e3ee55de537e0a30ee4ef90d.tar.gz
kau-61dddd883908a803e3ee55de537e0a30ee4ef90d.tar.bz2
kau-61dddd883908a803e3ee55de537e0a30ee4ef90d.zip
Merge pull request #249 from AllanWang/about-activity
About activity
Diffstat (limited to 'sample/src')
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt6
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt18
-rw-r--r--sample/src/androidTest/kotlin/ca/allanwang/kau/sample/utils/EspressoUtils.kt2
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt20
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml2
5 files changed, 31 insertions, 17 deletions
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt
index 156b66f..88a0402 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/KPrefViewTest.kt
@@ -27,6 +27,9 @@ 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 kotlin.test.BeforeTest
+import kotlin.test.assertFalse
+import kotlin.test.assertTrue
import org.hamcrest.BaseMatcher
import org.hamcrest.Description
import org.hamcrest.Matcher
@@ -39,9 +42,6 @@ import org.junit.rules.TestRule
import org.junit.runner.RunWith
import org.koin.test.KoinTest
import org.koin.test.inject
-import kotlin.test.BeforeTest
-import kotlin.test.assertFalse
-import kotlin.test.assertTrue
/**
* Created by Allan Wang on 21/12/2018.
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt
index 8705fbc..ceb551b 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/SampleTestApp.kt
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2020 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.app.Application
@@ -5,7 +20,6 @@ import android.content.Context
import androidx.test.runner.AndroidJUnitRunner
import ca.allanwang.kau.kpref.KPrefFactory
import ca.allanwang.kau.kpref.KPrefFactoryInMemory
-import ca.allanwang.kau.logging.KL
import org.junit.rules.TestRule
import org.junit.runner.Description
import org.junit.runners.model.Statement
@@ -57,4 +71,4 @@ class SampleTestApp : Application() {
KPrefFactoryInMemory
}
}
-} \ No newline at end of file
+}
diff --git a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/utils/EspressoUtils.kt b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/utils/EspressoUtils.kt
index 2a6f0a9..09ad00a 100644
--- a/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/utils/EspressoUtils.kt
+++ b/sample/src/androidTest/kotlin/ca/allanwang/kau/sample/utils/EspressoUtils.kt
@@ -15,8 +15,6 @@
*/
package ca.allanwang.kau.sample.utils
-import android.content.Context
-import androidx.test.platform.app.InstrumentationRegistry
import org.hamcrest.BaseMatcher
import org.hamcrest.Description
import org.hamcrest.Matcher
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt
index ffe769a..59f1c92 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt
@@ -23,15 +23,17 @@ import com.mikepenz.fastadapter.GenericItem
/**
* Created by Allan Wang on 2017-06-27.
*/
-class AboutActivity : AboutActivityBase(R.string::class.java, {
- cutoutDrawableRes = R.drawable.kau
- textColor = 0xde000000.toInt()
- backgroundColor = 0xfffafafa.toInt()
- accentColor = 0xff00838F.toInt()
- cutoutForeground = 0xff18FFFF.toInt()
- faqXmlRes = R.xml.kau_faq
- faqParseNewLine = false
-}) {
+class AboutActivity : AboutActivityBase(R.string::class.java) {
+
+ override fun Configs.buildConfigs() {
+ cutoutDrawableRes = R.drawable.kau
+ textColor = 0xde000000.toInt()
+ backgroundColor = 0xfffafafa.toInt()
+ accentColor = 0xff00838F.toInt()
+ cutoutForeground = 0xff18FFFF.toInt()
+ faqXmlRes = R.xml.kau_faq
+ faqParseNewLine = false
+ }
override fun postInflateMainPage(adapter: FastItemThemedAdapter<GenericItem>) {
adapter.add(CardIItem {
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index 55adabc..a40e70e 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -7,10 +7,10 @@
-->
<version title="v5.3.0" />
+ <item text=":about: Moved config builder inside activity" />
<item text=":color: Allow option to disable selected ring" />
<item text=":core: Breaking KPref changes; see migration" />
<item text="" />
- <item text="" />
<version title="v5.2.0" />
<item text=":about: Migrate about libraries to v7.x.x" />