aboutsummaryrefslogtreecommitdiff
path: root/about/src/main/kotlin/ca
diff options
context:
space:
mode:
Diffstat (limited to 'about/src/main/kotlin/ca')
-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