From 61d87976e8b29ed25061ae98743a6cf4f4274542 Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sat, 22 Jul 2017 16:08:08 -0700 Subject: Support sdk 19 where possible and add image picker (#10) * 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 --- .../kotlin/ca/allanwang/kau/about/AboutActivityBase.kt | 2 +- .../src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt (limited to 'about/src/main/kotlin') 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 = libs.prepareLibraries(this, null, null, true, true) + open fun getLibraries(libs: Libs): List = 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) { + startActivity(clazz, transition = true) +} \ No newline at end of file -- cgit v1.2.3