aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-08 20:25:23 -0700
committerAllan Wang <me@allanwang.ca>2017-07-08 20:25:23 -0700
commit81996038462de1be86643e95d262933c4b96c551 (patch)
tree39423b28217251e7051f86e9e4f80c47bcba20b2
parent880d433e475e5be4e5d91afac145b490f9a959b7 (diff)
downloadkau-81996038462de1be86643e95d262933c4b96c551.tar.gz
kau-81996038462de1be86643e95d262933c4b96c551.tar.bz2
kau-81996038462de1be86643e95d262933c4b96c551.zip
Move components to separate modules
-rw-r--r--.idea/gradle.xml6
-rw-r--r--.idea/modules.xml6
-rw-r--r--about/.gitignore1
-rw-r--r--about/build.gradle63
-rw-r--r--about/progress-proguard.txt1
-rw-r--r--about/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java26
-rw-r--r--about/src/main/AndroidManifest.xml1
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt)4
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/iitems/CutoutIItem.kt)4
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/iitems/LibraryIItem.kt)3
-rw-r--r--about/src/main/res/layout/kau_about_section_libraries.xml (renamed from core/src/main/res/layout/kau_about_section_libraries.xml)2
-rw-r--r--about/src/main/res/layout/kau_about_section_main.xml (renamed from core/src/main/res/layout/kau_about_section_main.xml)0
-rw-r--r--about/src/main/res/layout/kau_activity_about.xml (renamed from core/src/main/res/layout/kau_activity_about.xml)8
-rw-r--r--about/src/main/res/layout/kau_iitem_cutout.xml (renamed from core/src/main/res/layout/kau_iitem_cutout.xml)2
-rw-r--r--about/src/main/res/layout/kau_iitem_library.xml (renamed from core/src/main/res/layout/kau_iitem_library.xml)0
-rw-r--r--about/src/main/res/transition/kau_about_return_downward.xml (renamed from core/src/main/res/transition/kau_about_return_downward.xml)0
-rw-r--r--about/src/main/res/transition/kau_about_return_upwards.xml (renamed from core/src/main/res/transition/kau_about_return_upwards.xml)0
-rw-r--r--about/src/main/res/values/styles.xml9
-rw-r--r--about/src/test/java/ca/allanwang/kau/ExampleUnitTest.java17
-rw-r--r--adapter/.gitignore1
-rw-r--r--adapter/build.gradle61
-rw-r--r--adapter/progress-proguard.txt1
-rw-r--r--adapter/src/androidTest/java/ca/allanwang/kau/adapter/ExampleInstrumentedTest.java26
-rw-r--r--adapter/src/main/AndroidManifest.xml1
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/adapters/ChainedAdapters.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/adapters/ChainedAdapters.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt)2
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/adapters/SectionAdapter.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/adapters/SectionAdapter.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/BaseDelayAnimator.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/animators/BaseDelayAnimator.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/BaseItemAnimator.java (renamed from core/src/main/kotlin/ca/allanwang/kau/animators/BaseItemAnimator.java)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/BaseSlideAlphaAnimator.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/animators/BaseSlideAlphaAnimator.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/DefaultAnimator.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/animators/DefaultAnimator.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/animators/SlideUpExitRightAnimator.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/animators/SlideUpExitRightAnimator.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt)0
-rw-r--r--adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt)0
-rw-r--r--adapter/src/main/res/layout/kau_iitem_card.xml (renamed from core/src/main/res/layout/kau_iitem_card.xml)0
-rw-r--r--adapter/src/main/res/layout/kau_iitem_header.xml (renamed from core/src/main/res/layout/kau_iitem_header.xml)0
-rw-r--r--adapter/src/main/res/values/dimens.xml3
-rw-r--r--adapter/src/test/java/ca/allanwang/kau/adapter/ExampleUnitTest.java17
-rw-r--r--colorpicker/.gitignore1
-rw-r--r--colorpicker/build.gradle59
-rw-r--r--colorpicker/progress-proguard.txt1
-rw-r--r--colorpicker/src/androidTest/java/ca/allanwang/kau/colorpicker/ExampleInstrumentedTest.java26
-rw-r--r--colorpicker/src/main/AndroidManifest.xml1
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/dialogs/color/CircleView.kt)2
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/dialogs/color/ColorPalette.kt)2
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/dialogs/color/ColorPickerDialog.kt)2
-rw-r--r--colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/dialogs/color/ColorPickerView.kt)5
-rw-r--r--colorpicker/src/main/res/values/dimens.xml3
-rw-r--r--colorpicker/src/test/java/ca/allanwang/kau/colorpicker/ExampleUnitTest.java17
-rw-r--r--core-ui/.gitignore1
-rw-r--r--core-ui/build.gradle63
-rw-r--r--core-ui/progress-proguard.txt1
-rw-r--r--core-ui/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java26
-rw-r--r--core-ui/src/main/AndroidManifest.xml1
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/BoundedCardView.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/views/BoundedCardView.kt)5
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/CutoutView.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/views/CutoutView.kt)2
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/widgets/ElasticDragDismissFrameLayout.kt)2
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/InkPageIndicator.java (renamed from core/src/main/kotlin/ca/allanwang/kau/widgets/InkPageIndicator.java)2
-rw-r--r--core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/widgets/TextSlider.kt)2
-rw-r--r--core-ui/src/main/res/layout/kau_recycler_detached_background.xml (renamed from core/src/main/res/layout/kau_recycler_detached_background.xml)0
-rw-r--r--core-ui/src/main/res/layout/kau_recycler_textslider.xml (renamed from core/src/main/res/layout/kau_recycler_textslider.xml)0
-rw-r--r--core-ui/src/main/res/values/attr.xml (renamed from core/src/main/res/values/attr.xml)0
-rw-r--r--core-ui/src/main/res/values/colors.xml (renamed from core/src/main/res/values/colors.xml)0
-rw-r--r--core-ui/src/main/res/values/styles.xml (renamed from core/src/main/res/values/styles.xml)5
-rw-r--r--core-ui/src/test/java/ca/allanwang/kau/ExampleUnitTest.java17
-rw-r--r--core/build.gradle21
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt2
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/ui/SimpleRippleDrawable.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/views/SimpleRippleDrawable.kt)2
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/ui/views/RippleCanvas.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/views/RippleCanvas.kt)2
-rw-r--r--core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt2
-rw-r--r--core/src/main/res/values/dimens.xml1
-rw-r--r--core/src/main/res/values/strings_about.xml2
-rw-r--r--imagepicker/build.gradle4
-rw-r--r--imagepicker/src/main/kotlin/ca/allanwang/kau/imagepicker/ImagePickerActivityBase.kt2
-rw-r--r--imagepicker/src/main/res/layout/kau_activity_image_picker.xml4
-rw-r--r--kpref-activity/.gitignore1
-rw-r--r--kpref-activity/build.gradle61
-rw-r--r--kpref-activity/progress-proguard.txt1
-rw-r--r--kpref-activity/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java26
-rw-r--r--kpref-activity/src/main/AndroidManifest.xml1
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefActivity.kt)8
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefBinder.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt)4
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefCheckbox.kt)3
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefColorPicker.kt)14
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefHeader.kt)3
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefItemBase.kt)5
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefItemCore.kt)6
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefPlainText.kt)4
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefSeekbar.kt)5
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefSubItems.kt)6
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefText.kt)4
-rw-r--r--kpref-activity/src/main/res/layout/kau_pref_activity.xml (renamed from core/src/main/res/layout/kau_activity_kpref.xml)4
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference.xml (renamed from core/src/main/res/layout/kau_preference.xml)14
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_checkbox.xml (renamed from core/src/main/res/layout/kau_preference_checkbox.xml)0
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_color_preview.xml (renamed from core/src/main/res/layout/kau_preference_color_preview.xml)2
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_header.xml (renamed from core/src/main/res/layout/kau_preference_header.xml)0
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_seekbar.xml (renamed from core/src/main/res/layout/kau_preference_seekbar.xml)0
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_seekbar_text.xml (renamed from core/src/main/res/layout/kau_preference_seekbar_text.xml)0
-rw-r--r--kpref-activity/src/main/res/layout/kau_preference_text.xml (renamed from core/src/main/res/layout/kau_preference_text.xml)0
-rw-r--r--kpref-activity/src/main/res/values/ids.xml19
-rw-r--r--kpref-activity/src/main/res/values/strings.xml3
-rw-r--r--kpref-activity/src/test/java/ca/allanwang/kau/ExampleUnitTest.java17
-rw-r--r--sample/build.gradle8
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt2
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt7
-rw-r--r--searchbar/.gitignore1
-rw-r--r--searchbar/build.gradle60
-rw-r--r--searchbar/progress-proguard.txt1
-rw-r--r--searchbar/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java26
-rw-r--r--searchbar/src/main/AndroidManifest.xml1
-rw-r--r--searchbar/src/main/kotlin/ca/allanwang/kau/searchview/SearchItem.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/searchview/SearchItem.kt)8
-rw-r--r--searchbar/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt (renamed from core/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt)20
-rw-r--r--searchbar/src/main/res/layout/kau_search_iitem.xml (renamed from core/src/main/res/layout/kau_search_iitem.xml)16
-rw-r--r--searchbar/src/main/res/layout/kau_search_view.xml (renamed from core/src/main/res/layout/kau_search_view.xml)22
-rw-r--r--searchbar/src/main/res/values/dimens.xml (renamed from core/src/main/res/values/dimens_search.xml)0
-rw-r--r--searchbar/src/main/res/values/ids.xml16
-rw-r--r--searchbar/src/test/java/ca/allanwang/kau/ExampleUnitTest.java17
-rw-r--r--settings.gradle11
121 files changed, 833 insertions, 147 deletions
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 9291120..4200089 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -8,9 +8,15 @@
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
+ <option value="$PROJECT_DIR$/about" />
+ <option value="$PROJECT_DIR$/adapter" />
+ <option value="$PROJECT_DIR$/colorpicker" />
<option value="$PROJECT_DIR$/core" />
+ <option value="$PROJECT_DIR$/core-ui" />
<option value="$PROJECT_DIR$/imagepicker" />
+ <option value="$PROJECT_DIR$/kpref-activity" />
<option value="$PROJECT_DIR$/sample" />
+ <option value="$PROJECT_DIR$/searchbar" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
diff --git a/.idea/modules.xml b/.idea/modules.xml
index 5e24f43..c4694c5 100644
--- a/.idea/modules.xml
+++ b/.idea/modules.xml
@@ -3,9 +3,15 @@
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/KAU.iml" filepath="$PROJECT_DIR$/KAU.iml" />
+ <module fileurl="file://$PROJECT_DIR$/about/about.iml" filepath="$PROJECT_DIR$/about/about.iml" />
+ <module fileurl="file://$PROJECT_DIR$/adapter/adapter.iml" filepath="$PROJECT_DIR$/adapter/adapter.iml" />
+ <module fileurl="file://$PROJECT_DIR$/colorpicker/colorpicker.iml" filepath="$PROJECT_DIR$/colorpicker/colorpicker.iml" />
<module fileurl="file://$PROJECT_DIR$/core/core.iml" filepath="$PROJECT_DIR$/core/core.iml" />
+ <module fileurl="file://$PROJECT_DIR$/core-ui/core-ui.iml" filepath="$PROJECT_DIR$/core-ui/core-ui.iml" />
<module fileurl="file://$PROJECT_DIR$/imagepicker/imagepicker.iml" filepath="$PROJECT_DIR$/imagepicker/imagepicker.iml" />
+ <module fileurl="file://$PROJECT_DIR$/kpref-activity/kpref-activity.iml" filepath="$PROJECT_DIR$/kpref-activity/kpref-activity.iml" />
<module fileurl="file://$PROJECT_DIR$/sample/sample.iml" filepath="$PROJECT_DIR$/sample/sample.iml" />
+ <module fileurl="file://$PROJECT_DIR$/searchbar/searchbar.iml" filepath="$PROJECT_DIR$/searchbar/searchbar.iml" />
</modules>
</component>
</project> \ No newline at end of file
diff --git a/about/.gitignore b/about/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/about/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/about/build.gradle b/about/build.gradle
new file mode 100644
index 0000000..5598429
--- /dev/null
+++ b/about/build.gradle
@@ -0,0 +1,63 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.3.4'
+}
+
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+apply plugin: 'com.github.dcendents.android-maven'
+
+group = project.APP_GROUP
+
+android {
+ compileSdkVersion Integer.parseInt(project.TARGET_SDK)
+ buildToolsVersion project.BUILD_TOOLS
+
+ androidGitVersion {
+ codeFormat = 'MMNNPPBB'
+ prefix 'v'
+ }
+
+ defaultConfig {
+ minSdkVersion Integer.parseInt(project.MIN_SDK)
+ targetSdkVersion Integer.parseInt(project.TARGET_SDK)
+ versionCode androidGitVersion.code()
+ versionName androidGitVersion.name()
+ consumerProguardFiles 'progress-proguard.txt'
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ lintOptions {
+ abortOnError false
+ checkReleaseBuilds false
+ }
+ resourcePrefix "kau_"
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ test.java.srcDirs += 'src/test/kotlin'
+ }
+}
+
+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 "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+ testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
+
+ compile("com.mikepenz:aboutlibraries:${ABOUT_LIBRARIES}@aar") {
+ transitive = true
+ }
+}
+
+apply from: '../artifacts.gradle'
diff --git a/about/progress-proguard.txt b/about/progress-proguard.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/about/progress-proguard.txt
@@ -0,0 +1 @@
+
diff --git a/about/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java b/about/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..7b079b2
--- /dev/null
+++ b/about/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+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/about/src/main/AndroidManifest.xml b/about/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..9c9b9e6
--- /dev/null
+++ b/about/src/main/AndroidManifest.xml
@@ -0,0 +1 @@
+<manifest package="ca.allanwang.kau.about" />
diff --git a/core/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
index 77dbef1..4751a09 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
@@ -19,8 +19,8 @@ import ca.allanwang.kau.iitems.CutoutIItem
import ca.allanwang.kau.iitems.HeaderIItem
import ca.allanwang.kau.iitems.LibraryIItem
import ca.allanwang.kau.utils.*
-import ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout
-import ca.allanwang.kau.widgets.InkPageIndicator
+import ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout
+import ca.allanwang.kau.ui.widgets.InkPageIndicator
import com.mikepenz.aboutlibraries.Libs
import com.mikepenz.aboutlibraries.entity.Library
import com.mikepenz.fastadapter.IItem
diff --git a/core/src/main/kotlin/ca/allanwang/kau/iitems/CutoutIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
index 627e1df..34e8641 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/iitems/CutoutIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/CutoutIItem.kt
@@ -1,12 +1,12 @@
-package ca.allanwang.kau.iitems
+package ca.allanwang.kau.about
import android.support.v7.widget.RecyclerView
import android.view.View
import ca.allanwang.kau.R
import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
+import ca.allanwang.kau.ui.views.CutoutView
import ca.allanwang.kau.utils.bindView
-import ca.allanwang.kau.views.CutoutView
import com.mikepenz.fastadapter.items.AbstractItem
/**
diff --git a/core/src/main/kotlin/ca/allanwang/kau/iitems/LibraryIItem.kt b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt
index aabd9e3..1b832a2 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/iitems/LibraryIItem.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/LibraryIItem.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.iitems
+package ca.allanwang.kau.about
import android.os.Build
import android.support.v7.widget.CardView
@@ -13,7 +13,6 @@ import ca.allanwang.kau.utils.bindView
import ca.allanwang.kau.utils.gone
import ca.allanwang.kau.utils.startLink
import ca.allanwang.kau.utils.visible
-import ca.allanwang.kau.views.createSimpleRippleDrawable
import com.mikepenz.aboutlibraries.entity.Library
import com.mikepenz.fastadapter.FastAdapter
import com.mikepenz.fastadapter.IItem
diff --git a/core/src/main/res/layout/kau_about_section_libraries.xml b/about/src/main/res/layout/kau_about_section_libraries.xml
index 45c271b..c14225e 100644
--- a/core/src/main/res/layout/kau_about_section_libraries.xml
+++ b/about/src/main/res/layout/kau_about_section_libraries.xml
@@ -9,7 +9,7 @@
android:id="@+id/about_library_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:layout_margin="@dimen/activity_horizontal_margin"
+ android:layout_margin="@dimen/kau_activity_horizontal_margin"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toStartOf="parent"
diff --git a/core/src/main/res/layout/kau_about_section_main.xml b/about/src/main/res/layout/kau_about_section_main.xml
index 40d8dfb..40d8dfb 100644
--- a/core/src/main/res/layout/kau_about_section_main.xml
+++ b/about/src/main/res/layout/kau_about_section_main.xml
diff --git a/core/src/main/res/layout/kau_activity_about.xml b/about/src/main/res/layout/kau_activity_about.xml
index 604b2a1..3d1f9ab 100644
--- a/core/src/main/res/layout/kau_activity_about.xml
+++ b/about/src/main/res/layout/kau_activity_about.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/about_draggable_frame"
@@ -7,14 +7,14 @@
android:layout_height="match_parent"
app:dragDismissDistance="@dimen/kau_drag_dismiss_distance"
app:dragDismissScale="0.95"
- tools:context=".about.AboutActivityBase">
+ tools:context=".ui.about.AboutActivityBase">
<android.support.v4.view.ViewPager
android:id="@+id/about_pager"
android:layout_width="match_parent"
android:layout_height="match_parent" />
- <ca.allanwang.kau.widgets.InkPageIndicator
+ <ca.allanwang.kau.ui.widgets.InkPageIndicator
android:id="@+id/about_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -23,4 +23,4 @@
app:currentPageIndicatorColor="@color/kau_about_page_indicator_dark_selected"
app:pageIndicatorColor="@color/kau_about_page_indicator_dark" />
-</ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout>
+</ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout>
diff --git a/core/src/main/res/layout/kau_iitem_cutout.xml b/about/src/main/res/layout/kau_iitem_cutout.xml
index a4b17ac..b3a841e 100644
--- a/core/src/main/res/layout/kau_iitem_cutout.xml
+++ b/about/src/main/res/layout/kau_iitem_cutout.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<ca.allanwang.kau.views.CutoutView xmlns:android="http://schemas.android.com/apk/res/android"
+<ca.allanwang.kau.ui.views.CutoutView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/kau_cutout"
android:layout_width="match_parent"
diff --git a/core/src/main/res/layout/kau_iitem_library.xml b/about/src/main/res/layout/kau_iitem_library.xml
index 1c3de5c..1c3de5c 100644
--- a/core/src/main/res/layout/kau_iitem_library.xml
+++ b/about/src/main/res/layout/kau_iitem_library.xml
diff --git a/core/src/main/res/transition/kau_about_return_downward.xml b/about/src/main/res/transition/kau_about_return_downward.xml
index b040b1b..b040b1b 100644
--- a/core/src/main/res/transition/kau_about_return_downward.xml
+++ b/about/src/main/res/transition/kau_about_return_downward.xml
diff --git a/core/src/main/res/transition/kau_about_return_upwards.xml b/about/src/main/res/transition/kau_about_return_upwards.xml
index 64b3f5e..64b3f5e 100644
--- a/core/src/main/res/transition/kau_about_return_upwards.xml
+++ b/about/src/main/res/transition/kau_about_return_upwards.xml
diff --git a/about/src/main/res/values/styles.xml b/about/src/main/res/values/styles.xml
new file mode 100644
index 0000000..59b2470
--- /dev/null
+++ b/about/src/main/res/values/styles.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <style name="Kau.Translucent.About">
+ <item name="android:windowEnterTransition">@transition/kau_enter_slide_top</item>
+ <item name="android:windowReturnTransition">@transition/kau_about_return_upwards</item>
+ </style>
+
+</resources> \ No newline at end of file
diff --git a/about/src/test/java/ca/allanwang/kau/ExampleUnitTest.java b/about/src/test/java/ca/allanwang/kau/ExampleUnitTest.java
new file mode 100644
index 0000000..a29b447
--- /dev/null
+++ b/about/src/test/java/ca/allanwang/kau/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+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
diff --git a/adapter/.gitignore b/adapter/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/adapter/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/adapter/build.gradle b/adapter/build.gradle
new file mode 100644
index 0000000..82c89b0
--- /dev/null
+++ b/adapter/build.gradle
@@ -0,0 +1,61 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.3.4'
+}
+
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+apply plugin: 'com.github.dcendents.android-maven'
+
+group = project.APP_GROUP
+
+android {
+ compileSdkVersion Integer.parseInt(project.TARGET_SDK)
+ buildToolsVersion project.BUILD_TOOLS
+
+ androidGitVersion {
+ codeFormat = 'MMNNPPBB'
+ prefix 'v'
+ }
+
+ defaultConfig {
+ minSdkVersion Integer.parseInt(project.MIN_SDK)
+ targetSdkVersion Integer.parseInt(project.TARGET_SDK)
+ versionCode androidGitVersion.code()
+ versionName androidGitVersion.name()
+ consumerProguardFiles 'progress-proguard.txt'
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ lintOptions {
+ abortOnError false
+ checkReleaseBuilds false
+ }
+ resourcePrefix "kau_"
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ test.java.srcDirs += 'src/test/kotlin'
+ }
+}
+
+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')
+
+ compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+ testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
+
+ compile "com.mikepenz:fastadapter:${FAST_ADAPTER}@aar"
+ compile "com.mikepenz:fastadapter-commons:${FAST_ADAPTER_COMMONS}@aar"
+}
+
+apply from: '../artifacts.gradle'
diff --git a/adapter/progress-proguard.txt b/adapter/progress-proguard.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/adapter/progress-proguard.txt
@@ -0,0 +1 @@
+
diff --git a/adapter/src/androidTest/java/ca/allanwang/kau/adapter/ExampleInstrumentedTest.java b/adapter/src/androidTest/java/ca/allanwang/kau/adapter/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..3e64d38
--- /dev/null
+++ b/adapter/src/androidTest/java/ca/allanwang/kau/adapter/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package ca.allanwang.kau.adapter;
+
+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.adapter.test", appContext.getPackageName());
+ }
+}
diff --git a/adapter/src/main/AndroidManifest.xml b/adapter/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..5d9b790
--- /dev/null
+++ b/adapter/src/main/AndroidManifest.xml
@@ -0,0 +1 @@
+<manifest package="ca.allanwang.kau.adapter" />
diff --git a/core/src/main/kotlin/ca/allanwang/kau/adapters/ChainedAdapters.kt b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/ChainedAdapters.kt
index e1c5c18..e1c5c18 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/adapters/ChainedAdapters.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/ChainedAdapters.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt
index 66fec4b..0de1dca 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/FastItemThemedAdapter.kt
@@ -5,7 +5,7 @@ import android.view.View
import android.widget.ImageView
import android.widget.TextView
import ca.allanwang.kau.utils.adjustAlpha
-import ca.allanwang.kau.views.createSimpleRippleDrawable
+import ca.allanwang.kau.ui.createSimpleRippleDrawable
import com.mikepenz.fastadapter.IExpandable
import com.mikepenz.fastadapter.IItem
import com.mikepenz.fastadapter.ISubItem
diff --git a/core/src/main/kotlin/ca/allanwang/kau/adapters/SectionAdapter.kt b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/SectionAdapter.kt
index cf7205a..cf7205a 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/adapters/SectionAdapter.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/adapters/SectionAdapter.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/animators/BaseDelayAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/BaseDelayAnimator.kt
index c649376..c649376 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/animators/BaseDelayAnimator.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/BaseDelayAnimator.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/animators/BaseItemAnimator.java b/adapter/src/main/kotlin/ca/allanwang/kau/animators/BaseItemAnimator.java
index 69c2cf3..69c2cf3 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/animators/BaseItemAnimator.java
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/BaseItemAnimator.java
diff --git a/core/src/main/kotlin/ca/allanwang/kau/animators/BaseSlideAlphaAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/BaseSlideAlphaAnimator.kt
index a963358..a963358 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/animators/BaseSlideAlphaAnimator.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/BaseSlideAlphaAnimator.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/animators/DefaultAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/DefaultAnimator.kt
index 9aeafde..9aeafde 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/animators/DefaultAnimator.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/DefaultAnimator.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt
index e968cda..e968cda 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/FadeScaleAnimator.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt
index 244287b..244287b 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/NoAnimator.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/animators/SlideUpExitRightAnimator.kt b/adapter/src/main/kotlin/ca/allanwang/kau/animators/SlideUpExitRightAnimator.kt
index 8670493..8670493 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/animators/SlideUpExitRightAnimator.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/animators/SlideUpExitRightAnimator.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
index 3380ade..3380ade 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/CardIItem.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
index e994781..e994781 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/HeaderIItem.kt
diff --git a/core/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt
index d8567c4..d8567c4 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt
+++ b/adapter/src/main/kotlin/ca/allanwang/kau/iitems/KauIItem.kt
diff --git a/core/src/main/res/layout/kau_iitem_card.xml b/adapter/src/main/res/layout/kau_iitem_card.xml
index 621da2e..621da2e 100644
--- a/core/src/main/res/layout/kau_iitem_card.xml
+++ b/adapter/src/main/res/layout/kau_iitem_card.xml
diff --git a/core/src/main/res/layout/kau_iitem_header.xml b/adapter/src/main/res/layout/kau_iitem_header.xml
index fa5a595..fa5a595 100644
--- a/core/src/main/res/layout/kau_iitem_header.xml
+++ b/adapter/src/main/res/layout/kau_iitem_header.xml
diff --git a/adapter/src/main/res/values/dimens.xml b/adapter/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..193940e
--- /dev/null
+++ b/adapter/src/main/res/values/dimens.xml
@@ -0,0 +1,3 @@
+<resources>
+ <dimen name="kau_color_circle_size">56dp</dimen>
+</resources>
diff --git a/adapter/src/test/java/ca/allanwang/kau/adapter/ExampleUnitTest.java b/adapter/src/test/java/ca/allanwang/kau/adapter/ExampleUnitTest.java
new file mode 100644
index 0000000..5684bab
--- /dev/null
+++ b/adapter/src/test/java/ca/allanwang/kau/adapter/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package ca.allanwang.kau.adapter;
+
+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
diff --git a/colorpicker/.gitignore b/colorpicker/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/colorpicker/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/colorpicker/build.gradle b/colorpicker/build.gradle
new file mode 100644
index 0000000..1833119
--- /dev/null
+++ b/colorpicker/build.gradle
@@ -0,0 +1,59 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.3.4'
+}
+
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+apply plugin: 'com.github.dcendents.android-maven'
+
+group = project.APP_GROUP
+
+android {
+ compileSdkVersion Integer.parseInt(project.TARGET_SDK)
+ buildToolsVersion project.BUILD_TOOLS
+
+ androidGitVersion {
+ codeFormat = 'MMNNPPBB'
+ prefix 'v'
+ }
+
+ defaultConfig {
+ minSdkVersion Integer.parseInt(project.MIN_SDK)
+ targetSdkVersion Integer.parseInt(project.TARGET_SDK)
+ versionCode androidGitVersion.code()
+ versionName androidGitVersion.name()
+ consumerProguardFiles 'progress-proguard.txt'
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ lintOptions {
+ abortOnError false
+ checkReleaseBuilds false
+ }
+ resourcePrefix "kau_color"
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ test.java.srcDirs += 'src/test/kotlin'
+ }
+}
+
+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')
+
+ compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+ testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
+
+ compile "com.afollestad.material-dialogs:commons:${MATERIAL_DIALOG}"
+}
+
+apply from: '../artifacts.gradle'
diff --git a/colorpicker/progress-proguard.txt b/colorpicker/progress-proguard.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/colorpicker/progress-proguard.txt
@@ -0,0 +1 @@
+
diff --git a/colorpicker/src/androidTest/java/ca/allanwang/kau/colorpicker/ExampleInstrumentedTest.java b/colorpicker/src/androidTest/java/ca/allanwang/kau/colorpicker/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..2b22d0f
--- /dev/null
+++ b/colorpicker/src/androidTest/java/ca/allanwang/kau/colorpicker/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+package ca.allanwang.kau.colorpicker;
+
+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.colorpicker.test", appContext.getPackageName());
+ }
+}
diff --git a/colorpicker/src/main/AndroidManifest.xml b/colorpicker/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..5fa1ce3
--- /dev/null
+++ b/colorpicker/src/main/AndroidManifest.xml
@@ -0,0 +1 @@
+<manifest package="ca.allanwang.kau.colorpicker" />
diff --git a/core/src/main/kotlin/ca/allanwang/kau/dialogs/color/CircleView.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt
index 3430b42..04b26cb 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/dialogs/color/CircleView.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/CircleView.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.dialogs.color
+package ca.allanwang.kau.colorpicker
import android.animation.Animator
import android.animation.AnimatorListenerAdapter
diff --git a/core/src/main/kotlin/ca/allanwang/kau/dialogs/color/ColorPalette.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt
index 22bd0d4..b08767c 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/dialogs/color/ColorPalette.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPalette.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.dialogs.color
+package ca.allanwang.kau.colorpicker
import android.graphics.Color
diff --git a/core/src/main/kotlin/ca/allanwang/kau/dialogs/color/ColorPickerDialog.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt
index 7c57c26..6d23ade 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/dialogs/color/ColorPickerDialog.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerDialog.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.dialogs.color
+package ca.allanwang.kau.colorpicker
import android.content.Context
import android.graphics.Color
diff --git a/core/src/main/kotlin/ca/allanwang/kau/dialogs/color/ColorPickerView.kt b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
index 20e0259..d86518c 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/dialogs/color/ColorPickerView.kt
+++ b/colorpicker/src/main/kotlin/ca/allanwang/kau/colorpicker/ColorPickerView.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.dialogs.color
+package ca.allanwang.kau.colorpicker
import android.content.Context
import android.graphics.Color
@@ -12,6 +12,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.*
import ca.allanwang.kau.R
+import ca.allanwang.kau.colorpicker.CircleView
import ca.allanwang.kau.utils.*
import com.afollestad.materialdialogs.DialogAction
import com.afollestad.materialdialogs.MaterialDialog
@@ -29,7 +30,7 @@ internal class ColorPickerView @JvmOverloads constructor(
var selectedColor: Int = -1
var isInSub: Boolean = false
var isInCustom: Boolean = false
- var circleSize: Int = context.dimen(R.dimen.kau_color_circle_size).toInt()
+ var circleSize: Int = context.dimen(R.dimen.kau_cp_circle_size).toInt()
val backgroundColor = context.resolveColor(R.attr.md_background_color,
if (context.resolveColor(android.R.attr.textColorPrimary).isColorDark) Color.WHITE else 0xff424242.toInt())
val backgroundColorTint = backgroundColor.colorToForeground()
diff --git a/colorpicker/src/main/res/values/dimens.xml b/colorpicker/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..193940e
--- /dev/null
+++ b/colorpicker/src/main/res/values/dimens.xml
@@ -0,0 +1,3 @@
+<resources>
+ <dimen name="kau_color_circle_size">56dp</dimen>
+</resources>
diff --git a/colorpicker/src/test/java/ca/allanwang/kau/colorpicker/ExampleUnitTest.java b/colorpicker/src/test/java/ca/allanwang/kau/colorpicker/ExampleUnitTest.java
new file mode 100644
index 0000000..f974ff7
--- /dev/null
+++ b/colorpicker/src/test/java/ca/allanwang/kau/colorpicker/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+package ca.allanwang.kau.colorpicker;
+
+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
diff --git a/core-ui/.gitignore b/core-ui/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/core-ui/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/core-ui/build.gradle b/core-ui/build.gradle
new file mode 100644
index 0000000..996918f
--- /dev/null
+++ b/core-ui/build.gradle
@@ -0,0 +1,63 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.3.4'
+}
+
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+apply plugin: 'com.github.dcendents.android-maven'
+
+group = project.APP_GROUP
+
+android {
+ compileSdkVersion Integer.parseInt(project.TARGET_SDK)
+ buildToolsVersion project.BUILD_TOOLS
+
+ androidGitVersion {
+ codeFormat = 'MMNNPPBB'
+ prefix 'v'
+ }
+
+ defaultConfig {
+ minSdkVersion Integer.parseInt(project.MIN_SDK)
+ targetSdkVersion Integer.parseInt(project.TARGET_SDK)
+ versionCode androidGitVersion.code()
+ versionName androidGitVersion.name()
+ consumerProguardFiles 'progress-proguard.txt'
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ lintOptions {
+ abortOnError false
+ checkReleaseBuilds false
+ }
+ resourcePrefix "kau_"
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ test.java.srcDirs += 'src/test/kotlin'
+ }
+}
+
+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')
+ compile project(':adapter')
+
+ compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+ testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
+
+ compile "io.reactivex.rxjava2:rxkotlin:${RX_KOTLIN}"
+ compile "io.reactivex.rxjava2:rxandroid:${RX_ANDROID}"
+ compile "com.jakewharton.rxbinding2:rxbinding-kotlin:${RX_BINDING}"
+ compile "com.jakewharton.rxbinding2:rxbinding-appcompat-v7-kotlin:${RX_BINDING}"
+}
+
+apply from: '../artifacts.gradle'
diff --git a/core-ui/progress-proguard.txt b/core-ui/progress-proguard.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/core-ui/progress-proguard.txt
@@ -0,0 +1 @@
+
diff --git a/core-ui/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java b/core-ui/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..7b079b2
--- /dev/null
+++ b/core-ui/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+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/core-ui/src/main/AndroidManifest.xml b/core-ui/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..5f9bd77
--- /dev/null
+++ b/core-ui/src/main/AndroidManifest.xml
@@ -0,0 +1 @@
+<manifest package="ca.allanwang.kau.ui" />
diff --git a/core/src/main/kotlin/ca/allanwang/kau/views/BoundedCardView.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/BoundedCardView.kt
index 0cb65d0..554f71f 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/views/BoundedCardView.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/BoundedCardView.kt
@@ -1,12 +1,9 @@
-package ca.allanwang.kau.views
+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 ca.allanwang.kau.R
-import ca.allanwang.kau.utils.parentViewGroup
-import ca.allanwang.kau.utils.parentVisibleHeight
/**
diff --git a/core/src/main/kotlin/ca/allanwang/kau/views/CutoutView.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/CutoutView.kt
index 023bdb4..abd96ed 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/views/CutoutView.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/views/CutoutView.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package ca.allanwang.kau.views
+package ca.allanwang.kau.ui.views
import android.content.Context
import android.graphics.*
diff --git a/core/src/main/kotlin/ca/allanwang/kau/widgets/ElasticDragDismissFrameLayout.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
index c39a278..452fd56 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/widgets/ElasticDragDismissFrameLayout.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/ElasticDragDismissFrameLayout.kt
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package ca.allanwang.kau.widgets
+package ca.allanwang.kau.ui.widgets
import android.app.Activity
import android.content.Context
diff --git a/core/src/main/kotlin/ca/allanwang/kau/widgets/InkPageIndicator.java b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/InkPageIndicator.java
index 78e915d..cc90cb2 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/widgets/InkPageIndicator.java
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/InkPageIndicator.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package ca.allanwang.kau.widgets;
+package ca.allanwang.kau.ui.widgets;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
diff --git a/core/src/main/kotlin/ca/allanwang/kau/widgets/TextSlider.kt b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt
index 528dabc..f38a0b7 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/widgets/TextSlider.kt
+++ b/core-ui/src/main/kotlin/ca/allanwang/kau/ui/widgets/TextSlider.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.widgets
+package ca.allanwang.kau.ui.widgets
import android.content.Context
import android.graphics.Color
diff --git a/core/src/main/res/layout/kau_recycler_detached_background.xml b/core-ui/src/main/res/layout/kau_recycler_detached_background.xml
index 7295d66..7295d66 100644
--- a/core/src/main/res/layout/kau_recycler_detached_background.xml
+++ b/core-ui/src/main/res/layout/kau_recycler_detached_background.xml
diff --git a/core/src/main/res/layout/kau_recycler_textslider.xml b/core-ui/src/main/res/layout/kau_recycler_textslider.xml
index 1402cfb..1402cfb 100644
--- a/core/src/main/res/layout/kau_recycler_textslider.xml
+++ b/core-ui/src/main/res/layout/kau_recycler_textslider.xml
diff --git a/core/src/main/res/values/attr.xml b/core-ui/src/main/res/values/attr.xml
index 49be8d9..49be8d9 100644
--- a/core/src/main/res/values/attr.xml
+++ b/core-ui/src/main/res/values/attr.xml
diff --git a/core/src/main/res/values/colors.xml b/core-ui/src/main/res/values/colors.xml
index 6d51597..6d51597 100644
--- a/core/src/main/res/values/colors.xml
+++ b/core-ui/src/main/res/values/colors.xml
diff --git a/core/src/main/res/values/styles.xml b/core-ui/src/main/res/values/styles.xml
index 71d88a2..f9fd7d4 100644
--- a/core/src/main/res/values/styles.xml
+++ b/core-ui/src/main/res/values/styles.xml
@@ -17,9 +17,4 @@
<item name="android:windowAnimationStyle">@null</item>
</style>
- <style name="Kau.Translucent.About">
- <item name="android:windowEnterTransition">@transition/kau_enter_slide_top</item>
- <item name="android:windowReturnTransition">@transition/kau_about_return_upwards</item>
- </style>
-
</resources> \ No newline at end of file
diff --git a/core-ui/src/test/java/ca/allanwang/kau/ExampleUnitTest.java b/core-ui/src/test/java/ca/allanwang/kau/ExampleUnitTest.java
new file mode 100644
index 0000000..a29b447
--- /dev/null
+++ b/core-ui/src/test/java/ca/allanwang/kau/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+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
diff --git a/core/build.gradle b/core/build.gradle
index fae442e..3a3bb75 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -13,7 +13,7 @@ android {
buildToolsVersion project.BUILD_TOOLS
androidGitVersion {
- codeFormat = 'MMNNPP'
+ codeFormat = 'MMNNPPBB'
prefix 'v'
}
@@ -58,30 +58,17 @@ dependencies {
compile "com.android.support:design:${ANDROID_SUPPORT_LIBS}"
compile "com.android.support:recyclerview-v7:${ANDROID_SUPPORT_LIBS}"
compile "com.android.support:cardview-v7:${ANDROID_SUPPORT_LIBS}"
-// compile "com.android.support:preference-v14:${ANDROID_SUPPORT_LIBS}"
+ compile "com.android.support:animated-vector-drawable:${ANDROID_SUPPORT_LIBS}"
compile "com.android.support.constraint:constraint-layout:${CONSTRAINT_LAYOUT}"
- compile "com.mikepenz:fastadapter:${FAST_ADAPTER}@aar"
- compile "com.mikepenz:fastadapter-commons:${FAST_ADAPTER_COMMONS}@aar"
-
- compile "com.afollestad.material-dialogs:core:${MATERIAL_DIALOG}"
- compile "com.afollestad.material-dialogs:commons:${MATERIAL_DIALOG}"
-
compile "com.mikepenz:iconics-core:${ICONICS}@aar"
compile "com.mikepenz:google-material-typeface:${IICON_GOOGLE}.original@aar"
+ compile "com.afollestad.material-dialogs:core:${MATERIAL_DIALOG}"
+
compile "com.jakewharton.timber:timber:${TIMBER}"
compile "org.jetbrains.anko:anko-commons:${ANKO}"
-
- compile "io.reactivex.rxjava2:rxkotlin:${RX_KOTLIN}"
- compile "io.reactivex.rxjava2:rxandroid:${RX_ANDROID}"
- compile "com.jakewharton.rxbinding2:rxbinding-kotlin:${RX_BINDING}"
- compile "com.jakewharton.rxbinding2:rxbinding-appcompat-v7-kotlin:${RX_BINDING}"
-
- compile("com.mikepenz:aboutlibraries:${ABOUT_LIBRARIES}@aar") {
- transitive = true
- }
}
apply from: '../artifacts.gradle'
diff --git a/core/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt b/core/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt
index 302d9dc..43546ae 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/changelog/Changelog.kt
@@ -2,7 +2,6 @@ package ca.allanwang.kau.changelog
import android.content.Context
import android.content.res.XmlResourceParser
-import android.os.Handler
import android.support.annotation.ColorInt
import android.support.annotation.LayoutRes
import android.support.annotation.XmlRes
@@ -20,7 +19,6 @@ import com.afollestad.materialdialogs.MaterialDialog
import org.jetbrains.anko.doAsync
import org.jetbrains.anko.uiThread
import org.xmlpull.v1.XmlPullParser
-import java.util.*
/**
diff --git a/core/src/main/kotlin/ca/allanwang/kau/views/SimpleRippleDrawable.kt b/core/src/main/kotlin/ca/allanwang/kau/ui/SimpleRippleDrawable.kt
index df842f6..30c8edd 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/views/SimpleRippleDrawable.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/ui/SimpleRippleDrawable.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.views
+package ca.allanwang.kau.ui
import android.content.res.ColorStateList
import android.graphics.drawable.ColorDrawable
diff --git a/core/src/main/kotlin/ca/allanwang/kau/views/RippleCanvas.kt b/core/src/main/kotlin/ca/allanwang/kau/ui/views/RippleCanvas.kt
index 805fb21..773490c 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/views/RippleCanvas.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/ui/views/RippleCanvas.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.views
+package ca.allanwang.kau.ui.views
import android.animation.ArgbEvaluator
import android.animation.ValueAnimator
diff --git a/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt b/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt
index b4752a5..48a048b 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt
+++ b/core/src/main/kotlin/ca/allanwang/kau/utils/ViewUtils.kt
@@ -21,7 +21,7 @@ import android.view.inputmethod.InputMethodManager
import android.widget.ImageView
import android.widget.TextView
import ca.allanwang.kau.logging.KL
-import ca.allanwang.kau.views.createSimpleRippleDrawable
+import ca.allanwang.kau.ui.createSimpleRippleDrawable
import com.mikepenz.iconics.IconicsDrawable
import com.mikepenz.iconics.typeface.IIcon
diff --git a/core/src/main/res/values/dimens.xml b/core/src/main/res/values/dimens.xml
index 5bf6da4..a459443 100644
--- a/core/src/main/res/values/dimens.xml
+++ b/core/src/main/res/values/dimens.xml
@@ -10,7 +10,6 @@
<dimen name="kau_splash_logo">16dp</dimen>
<dimen name="kau_progress_bar_height">1dip</dimen>
<dimen name="kau_account_image_size">100dp</dimen>
- <dimen name="kau_color_circle_size">56dp</dimen>
<dimen name="kau_status_bar_height">24dp</dimen>
<dimen name="kau_drag_dismiss_distance">112dp</dimen> <!-- 2 * ?android:actionBarSize -->
diff --git a/core/src/main/res/values/strings_about.xml b/core/src/main/res/values/strings_about.xml
index e659fc3..4c3c38d 100644
--- a/core/src/main/res/values/strings_about.xml
+++ b/core/src/main/res/values/strings_about.xml
@@ -1,5 +1,5 @@
<resources xmlns:tools="http://schemas.android.com/tools">
- <string name="library_kau_libraryVersion" tools:ignore="ResourceName">1.4</string>
+ <string name="library_kau_libraryVersion" tools:ignore="ResourceName">1.5</string>
<string name="define_kau" tools:ignore="ResourceName" />
<!-- Author section -->
diff --git a/imagepicker/build.gradle b/imagepicker/build.gradle
index 8b3acb1..b2b9b7d 100644
--- a/imagepicker/build.gradle
+++ b/imagepicker/build.gradle
@@ -13,7 +13,7 @@ android {
buildToolsVersion project.BUILD_TOOLS
androidGitVersion {
- codeFormat = 'MMNNPP'
+ codeFormat = 'MMNNPPBB'
prefix 'v'
}
@@ -43,7 +43,7 @@ android {
}
dependencies {
- compile project(':core')
+ compile project(':core-ui')
compile "com.github.bumptech.glide:glide:${GLIDE}"
kapt "com.github.bumptech.glide:compiler:${GLIDE}"
}
diff --git a/imagepicker/src/main/kotlin/ca/allanwang/kau/imagepicker/ImagePickerActivityBase.kt b/imagepicker/src/main/kotlin/ca/allanwang/kau/imagepicker/ImagePickerActivityBase.kt
index d5562aa..fdd612c 100644
--- a/imagepicker/src/main/kotlin/ca/allanwang/kau/imagepicker/ImagePickerActivityBase.kt
+++ b/imagepicker/src/main/kotlin/ca/allanwang/kau/imagepicker/ImagePickerActivityBase.kt
@@ -13,7 +13,7 @@ import android.support.v7.widget.Toolbar
import android.transition.TransitionInflater
import ca.allanwang.kau.logging.KL
import ca.allanwang.kau.utils.bindView
-import ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout
+import ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout
import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter
diff --git a/imagepicker/src/main/res/layout/kau_activity_image_picker.xml b/imagepicker/src/main/res/layout/kau_activity_image_picker.xml
index 3c12a84..6e0bf67 100644
--- a/imagepicker/src/main/res/layout/kau_activity_image_picker.xml
+++ b/imagepicker/src/main/res/layout/kau_activity_image_picker.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
-<ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
+<ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
@@ -26,4 +26,4 @@
</LinearLayout>
-</ca.allanwang.kau.widgets.ElasticDragDismissFrameLayout> \ No newline at end of file
+</ca.allanwang.kau.ui.widgets.ElasticDragDismissFrameLayout> \ No newline at end of file
diff --git a/kpref-activity/.gitignore b/kpref-activity/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/kpref-activity/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/kpref-activity/build.gradle b/kpref-activity/build.gradle
new file mode 100644
index 0000000..31d0a70
--- /dev/null
+++ b/kpref-activity/build.gradle
@@ -0,0 +1,61 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.3.4'
+}
+
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+apply plugin: 'com.github.dcendents.android-maven'
+
+group = project.APP_GROUP
+
+android {
+ compileSdkVersion Integer.parseInt(project.TARGET_SDK)
+ buildToolsVersion project.BUILD_TOOLS
+
+ androidGitVersion {
+ codeFormat = 'MMNNPPBB'
+ prefix 'v'
+ }
+
+ defaultConfig {
+ minSdkVersion Integer.parseInt(project.MIN_SDK)
+ targetSdkVersion Integer.parseInt(project.TARGET_SDK)
+ versionCode androidGitVersion.code()
+ versionName androidGitVersion.name()
+ consumerProguardFiles 'progress-proguard.txt'
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ lintOptions {
+ abortOnError false
+ checkReleaseBuilds false
+ }
+ resourcePrefix "kau_pref"
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ test.java.srcDirs += 'src/test/kotlin'
+ }
+}
+
+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_version"
+ testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
+
+}
+
+apply from: '../artifacts.gradle'
diff --git a/kpref-activity/progress-proguard.txt b/kpref-activity/progress-proguard.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/kpref-activity/progress-proguard.txt
@@ -0,0 +1 @@
+
diff --git a/kpref-activity/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java b/kpref-activity/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..7b079b2
--- /dev/null
+++ b/kpref-activity/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+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/AndroidManifest.xml b/kpref-activity/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..6c86827
--- /dev/null
+++ b/kpref-activity/src/main/AndroidManifest.xml
@@ -0,0 +1 @@
+<manifest package="ca.allanwang.kau.kpref.activity" />
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefActivity.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
index 9a9f7d4..be8fad8 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefActivity.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.kpref
+package ca.allanwang.kau.kpref.activity
import android.os.Bundle
import android.support.annotation.StringRes
@@ -12,13 +12,13 @@ import android.view.animation.AnimationUtils
import android.widget.FrameLayout
import android.widget.ViewAnimator
import ca.allanwang.kau.R
-import ca.allanwang.kau.kpref.items.KPrefItemCore
+import ca.allanwang.kau.kpref.activity.items.KPrefItemCore
+import ca.allanwang.kau.ui.views.RippleCanvas
+import ca.allanwang.kau.ui.widgets.TextSlider
import ca.allanwang.kau.utils.bindView
import ca.allanwang.kau.utils.resolveColor
import ca.allanwang.kau.utils.statusBarColor
import ca.allanwang.kau.utils.string
-import ca.allanwang.kau.widgets.TextSlider
-import ca.allanwang.kau.views.RippleCanvas
import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter
abstract class KPrefActivity : AppCompatActivity(), KPrefActivityContract {
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefBinder.kt
index a424839..6048c1a 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/KPrefBinder.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefBinder.kt
@@ -1,10 +1,10 @@
-package ca.allanwang.kau.kpref
+package ca.allanwang.kau.kpref.activity
import android.support.annotation.StringRes
import android.support.v7.widget.LinearLayoutManager
import android.support.v7.widget.RecyclerView
import ca.allanwang.kau.R
-import ca.allanwang.kau.kpref.items.*
+import ca.allanwang.kau.kpref.activity.items.*
import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter
import org.jetbrains.anko.doAsync
import org.jetbrains.anko.uiThread
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefCheckbox.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt
index 999a718..b7ccc69 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefCheckbox.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefCheckbox.kt
@@ -1,9 +1,8 @@
-package ca.allanwang.kau.kpref.items
+package ca.allanwang.kau.kpref.activity.items
import android.view.View
import android.widget.CheckBox
import ca.allanwang.kau.R
-import ca.allanwang.kau.kpref.KPrefMarker
import ca.allanwang.kau.utils.tint
/**
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefColorPicker.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt
index 762bcf4..38008f3 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefColorPicker.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefColorPicker.kt
@@ -1,14 +1,12 @@
-package ca.allanwang.kau.kpref.items
+package ca.allanwang.kau.kpref.activity.items
import android.view.View
import ca.allanwang.kau.R
-import ca.allanwang.kau.dialogs.color.CircleView
-import ca.allanwang.kau.dialogs.color.ColorBuilder
-import ca.allanwang.kau.dialogs.color.ColorContract
-import ca.allanwang.kau.dialogs.color.colorPickerDialog
-import ca.allanwang.kau.kpref.CoreAttributeContract
-import ca.allanwang.kau.kpref.GlobalOptions
-import ca.allanwang.kau.kpref.KPrefMarker
+import ca.allanwang.kau.colorpicker.CircleView
+import ca.allanwang.kau.colorpicker.ColorBuilder
+import ca.allanwang.kau.colorpicker.ColorContract
+import ca.allanwang.kau.colorpicker.colorPickerDialog
+import ca.allanwang.kau.kpref.activity.GlobalOptions
/**
* Created by Allan Wang on 2017-06-07.
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefHeader.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt
index 4068496..009caba 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefHeader.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefHeader.kt
@@ -1,8 +1,7 @@
-package ca.allanwang.kau.kpref.items
+package ca.allanwang.kau.kpref.activity.items
import android.view.View
import ca.allanwang.kau.R
-import ca.allanwang.kau.kpref.KPrefMarker
/**
* Created by Allan Wang on 2017-06-07.
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefItemBase.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt
index bb0f0a3..d7133c1 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefItemBase.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemBase.kt
@@ -1,10 +1,9 @@
-package ca.allanwang.kau.kpref.items
+package ca.allanwang.kau.kpref.activity.items
import android.support.annotation.CallSuper
import android.view.View
import ca.allanwang.kau.R
-import ca.allanwang.kau.kpref.CoreAttributeContract
-import ca.allanwang.kau.kpref.GlobalOptions
+import ca.allanwang.kau.kpref.activity.GlobalOptions
import ca.allanwang.kau.utils.resolveDrawable
/**
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefItemCore.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
index 18d1bae..fdda464 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefItemCore.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefItemCore.kt
@@ -1,4 +1,4 @@
-package ca.allanwang.kau.kpref.items
+package ca.allanwang.kau.kpref.activity.items
import android.support.annotation.CallSuper
import android.support.annotation.IdRes
@@ -14,8 +14,8 @@ import android.widget.TextView
import ca.allanwang.kau.R
import ca.allanwang.kau.adapters.ThemableIItem
import ca.allanwang.kau.adapters.ThemableIItemDelegate
-import ca.allanwang.kau.kpref.GlobalOptions
-import ca.allanwang.kau.kpref.KPrefMarker
+import ca.allanwang.kau.kpref.activity.GlobalOptions
+import ca.allanwang.kau.kpref.activity.KPrefMarker
import ca.allanwang.kau.utils.*
import com.mikepenz.fastadapter.items.AbstractItem
import com.mikepenz.iconics.typeface.IIcon
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefPlainText.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefPlainText.kt
index 6f7adf8..dd58cd5 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/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.items
+package ca.allanwang.kau.kpref.activity.items
import android.view.View
import ca.allanwang.kau.R
-import ca.allanwang.kau.kpref.GlobalOptions
+import ca.allanwang.kau.kpref.activity.GlobalOptions
/**
* Created by Allan Wang on 2017-06-14.
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefSeekbar.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
index 407018f..39b5f12 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefSeekbar.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSeekbar.kt
@@ -1,12 +1,11 @@
-package ca.allanwang.kau.kpref.items
+package ca.allanwang.kau.kpref.activity.items
import android.view.View
import android.widget.SeekBar
import android.widget.TextView
import ca.allanwang.kau.R
-import ca.allanwang.kau.kpref.GlobalOptions
+import ca.allanwang.kau.kpref.activity.GlobalOptions
import ca.allanwang.kau.kpref.KPrefException
-import ca.allanwang.kau.logging.KL
import ca.allanwang.kau.utils.tint
/**
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefSubItems.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefSubItems.kt
index f373ec4..509394c 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/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.items
+package ca.allanwang.kau.kpref.activity.items
import android.view.View
import ca.allanwang.kau.R
-import ca.allanwang.kau.kpref.GlobalOptions
-import ca.allanwang.kau.kpref.KPrefAdapterBuilder
+import ca.allanwang.kau.kpref.activity.GlobalOptions
+import ca.allanwang.kau.kpref.activity.KPrefAdapterBuilder
/**
* Created by Allan Wang on 2017-06-14.
diff --git a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefText.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
index 9c44cd4..33510c3 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/kpref/items/KPrefText.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/items/KPrefText.kt
@@ -1,9 +1,9 @@
-package ca.allanwang.kau.kpref.items
+package ca.allanwang.kau.kpref.activity.items
import android.view.View
import android.widget.TextView
import ca.allanwang.kau.R
-import ca.allanwang.kau.kpref.GlobalOptions
+import ca.allanwang.kau.kpref.activity.GlobalOptions
import ca.allanwang.kau.utils.toast
/**
diff --git a/core/src/main/res/layout/kau_activity_kpref.xml b/kpref-activity/src/main/res/layout/kau_pref_activity.xml
index 05cacb5..d068618 100644
--- a/core/src/main/res/layout/kau_activity_kpref.xml
+++ b/kpref-activity/src/main/res/layout/kau_pref_activity.xml
@@ -5,7 +5,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
- <ca.allanwang.kau.views.RippleCanvas
+ <ca.allanwang.kau.ui.views.RippleCanvas
android:id="@+id/kau_toolbar_ripple"
android:layout_width="0dp"
android:layout_height="0dp"
@@ -33,7 +33,7 @@
</android.support.v7.widget.Toolbar>
- <ca.allanwang.kau.views.RippleCanvas
+ <ca.allanwang.kau.ui.views.RippleCanvas
android:id="@+id/kau_ripple"
android:layout_width="0dp"
android:layout_height="0dp"
diff --git a/core/src/main/res/layout/kau_preference.xml b/kpref-activity/src/main/res/layout/kau_preference.xml
index dfd9682..1a53726 100644
--- a/core/src/main/res/layout/kau_preference.xml
+++ b/kpref-activity/src/main/res/layout/kau_preference.xml
@@ -13,7 +13,7 @@
android:orientation="horizontal">
<android.support.constraint.ConstraintLayout
- android:id="@+id/kau_pref_container"
+ android:id="@id/kau_pref_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?android:attr/selectableItemBackground"
@@ -23,7 +23,7 @@
<!--As per Android N, icons (24dp) are aligned to the left rather than centered-->
<ImageView
- android:id="@+id/kau_pref_icon"
+ android:id="@id/kau_pref_icon"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginBottom="4dp"
@@ -37,15 +37,15 @@
tools:layout_editor_absoluteX="0dp" />
<TextView
- android:id="@+id/kau_pref_title"
+ android:id="@id/kau_pref_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/kau_padding_normal"
android:ellipsize="marquee"
android:textAppearance="?android:attr/textAppearanceListItem"
android:textColor="?android:attr/textColorPrimary"
- app:layout_constraintBottom_toTopOf="@+id/kau_pref_desc"
- app:layout_constraintEnd_toStartOf="@+id/kau_pref_inner_frame"
+ app:layout_constraintBottom_toTopOf="@id/kau_pref_desc"
+ app:layout_constraintEnd_toStartOf="@id/kau_pref_inner_frame"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/kau_pref_icon"
app:layout_constraintTop_toTopOf="parent"
@@ -59,7 +59,7 @@
android:maxLines="10"
android:textAppearance="?android:attr/textAppearanceListItemSecondary"
android:textColor="?android:attr/textColorSecondary"
- app:layout_constraintBottom_toTopOf="@+id/kau_pref_lower_frame"
+ app:layout_constraintBottom_toTopOf="@id/kau_pref_lower_frame"
app:layout_constraintEnd_toStartOf="@id/kau_pref_inner_frame"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintStart_toEndOf="@id/kau_pref_icon"
@@ -80,7 +80,7 @@
tools:layout_editor_absoluteX="-175dp" />
<android.support.constraint.Barrier
- android:id="@+id/kau_pref_barrier"
+ android:id="@id/kau_pref_barrier"
android:layout_width="1dp"
android:layout_height="wrap_content"
app:barrierDirection="end"
diff --git a/core/src/main/res/layout/kau_preference_checkbox.xml b/kpref-activity/src/main/res/layout/kau_preference_checkbox.xml
index 016394f..016394f 100644
--- a/core/src/main/res/layout/kau_preference_checkbox.xml
+++ b/kpref-activity/src/main/res/layout/kau_preference_checkbox.xml
diff --git a/core/src/main/res/layout/kau_preference_color_preview.xml b/kpref-activity/src/main/res/layout/kau_preference_color_preview.xml
index 18ca35a..fbb049b 100644
--- a/core/src/main/res/layout/kau_preference_color_preview.xml
+++ b/kpref-activity/src/main/res/layout/kau_preference_color_preview.xml
@@ -1,4 +1,4 @@
-<ca.allanwang.kau.dialogs.color.CircleView xmlns:android="http://schemas.android.com/apk/res/android"
+<ca.allanwang.kau.colorpicker.CircleView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@id/kau_pref_inner_content"
android:layout_width="40dp"
android:layout_height="40dp"
diff --git a/core/src/main/res/layout/kau_preference_header.xml b/kpref-activity/src/main/res/layout/kau_preference_header.xml
index 5deece3..5deece3 100644
--- a/core/src/main/res/layout/kau_preference_header.xml
+++ b/kpref-activity/src/main/res/layout/kau_preference_header.xml
diff --git a/core/src/main/res/layout/kau_preference_seekbar.xml b/kpref-activity/src/main/res/layout/kau_preference_seekbar.xml
index 8da4d5d..8da4d5d 100644
--- a/core/src/main/res/layout/kau_preference_seekbar.xml
+++ b/kpref-activity/src/main/res/layout/kau_preference_seekbar.xml
diff --git a/core/src/main/res/layout/kau_preference_seekbar_text.xml b/kpref-activity/src/main/res/layout/kau_preference_seekbar_text.xml
index 6ba2543..6ba2543 100644
--- a/core/src/main/res/layout/kau_preference_seekbar_text.xml
+++ b/kpref-activity/src/main/res/layout/kau_preference_seekbar_text.xml
diff --git a/core/src/main/res/layout/kau_preference_text.xml b/kpref-activity/src/main/res/layout/kau_preference_text.xml
index a4d901e..a4d901e 100644
--- a/core/src/main/res/layout/kau_preference_text.xml
+++ b/kpref-activity/src/main/res/layout/kau_preference_text.xml
diff --git a/kpref-activity/src/main/res/values/ids.xml b/kpref-activity/src/main/res/values/ids.xml
new file mode 100644
index 0000000..0972706
--- /dev/null
+++ b/kpref-activity/src/main/res/values/ids.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <item name="kau_pref_barrier" type="id" />
+ <item name="kau_pref_container" type="id" />
+ <item name="kau_pref_desc" type="id" />
+ <item name="kau_pref_icon" type="id" />
+ <item name="kau_pref_inner_content" type="id" />
+ <item name="kau_pref_inner_frame" type="id" />
+ <item name="kau_pref_item_checkbox" type="id" />
+ <item name="kau_pref_item_color_picker" type="id" />
+ <item name="kau_pref_item_header" type="id" />
+ <item name="kau_pref_item_plain_text" type="id" />
+ <item name="kau_pref_item_seekbar" type="id" />
+ <item name="kau_pref_item_sub_item" type="id" />
+ <item name="kau_pref_item_text" type="id" />
+ <item name="kau_pref_lower_content" type="id" />
+ <item name="kau_pref_lower_frame" type="id" />
+ <item name="kau_pref_title" type="id" />
+</resources> \ No newline at end of file
diff --git a/kpref-activity/src/main/res/values/strings.xml b/kpref-activity/src/main/res/values/strings.xml
new file mode 100644
index 0000000..0402364
--- /dev/null
+++ b/kpref-activity/src/main/res/values/strings.xml
@@ -0,0 +1,3 @@
+<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
new file mode 100644
index 0000000..a29b447
--- /dev/null
+++ b/kpref-activity/src/test/java/ca/allanwang/kau/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+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
diff --git a/sample/build.gradle b/sample/build.gradle
index 66fc619..11b7a60 100644
--- a/sample/build.gradle
+++ b/sample/build.gradle
@@ -10,7 +10,7 @@ android {
buildToolsVersion project.BUILD_TOOLS
androidGitVersion {
- codeFormat = 'MMNNPP'
+ codeFormat = 'MMNNPPBB'
prefix 'v'
}
@@ -37,7 +37,13 @@ android {
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
+ compile project(':about')
+ compile project(':adapter')
+ compile project(':colorpicker')
compile project(':core')
+ compile project(':core-ui')
+ compile project(':kpref-activity')
+ compile project(':searchbar')
compile project(':imagepicker')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
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 e675ebf..a94c1c1 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AboutActivity.kt
@@ -1,6 +1,6 @@
package ca.allanwang.kau.sample
-import ca.allanwang.kau.about.AboutActivityBase
+import ca.allanwang.kau.ui.about.AboutActivityBase
import ca.allanwang.kau.adapters.FastItemThemedAdapter
import ca.allanwang.kau.iitems.CardIItem
import com.mikepenz.fastadapter.IItem
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 e63f107..52ab5fb 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -4,19 +4,12 @@ import android.os.Bundle
import android.os.PersistableBundle
import android.view.Menu
import android.view.MenuItem
-import ca.allanwang.kau.email.sendEmail
import ca.allanwang.kau.kpref.CoreAttributeContract
import ca.allanwang.kau.kpref.KPrefActivity
import ca.allanwang.kau.kpref.KPrefAdapterBuilder
import ca.allanwang.kau.searchview.SearchItem
import ca.allanwang.kau.searchview.SearchView
import ca.allanwang.kau.searchview.bindSearchView
-import ca.allanwang.kau.utils.materialDialog
-import ca.allanwang.kau.utils.navigationBarColor
-import ca.allanwang.kau.utils.startActivity
-import ca.allanwang.kau.utils.toast
-import ca.allanwang.kau.views.RippleCanvas
-import com.mikepenz.google_material_typeface_library.GoogleMaterial
class MainActivity : KPrefActivity() {
diff --git a/searchbar/.gitignore b/searchbar/.gitignore
new file mode 100644
index 0000000..796b96d
--- /dev/null
+++ b/searchbar/.gitignore
@@ -0,0 +1 @@
+/build
diff --git a/searchbar/build.gradle b/searchbar/build.gradle
new file mode 100644
index 0000000..80394ea
--- /dev/null
+++ b/searchbar/build.gradle
@@ -0,0 +1,60 @@
+plugins {
+ id 'com.gladed.androidgitversion' version '0.3.4'
+}
+
+apply plugin: 'com.android.library'
+apply plugin: 'kotlin-android'
+apply plugin: 'com.github.dcendents.android-maven'
+
+group = project.APP_GROUP
+
+android {
+ compileSdkVersion Integer.parseInt(project.TARGET_SDK)
+ buildToolsVersion project.BUILD_TOOLS
+
+ androidGitVersion {
+ codeFormat = 'MMNNPPBB'
+ prefix 'v'
+ }
+
+ defaultConfig {
+ minSdkVersion Integer.parseInt(project.MIN_SDK)
+ targetSdkVersion Integer.parseInt(project.TARGET_SDK)
+ versionCode androidGitVersion.code()
+ versionName androidGitVersion.name()
+ consumerProguardFiles 'progress-proguard.txt'
+ testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
+ }
+ buildTypes {
+ release {
+ minifyEnabled false
+ proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
+ }
+ }
+ lintOptions {
+ abortOnError false
+ checkReleaseBuilds false
+ }
+ resourcePrefix "kau_search_"
+ sourceSets {
+ main.java.srcDirs += 'src/main/kotlin'
+ test.java.srcDirs += 'src/test/kotlin'
+ }
+}
+
+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 "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+ testCompile "org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version"
+
+}
+
+apply from: '../artifacts.gradle'
diff --git a/searchbar/progress-proguard.txt b/searchbar/progress-proguard.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/searchbar/progress-proguard.txt
@@ -0,0 +1 @@
+
diff --git a/searchbar/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java b/searchbar/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
new file mode 100644
index 0000000..7b079b2
--- /dev/null
+++ b/searchbar/src/androidTest/java/ca/allanwang/kau/ExampleInstrumentedTest.java
@@ -0,0 +1,26 @@
+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/searchbar/src/main/AndroidManifest.xml b/searchbar/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..f2ec3e7
--- /dev/null
+++ b/searchbar/src/main/AndroidManifest.xml
@@ -0,0 +1 @@
+<manifest package="ca.allanwang.kau.searchview" />
diff --git a/core/src/main/kotlin/ca/allanwang/kau/searchview/SearchItem.kt b/searchbar/src/main/kotlin/ca/allanwang/kau/searchview/SearchItem.kt
index 96dc789..f1e49e0 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/searchview/SearchItem.kt
+++ b/searchbar/src/main/kotlin/ca/allanwang/kau/searchview/SearchItem.kt
@@ -72,9 +72,9 @@ class SearchItem(val key: String,
}
class ViewHolder(v: View) : RecyclerView.ViewHolder(v) {
- val icon: ImageView by bindView(R.id.search_icon)
- val title: TextView by bindView(R.id.search_title)
- val desc: TextView by bindView(R.id.search_desc)
- val container: ConstraintLayout by bindView(R.id.search_item_frame)
+ val icon: ImageView by bindView(R.id.kau_search_icon)
+ val title: TextView by bindView(R.id.kau_search_title)
+ val desc: TextView by bindView(R.id.kau_search_desc)
+ val container: ConstraintLayout by bindView(R.id.kau_search_item_frame)
}
} \ No newline at end of file
diff --git a/core/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt b/searchbar/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
index c077a06..83ccb45 100644
--- a/core/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
+++ b/searchbar/src/main/kotlin/ca/allanwang/kau/searchview/SearchView.kt
@@ -21,7 +21,7 @@ import ca.allanwang.kau.animators.NoAnimator
import ca.allanwang.kau.kotlin.nonReadable
import ca.allanwang.kau.searchview.SearchView.Configs
import ca.allanwang.kau.utils.*
-import ca.allanwang.kau.views.BoundedCardView
+import ca.allanwang.kau.ui.views.BoundedCardView
import com.jakewharton.rxbinding2.widget.RxTextView
import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter
import com.mikepenz.google_material_typeface_library.GoogleMaterial
@@ -206,16 +206,16 @@ class SearchView @JvmOverloads constructor(
val configs = Configs()
//views
- private val shadow: View by bindView(R.id.search_shadow)
- private val card: BoundedCardView by bindView(R.id.search_cardview)
- private val iconNav: ImageView by bindView(R.id.search_nav)
- private val editText: AppCompatEditText by bindView(R.id.search_edit_text)
+ private val shadow: View by bindView(R.id.kau_search_shadow)
+ private val card: BoundedCardView by bindView(R.id.kau_search_cardview)
+ private val iconNav: ImageView by bindView(R.id.kau_search_nav)
+ private val editText: AppCompatEditText by bindView(R.id.kau_search_edit_text)
val textEvents: Observable<String>
- private val progress: ProgressBar by bindView(R.id.search_progress)
- val iconExtra: ImageView by bindView(R.id.search_extra)
- private val iconClear: ImageView by bindView(R.id.search_clear)
- private val divider: View by bindView(R.id.search_divider)
- private val recycler: RecyclerView by bindView(R.id.search_recycler)
+ private val progress: ProgressBar by bindView(R.id.kau_search_progress)
+ val iconExtra: ImageView by bindView(R.id.kau_search_extra)
+ private val iconClear: ImageView by bindView(R.id.kau_search_clear)
+ private val divider: View by bindView(R.id.kau_search_divider)
+ private val recycler: RecyclerView by bindView(R.id.kau_search_recycler)
val adapter = FastItemAdapter<SearchItem>()
var menuItem: MenuItem? = null
val isOpen: Boolean
diff --git a/core/src/main/res/layout/kau_search_iitem.xml b/searchbar/src/main/res/layout/kau_search_iitem.xml
index efd7260..16df945 100644
--- a/core/src/main/res/layout/kau_search_iitem.xml
+++ b/searchbar/src/main/res/layout/kau_search_iitem.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
- android:id="@+id/search_item_frame"
+ android:id="@id/kau_search_item_frame"
android:layout_width="match_parent"
android:layout_height="@dimen/kau_search_item_height"
android:background="?android:attr/selectableItemBackground"
@@ -11,7 +11,7 @@
android:orientation="horizontal">
<ImageView
- android:id="@+id/search_icon"
+ android:id="@id/kau_search_icon"
android:layout_width="@dimen/kau_search_icon"
android:layout_height="0dp"
android:contentDescription="@string/kau_search"
@@ -21,7 +21,7 @@
app:layout_constraintTop_toTopOf="parent" />
<TextView
- android:id="@+id/search_title"
+ android:id="@id/kau_search_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
@@ -33,14 +33,14 @@
android:paddingStart="@dimen/kau_search_key_line_8"
android:textIsSelectable="false"
android:textSize="@dimen/kau_search_text_small"
- app:layout_constraintBottom_toTopOf="@+id/search_desc"
+ app:layout_constraintBottom_toTopOf="@id/kau_search_desc"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@id/search_icon"
+ app:layout_constraintStart_toEndOf="@id/kau_search_icon"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.5" />
<TextView
- android:id="@id/search_desc"
+ android:id="@id/kau_search_desc"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_gravity="start|center_vertical"
@@ -55,7 +55,7 @@
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toEndOf="@id/search_icon"
- app:layout_constraintTop_toBottomOf="@id/search_title" />
+ app:layout_constraintStart_toEndOf="@id/kau_search_icon"
+ app:layout_constraintTop_toBottomOf="@id/kau_search_title" />
</android.support.constraint.ConstraintLayout> \ No newline at end of file
diff --git a/core/src/main/res/layout/kau_search_view.xml b/searchbar/src/main/res/layout/kau_search_view.xml
index ff9fd74..c975dad 100644
--- a/core/src/main/res/layout/kau_search_view.xml
+++ b/searchbar/src/main/res/layout/kau_search_view.xml
@@ -5,14 +5,14 @@
android:layout_height="match_parent">
<View
- android:id="@+id/search_shadow"
+ android:id="@id/kau_search_shadow"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/kau_shadow_overlay"
android:visibility="gone" />
- <ca.allanwang.kau.views.BoundedCardView
- android:id="@+id/search_cardview"
+ <ca.allanwang.kau.ui.views.BoundedCardView
+ android:id="@id/kau_search_cardview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/kau_search_base_margin"
@@ -34,7 +34,7 @@
android:orientation="horizontal">
<ImageView
- android:id="@+id/search_nav"
+ android:id="@id/kau_search_nav"
android:layout_width="@dimen/kau_search_icon"
android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackgroundBorderless"
@@ -44,7 +44,7 @@
android:scaleType="centerInside" />
<android.support.v7.widget.AppCompatEditText
- android:id="@+id/search_edit_text"
+ android:id="@id/kau_search_edit_text"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_gravity="start|center_vertical"
@@ -63,14 +63,14 @@
android:windowSoftInputMode="stateAlwaysHidden" />
<ProgressBar
- android:id="@+id/search_progress"
+ android:id="@id/kau_search_progress"
style="?android:attr/indeterminateProgressStyle"
android:layout_width="@dimen/kau_search_progress"
android:layout_height="match_parent"
android:visibility="gone" />
<ImageView
- android:id="@+id/search_extra"
+ android:id="@id/kau_search_extra"
android:layout_width="48dp"
android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackgroundBorderless"
@@ -81,7 +81,7 @@
android:visibility="gone" />
<ImageView
- android:id="@+id/search_clear"
+ android:id="@id/kau_search_clear"
android:layout_width="48dp"
android:layout_height="match_parent"
android:background="?android:attr/selectableItemBackgroundBorderless"
@@ -93,13 +93,13 @@
</LinearLayout>
<View
- android:id="@+id/search_divider"
+ android:id="@id/kau_search_divider"
android:layout_width="match_parent"
android:layout_height="@dimen/kau_search_divider"
android:background="?android:attr/listDivider" />
<android.support.v7.widget.RecyclerView
- android:id="@+id/search_recycler"
+ android:id="@id/kau_search_recycler"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -108,6 +108,6 @@
</LinearLayout>
- </ca.allanwang.kau.views.BoundedCardView>
+ </ca.allanwang.kau.ui.views.BoundedCardView>
</merge> \ No newline at end of file
diff --git a/core/src/main/res/values/dimens_search.xml b/searchbar/src/main/res/values/dimens.xml
index acf79cb..acf79cb 100644
--- a/core/src/main/res/values/dimens_search.xml
+++ b/searchbar/src/main/res/values/dimens.xml
diff --git a/searchbar/src/main/res/values/ids.xml b/searchbar/src/main/res/values/ids.xml
new file mode 100644
index 0000000..b77ad4e
--- /dev/null
+++ b/searchbar/src/main/res/values/ids.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <item name="kau_search_cardview" type="id" />
+ <item name="kau_search_clear" type="id" />
+ <item name="kau_search_desc" type="id" />
+ <item name="kau_search_divider" type="id" />
+ <item name="kau_search_edit_text" type="id" />
+ <item name="kau_search_extra" type="id" />
+ <item name="kau_search_icon" type="id" />
+ <item name="kau_search_item_frame" type="id" />
+ <item name="kau_search_nav" type="id" />
+ <item name="kau_search_progress" type="id" />
+ <item name="kau_search_recycler" type="id" />
+ <item name="kau_search_shadow" type="id" />
+ <item name="kau_search_title" type="id" />
+</resources> \ No newline at end of file
diff --git a/searchbar/src/test/java/ca/allanwang/kau/ExampleUnitTest.java b/searchbar/src/test/java/ca/allanwang/kau/ExampleUnitTest.java
new file mode 100644
index 0000000..a29b447
--- /dev/null
+++ b/searchbar/src/test/java/ca/allanwang/kau/ExampleUnitTest.java
@@ -0,0 +1,17 @@
+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
diff --git a/settings.gradle b/settings.gradle
index 5569232..7284dca 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -1 +1,10 @@
-include ':sample', ':core', ':imagepicker'
+include ':core',
+ ':sample',
+
+ ':about',
+ ':adapter',
+ ':colorpicker',
+ ':core-ui',
+ ':imagepicker',
+ ':kpref-activity',
+ ':searchbar'