aboutsummaryrefslogtreecommitdiff
path: root/about
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-07-22 16:08:08 -0700
committerGitHub <noreply@github.com>2017-07-22 16:08:08 -0700
commit61d87976e8b29ed25061ae98743a6cf4f4274542 (patch)
treefa4d9bca5fe1b9478ba2f1cc1e6c7d8d18bf15ce /about
parent8f2b5ac043f47cc44f43c3788d1377083fb339a2 (diff)
downloadkau-61d87976e8b29ed25061ae98743a6cf4f4274542.tar.gz
kau-61d87976e8b29ed25061ae98743a6cf4f4274542.tar.bz2
kau-61d87976e8b29ed25061ae98743a6cf4f4274542.zip
Support sdk 19 where possible and add image picker (#10)3.0
* Fix plural * Switch to long * Test plural again * Comment * Major update to image picker and view utils * Make image activity full screen * Update min sdk and prefix * Lower sdk requirement and make string private * Bring kpref activity to sdk 19
Diffstat (limited to 'about')
-rw-r--r--about/README.md7
-rw-r--r--about/build.gradle4
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt2
-rw-r--r--about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt15
-rw-r--r--about/src/main/res-public/values/public.xml16
-rw-r--r--about/src/main/res-public/values/strings.xml4
-rw-r--r--about/src/main/res-public/values/strings_about.xml (renamed from about/src/main/res/values/strings_about.xml)0
-rw-r--r--about/src/main/res-public/values/styles.xml6
-rw-r--r--about/src/main/res/values/colors.xml5
-rw-r--r--about/src/main/res/values/dimens.xml4
-rw-r--r--about/src/main/res/values/styles.xml6
11 files changed, 57 insertions, 12 deletions
diff --git a/about/README.md b/about/README.md
index dfe6452..e7012b5 100644
--- a/about/README.md
+++ b/about/README.md
@@ -13,7 +13,12 @@ This activity can be easily added by extending `AboutActivityBase`.
Everything is already prepared, but you can modify the theme or other components through the config DSL or through the open functions.
There are also numerous iitem cards already prepared (in this submodule and from `:adapter`)if you wish to add that in your main view.
-Be sure to include the activity in your Manifest and have it extend `Kau.Translucent.About`, or any other style that achieves the same look.
+You may also easily launch the activity through the simple binder:
+```
+Activity.kauLaunchAbout(YourClass::class.java)
+```
+
+Be sure to include the activity in your Manifest and have it extend `Kau.About`, or any other style that achieves the same look.
## Proguard
diff --git a/about/build.gradle b/about/build.gradle
index 6898217..5decae4 100644
--- a/about/build.gradle
+++ b/about/build.gradle
@@ -1,9 +1,5 @@
apply from: '../android-lib.gradle'
-android {
- resourcePrefix "kau_"
-}
-
dependencies {
compile project(':core-ui')
compile project(':adapter')
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
index b3e3e41..19fb4c4 100644
--- a/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutActivityBase.kt
@@ -121,7 +121,7 @@ abstract class AboutActivityBase(val rClass: Class<*>?, val configBuilder: Confi
* Method to fetch the library list
* This is fetched asynchronously and you may override it to customize the list
*/
- open fun getLibraries(libs: Libs): List<Library> = libs.prepareLibraries(this, null, null, true, true)
+ open fun getLibraries(libs: Libs): List<Library> = libs.prepareLibraries(this, null, null, true, true)!!
/**
* Gets the view associated with the given page position
diff --git a/about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt b/about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt
new file mode 100644
index 0000000..902f6e5
--- /dev/null
+++ b/about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt
@@ -0,0 +1,15 @@
+package ca.allanwang.kau.about
+
+import android.app.Activity
+import ca.allanwang.kau.utils.startActivity
+
+/**
+ * Created by Allan Wang on 2017-07-22.
+ */
+
+/**
+ * About activity launcher
+ */
+fun Activity.kauLaunchAbout(clazz: Class<out AboutActivityBase>) {
+ startActivity(clazz, transition = true)
+} \ No newline at end of file
diff --git a/about/src/main/res-public/values/public.xml b/about/src/main/res-public/values/public.xml
new file mode 100644
index 0000000..f89ddb7
--- /dev/null
+++ b/about/src/main/res-public/values/public.xml
@@ -0,0 +1,16 @@
+<resources xmlns:tools='http://schemas.android.com/tools' tools:ignore='ResourceName'>
+<!-- AUTO-GENERATED FILE. DO NOT MODIFY. public.xml is generated by the generatepublicxml gradle task -->
+ <public name='kau_about_libraries_intro' type='string' />
+ <public name='library_kau_libraryVersion' type='string' />
+ <public name='define_kau' type='string' />
+ <public name='library_kau_author' type='string' />
+ <public name='library_kau_authorWebsite' type='string' />
+ <public name='library_kau_libraryName' type='string' />
+ <public name='library_kau_libraryDescription' type='string' />
+ <public name='library_kau_libraryWebsite' type='string' />
+ <public name='library_kau_isOpenSource' type='string' />
+ <public name='library_kau_repositoryLink' type='string' />
+ <public name='library_kau_classPath' type='string' />
+ <public name='library_kau_licenseId' type='string' />
+ <public name='Kau.About' type='style' />
+</resources> \ No newline at end of file
diff --git a/about/src/main/res-public/values/strings.xml b/about/src/main/res-public/values/strings.xml
new file mode 100644
index 0000000..509b56c
--- /dev/null
+++ b/about/src/main/res-public/values/strings.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="kau_about_libraries_intro">This app would not be possible without the following great libraries.</string>
+</resources> \ No newline at end of file
diff --git a/about/src/main/res/values/strings_about.xml b/about/src/main/res-public/values/strings_about.xml
index f538e59..f538e59 100644
--- a/about/src/main/res/values/strings_about.xml
+++ b/about/src/main/res-public/values/strings_about.xml
diff --git a/about/src/main/res-public/values/styles.xml b/about/src/main/res-public/values/styles.xml
new file mode 100644
index 0000000..c395e9f
--- /dev/null
+++ b/about/src/main/res-public/values/styles.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <style name="Kau.About" parent="Kau.Translucent.SlideTop"/>
+
+</resources> \ No newline at end of file
diff --git a/about/src/main/res/values/colors.xml b/about/src/main/res/values/colors.xml
new file mode 100644
index 0000000..fcfc537
--- /dev/null
+++ b/about/src/main/res/values/colors.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<resources>
+ <color name="kau_about_page_indicator_dark">#80ffffff</color>
+ <color name="kau_about_page_indicator_dark_selected">#fff</color>
+</resources>
diff --git a/about/src/main/res/values/dimens.xml b/about/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..2b5250a
--- /dev/null
+++ b/about/src/main/res/values/dimens.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <dimen name="kau_about_header_height">224dp</dimen>
+</resources> \ No newline at end of file
diff --git a/about/src/main/res/values/styles.xml b/about/src/main/res/values/styles.xml
deleted file mode 100644
index f878950..0000000
--- a/about/src/main/res/values/styles.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
- <style name="Kau.Translucent.About" parent="Kau.Translucent.SlideTop"/>
-
-</resources> \ No newline at end of file