aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-09 00:46:24 -0700
committerAllan Wang <me@allanwang.ca>2017-07-09 00:46:24 -0700
commit2bf5e9efde28cce8186b2cdf75d8fafb6c9125ad (patch)
tree6a80d38c0bd949685ee014b81e07c45b60becec7 /kpref-activity
parent40d6788abfa46ac99f46b32fd4aeb78e67c3b6f6 (diff)
downloadkau-2bf5e9efde28cce8186b2cdf75d8fafb6c9125ad.tar.gz
kau-2bf5e9efde28cce8186b2cdf75d8fafb6c9125ad.tar.bz2
kau-2bf5e9efde28cce8186b2cdf75d8fafb6c9125ad.zip
Clean up and optimize
Diffstat (limited to 'kpref-activity')
-rw-r--r--kpref-activity/build.gradle10
-rw-r--r--kpref-activity/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java26
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt2
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt2
-rw-r--r--kpref-activity/src/main/res/values/strings.xml3
-rw-r--r--kpref-activity/src/test/java/ca/allanwang/kau/ExampleUnitTest.java17
10 files changed, 7 insertions, 61 deletions
diff --git a/kpref-activity/build.gradle b/kpref-activity/build.gradle
index dac2b69..80be774 100644
--- a/kpref-activity/build.gradle
+++ b/kpref-activity/build.gradle
@@ -1,23 +1,15 @@
-apply from: '../android.gradle'
+apply from: '../android-lib.gradle'
android {
resourcePrefix "kau_"
}
dependencies {
- compile fileTree(dir: 'libs', include: ['*.jar'])
- androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
- exclude group: 'com.android.support', module: 'support-annotations'
- })
- testCompile 'junit:junit:4.12'
compile project(':core-ui')
compile project(':adapter')
compile project(':colorpicker')
- compile "org.jetbrains.kotlin:kotlin-stdlib:${KOTLIN}"
- testCompile "org.jetbrains.kotlin:kotlin-test-junit:${KOTLIN}"
-
}
apply from: '../artifacts.gradle'
diff --git a/kpref-activity/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java b/kpref-activity/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
deleted file mode 100644
index 7b079b2..0000000
--- a/kpref-activity/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
+++ /dev/null
@@ -1,26 +0,0 @@
-package ca.allanwang.kau;
-
-import android.content.Context;
-import android.support.test.InstrumentationRegistry;
-import android.support.test.runner.AndroidJUnit4;
-
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
-import static org.junit.Assert.*;
-
-/**
- * Instrumentation test, which will execute on an Android device.
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-@RunWith(AndroidJUnit4.class)
-public class ExampleInstrumentedTest {
- @Test
- public void useAppContext() throws Exception {
- // Context of the app under test.
- Context appContext = InstrumentationRegistry.getTargetContext();
-
- assertEquals("ca.allanwang.kau.test", appContext.getPackageName());
- }
-}
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt
index ac54cb0..e21d483 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt
@@ -2,8 +2,8 @@ package ca.allanwang.kau.kpref.activity.items
import android.support.annotation.CallSuper
import android.view.View
-import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.activity.GlobalOptions
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.utils.resolveDrawable
/**
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
index 61d5ea3..908c139 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
@@ -11,11 +11,11 @@ import android.view.ViewGroup
import android.widget.ImageView
import android.widget.LinearLayout
import android.widget.TextView
-import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
import ca.allanwang.kau.kpref.activity.GlobalOptions
import ca.allanwang.kau.kpref.activity.KPrefMarker
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.utils.*
import com.mikepenz.fastadapter.items.AbstractItem
import com.mikepenz.iconics.typeface.IIcon
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt
index c0afe13..b83df69 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt
@@ -1,8 +1,8 @@
package ca.allanwang.kau.kpref.activity.items
import android.view.View
-import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.activity.GlobalOptions
+import ca.allanwang.kau.kpref.activity.R
/**
* Created by Allan Wang on 2017-06-14.
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
index 6ca7fcd..f1429e7 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
@@ -3,9 +3,9 @@ package ca.allanwang.kau.kpref.activity.items
import android.view.View
import android.widget.SeekBar
import android.widget.TextView
-import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.KPrefException
import ca.allanwang.kau.kpref.activity.GlobalOptions
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.utils.tint
/**
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt
index 9081ec8..9313a3f 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt
@@ -1,9 +1,9 @@
package ca.allanwang.kau.kpref.activity.items
import android.view.View
-import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.activity.GlobalOptions
import ca.allanwang.kau.kpref.activity.KPrefAdapterBuilder
+import ca.allanwang.kau.kpref.activity.R
/**
* Created by Allan Wang on 2017-06-14.
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
index a1603ce..277a842 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
@@ -2,8 +2,8 @@ package ca.allanwang.kau.kpref.activity.items
import android.view.View
import android.widget.TextView
-import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.kpref.activity.GlobalOptions
+import ca.allanwang.kau.kpref.activity.R
import ca.allanwang.kau.utils.toast
/**
diff --git a/kpref-activity/src/main/res/values/strings.xml b/kpref-activity/src/main/res/values/strings.xml
deleted file mode 100644
index 0402364..0000000
--- a/kpref-activity/src/main/res/values/strings.xml
+++ /dev/null
@@ -1,3 +0,0 @@
-<resources>
- <string name="app_name">kpref-activity</string>
-</resources>
diff --git a/kpref-activity/src/test/java/ca/allanwang/kau/ExampleUnitTest.java b/kpref-activity/src/test/java/ca/allanwang/kau/ExampleUnitTest.java
deleted file mode 100644
index a29b447..0000000
--- a/kpref-activity/src/test/java/ca/allanwang/kau/ExampleUnitTest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package ca.allanwang.kau;
-
-import org.junit.Test;
-
-import static org.junit.Assert.*;
-
-/**
- * Example local unit test, which will execute on the development machine (host).
- *
- * @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
- */
-public class ExampleUnitTest {
- @Test
- public void addition_isCorrect() throws Exception {
- assertEquals(4, 2 + 2);
- }
-} \ No newline at end of file