From 50ad7f0ae89fc52ce57fe03328f4221fb57f2eac Mon Sep 17 00:00:00 2001 From: Allan Wang Date: Sun, 23 Jul 2017 23:26:34 -0700 Subject: Fully implement imagepicker and create play store showcase (#12) * Update changelog * Add uri to imagemodel * Revamp image pickers * Prepare play store showcase * Add encrypted files * Test showcase * Clean elastic recycler activity --- sample/build.gradle | 24 ++++++++ sample/src/main/AndroidManifest.xml | 7 ++- .../kotlin/ca/allanwang/kau/sample/AnimActivity.kt | 62 ++------------------- .../kotlin/ca/allanwang/kau/sample/ImagePicker.kt | 11 ++++ .../ca/allanwang/kau/sample/ImagePickerActivity.kt | 8 --- .../kotlin/ca/allanwang/kau/sample/MainActivity.kt | 4 ++ sample/src/main/play/contactEmail | 1 + sample/src/main/play/defaultLanguage | 1 + sample/src/main/play/en-CA/listing/fulldescription | 3 + .../src/main/play/en-CA/listing/shortdescription | 1 + sample/src/main/play/en-CA/listing/title | 1 + sample/src/main/play/en-CA/whatsnew | 1 + sample/src/main/res/mipmap-hdpi/ic_launcher.png | Bin 3418 -> 2316 bytes .../src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin 4208 -> 0 bytes sample/src/main/res/mipmap-mdpi/ic_launcher.png | Bin 2206 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin 2555 -> 0 bytes sample/src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 4842 -> 3053 bytes .../main/res/mipmap-xhdpi/ic_launcher_round.png | Bin 6114 -> 0 bytes sample/src/main/res/mipmap-xxhdpi/ic_launcher.png | Bin 7718 -> 4750 bytes .../main/res/mipmap-xxhdpi/ic_launcher_round.png | Bin 10056 -> 0 bytes sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 10486 -> 6480 bytes .../main/res/mipmap-xxxhdpi/ic_launcher_round.png | Bin 14696 -> 0 bytes sample/src/main/res/values/strings.xml | 4 +- sample/src/main/res/xml/kau_changelog.xml | 15 +++-- 24 files changed, 70 insertions(+), 73 deletions(-) create mode 100644 sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt delete mode 100644 sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePickerActivity.kt create mode 100644 sample/src/main/play/contactEmail create mode 100644 sample/src/main/play/defaultLanguage create mode 100644 sample/src/main/play/en-CA/listing/fulldescription create mode 100644 sample/src/main/play/en-CA/listing/shortdescription create mode 100644 sample/src/main/play/en-CA/listing/title create mode 100644 sample/src/main/play/en-CA/whatsnew delete mode 100644 sample/src/main/res/mipmap-hdpi/ic_launcher_round.png delete mode 100644 sample/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 sample/src/main/res/mipmap-mdpi/ic_launcher_round.png delete mode 100644 sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png delete mode 100644 sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png delete mode 100644 sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png (limited to 'sample') diff --git a/sample/build.gradle b/sample/build.gradle index b318174..f1a0f10 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -3,6 +3,7 @@ plugins { } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' +apply plugin: 'com.github.triplet.play' repositories { jcenter() @@ -11,6 +12,14 @@ repositories { maven { url "https://maven.google.com" } } +play { + jsonFile = file('../files/gplay-keys.json') + track = 'beta' + errorOnSizeLimit = true + uploadImages = false + untrackOld = true +} + android { compileSdkVersion Integer.parseInt(project.TARGET_SDK) buildToolsVersion project.BUILD_TOOLS @@ -28,9 +37,24 @@ android { testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } + signingConfigs { + + def releaseProps = new Properties() + file("../files/kau.properties").withInputStream { releaseProps.load(it) } + + release { + storeFile file("../files/kau.keystore") + storePassword releaseProps.getProperty('storePassword') + keyAlias releaseProps.getProperty('keyAlias') + keyPassword releaseProps.getProperty('keyPassword') + } + + } + buildTypes { release { minifyEnabled true + signingConfig signingConfigs.release proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml index da26bdf..85fb199 100644 --- a/sample/src/main/AndroidManifest.xml +++ b/sample/src/main/AndroidManifest.xml @@ -10,12 +10,12 @@ android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" - android:roundIcon="@mipmap/ic_launcher_round" + android:roundIcon="@mipmap/ic_launcher" android:supportsRtl="true" android:theme="@style/AppTheme"> @@ -31,6 +31,9 @@ + diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt index abc65b9..abf44d8 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt @@ -7,13 +7,14 @@ import ca.allanwang.kau.permissions.PERMISSION_ACCESS_COARSE_LOCATION import ca.allanwang.kau.permissions.PERMISSION_ACCESS_FINE_LOCATION import ca.allanwang.kau.permissions.kauOnRequestPermissionsResult import ca.allanwang.kau.permissions.kauRequestPermissions -import ca.allanwang.kau.swipe.SWIPE_EDGE_BOTTOM +import ca.allanwang.kau.swipe.SWIPE_EDGE_LEFT import ca.allanwang.kau.swipe.kauSwipeOnCreate import ca.allanwang.kau.swipe.kauSwipeOnDestroy import ca.allanwang.kau.swipe.kauSwipeOnPostCreate import ca.allanwang.kau.utils.fullLinearRecycler import ca.allanwang.kau.utils.startActivitySlideOut import ca.allanwang.kau.utils.toast +import ca.allanwang.kau.utils.withAlpha import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter /** @@ -27,63 +28,10 @@ class AnimActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) val adapter = FastItemAdapter() - setContentView(fullLinearRecycler(adapter)) + setContentView(fullLinearRecycler(adapter).apply { setBackgroundColor(KPrefSample.bgColor.withAlpha(255)) }) + adapter.add(listOf( PERMISSION_ACCESS_COARSE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, - PERMISSION_ACCESS_FINE_LOCATION, PERMISSION_ACCESS_FINE_LOCATION ).map { PermissionCheckbox(it) }) adapter.withOnClickListener { _, _, item, _ -> @@ -96,7 +44,7 @@ class AnimActivity : AppCompatActivity() { true } kauSwipeOnCreate { - edgeFlag = SWIPE_EDGE_BOTTOM + edgeFlag = SWIPE_EDGE_LEFT } } diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt new file mode 100644 index 0000000..c7f28bc --- /dev/null +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt @@ -0,0 +1,11 @@ +package ca.allanwang.kau.sample + +import ca.allanwang.kau.imagepicker.ImagePickerActivityBase +import ca.allanwang.kau.imagepicker.ImagePickerActivityOverlayBase + +/** + * Created by Allan Wang on 2017-07-23. + */ +class ImagePickerActivity : ImagePickerActivityBase() + +class ImagePickerActivityOverlay : ImagePickerActivityOverlayBase() \ No newline at end of file diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePickerActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePickerActivity.kt deleted file mode 100644 index 8a23192..0000000 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePickerActivity.kt +++ /dev/null @@ -1,8 +0,0 @@ -package ca.allanwang.kau.sample - -import ca.allanwang.kau.imagepicker.ImagePickerActivityBase - -/** - * Created by Allan Wang on 2017-07-23. - */ -class ImagePickerActivity : ImagePickerActivityBase() \ No newline at end of file diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt index ecfef04..7ce10af 100644 --- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt +++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt @@ -168,6 +168,10 @@ class MainActivity : KPrefActivity() { onClick = { _, _, _ -> kauLaunchImagePicker(ImagePickerActivity::class.java, REQUEST_IMAGE); false } } + plainText(R.string.gallery_overlay_showcase) { + onClick = { _, _, _ -> kauLaunchImagePicker(ImagePickerActivityOverlay::class.java, REQUEST_IMAGE); false } + } + plainText(R.string.adapter_showcase) { onClick = { _, _, _ -> startActivity(AdapterActivity::class.java, transition = true); false } } diff --git a/sample/src/main/play/contactEmail b/sample/src/main/play/contactEmail new file mode 100644 index 0000000..3e03392 --- /dev/null +++ b/sample/src/main/play/contactEmail @@ -0,0 +1 @@ +pitchedapps@gmail.com \ No newline at end of file diff --git a/sample/src/main/play/defaultLanguage b/sample/src/main/play/defaultLanguage new file mode 100644 index 0000000..ffdd217 --- /dev/null +++ b/sample/src/main/play/defaultLanguage @@ -0,0 +1 @@ +en-CA \ No newline at end of file diff --git a/sample/src/main/play/en-CA/listing/fulldescription b/sample/src/main/play/en-CA/listing/fulldescription new file mode 100644 index 0000000..2d9fe89 --- /dev/null +++ b/sample/src/main/play/en-CA/listing/fulldescription @@ -0,0 +1,3 @@ +This app aims to demonstrate the features available in KAU, or Kotlin Android Utils. + +The project is open sourced on github \ No newline at end of file diff --git a/sample/src/main/play/en-CA/listing/shortdescription b/sample/src/main/play/en-CA/listing/shortdescription new file mode 100644 index 0000000..9424ee8 --- /dev/null +++ b/sample/src/main/play/en-CA/listing/shortdescription @@ -0,0 +1 @@ +A simple showcase for Kotlin Android Utils \ No newline at end of file diff --git a/sample/src/main/play/en-CA/listing/title b/sample/src/main/play/en-CA/listing/title new file mode 100644 index 0000000..c3c5422 --- /dev/null +++ b/sample/src/main/play/en-CA/listing/title @@ -0,0 +1 @@ +KAU - Library Showcase \ No newline at end of file diff --git a/sample/src/main/play/en-CA/whatsnew b/sample/src/main/play/en-CA/whatsnew new file mode 100644 index 0000000..1d15ce2 --- /dev/null +++ b/sample/src/main/play/en-CA/whatsnew @@ -0,0 +1 @@ +A full changelog is available in the app \ No newline at end of file diff --git a/sample/src/main/res/mipmap-hdpi/ic_launcher.png b/sample/src/main/res/mipmap-hdpi/ic_launcher.png index cde69bc..9b9a9ef 100644 Binary files a/sample/src/main/res/mipmap-hdpi/ic_launcher.png and b/sample/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png b/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png deleted file mode 100644 index 9a078e3..0000000 Binary files a/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png and /dev/null differ diff --git a/sample/src/main/res/mipmap-mdpi/ic_launcher.png b/sample/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index c133a0c..0000000 Binary files a/sample/src/main/res/mipmap-mdpi/ic_launcher.png and /dev/null differ diff --git a/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png b/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png deleted file mode 100644 index efc028a..0000000 Binary files a/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png and /dev/null differ diff --git a/sample/src/main/res/mipmap-xhdpi/ic_launcher.png b/sample/src/main/res/mipmap-xhdpi/ic_launcher.png index bfa42f0..18b65ef 100644 Binary files a/sample/src/main/res/mipmap-xhdpi/ic_launcher.png and b/sample/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png deleted file mode 100644 index 3af2608..0000000 Binary files a/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png and /dev/null differ diff --git a/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png b/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png index 324e72c..14f2082 100644 Binary files a/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png deleted file mode 100644 index 9bec2e6..0000000 Binary files a/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png index aee44e1..fe0aa98 100644 Binary files a/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png deleted file mode 100644 index 34947cd..0000000 Binary files a/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and /dev/null differ diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml index f3880b2..c64b623 100644 --- a/sample/src/main/res/values/strings.xml +++ b/sample/src/main/res/values/strings.xml @@ -1,6 +1,5 @@ - KPrefs - MainActivity + KAU This is a header This is a description Checkbox 1 @@ -21,6 +20,7 @@ your.email@here.com Your subject Gallery Showcase + Gallery Overlay Showcase Adapter Showcase KAU (Kotlin Android Utils) is a collection of common extension functions and complex UIs that can be used in almost all apps. It is meant to implement the shared components, so you can focus on what makes your app unique. diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml index 76aee36..7ed2073 100644 --- a/sample/src/main/res/xml/kau_changelog.xml +++ b/sample/src/main/res/xml/kau_changelog.xml @@ -6,15 +6,22 @@ --> - - - - + + + + + + + + + + + -- cgit v1.2.3