aboutsummaryrefslogtreecommitdiff
path: root/about/src/main/kotlin
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/src/main/kotlin
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/src/main/kotlin')
-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
2 files changed, 16 insertions, 1 deletions
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