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 --- .../ca/allanwang/kau/about/AboutActivityBase.kt | 2 +- .../kotlin/ca/allanwang/kau/about/AboutBinder.kt | 15 ++++++++++++ about/src/main/res-public/values/public.xml | 16 +++++++++++++ about/src/main/res-public/values/strings.xml | 4 ++++ about/src/main/res-public/values/strings_about.xml | 27 ++++++++++++++++++++++ about/src/main/res-public/values/styles.xml | 6 +++++ about/src/main/res/values/colors.xml | 5 ++++ about/src/main/res/values/dimens.xml | 4 ++++ about/src/main/res/values/strings_about.xml | 27 ---------------------- about/src/main/res/values/styles.xml | 6 ----- 10 files changed, 78 insertions(+), 34 deletions(-) create mode 100644 about/src/main/kotlin/ca/allanwang/kau/about/AboutBinder.kt create mode 100644 about/src/main/res-public/values/public.xml create mode 100644 about/src/main/res-public/values/strings.xml create mode 100644 about/src/main/res-public/values/strings_about.xml create mode 100644 about/src/main/res-public/values/styles.xml create mode 100644 about/src/main/res/values/colors.xml create mode 100644 about/src/main/res/values/dimens.xml delete mode 100644 about/src/main/res/values/strings_about.xml delete mode 100644 about/src/main/res/values/styles.xml (limited to 'about/src/main') 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 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 @@ + + + + + + + + + + + + + + + + \ 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 @@ + + + This app would not be possible without the following great libraries. + \ No newline at end of file diff --git a/about/src/main/res-public/values/strings_about.xml b/about/src/main/res-public/values/strings_about.xml new file mode 100644 index 0000000..f538e59 --- /dev/null +++ b/about/src/main/res-public/values/strings_about.xml @@ -0,0 +1,27 @@ + + 2.1 + + + + Allan Wang + https://www.allanwang.ca/dev/ + + KAU + +
+ KAU aims to make many common functions executable in one line. It adds numerous extensions to match Kotlin\'s DSL, + and supports completely customizable view groups that are used in almost any app project. + ]]> +
+ https://allanwang.github.io/KAU/ + + true + https://github.com/AllanWang/KAU + + ca.allanwang.kau + + apache_2_0 + +
\ No newline at end of file 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 @@ + + + +