aboutsummaryrefslogtreecommitdiff
path: root/sample/src
diff options
context:
space:
mode:
Diffstat (limited to 'sample/src')
-rw-r--r--sample/src/main/AndroidManifest.xml10
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt13
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt17
-rw-r--r--sample/src/main/res/values/strings.xml4
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml18
5 files changed, 45 insertions, 17 deletions
diff --git a/sample/src/main/AndroidManifest.xml b/sample/src/main/AndroidManifest.xml
index 85fb199..a3bbf45 100644
--- a/sample/src/main/AndroidManifest.xml
+++ b/sample/src/main/AndroidManifest.xml
@@ -30,10 +30,16 @@
android:theme="@style/Kau.About" />
<activity
android:name=".ImagePickerActivity"
- android:theme="@style/Kau.ImagePicker" />
+ android:theme="@style/Kau.MediaPicker" />
<activity
android:name=".ImagePickerActivityOverlay"
- android:theme="@style/Kau.ImagePicker.Overlay" />
+ android:theme="@style/Kau.MediaPicker.Overlay" />
+ <activity
+ android:name=".VideoPickerActivity"
+ android:theme="@style/Kau.MediaPicker" />
+ <activity
+ android:name=".VideoPickerActivityOverlay"
+ android:theme="@style/Kau.MediaPicker.Overlay" />
<activity
android:name=".AdapterActivity"
android:theme="@style/Kau.Translucent.SlideBottom" />
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt
index c7f28bc..eebc5ca 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt
@@ -1,11 +1,16 @@
package ca.allanwang.kau.sample
-import ca.allanwang.kau.imagepicker.ImagePickerActivityBase
-import ca.allanwang.kau.imagepicker.ImagePickerActivityOverlayBase
+import ca.allanwang.kau.imagepicker.MediaPickerActivityBase
+import ca.allanwang.kau.imagepicker.MediaPickerActivityOverlayBase
+import ca.allanwang.kau.imagepicker.MediaType
/**
* Created by Allan Wang on 2017-07-23.
*/
-class ImagePickerActivity : ImagePickerActivityBase()
+class ImagePickerActivity : MediaPickerActivityBase(MediaType.IMAGE)
-class ImagePickerActivityOverlay : ImagePickerActivityOverlayBase() \ No newline at end of file
+class ImagePickerActivityOverlay : MediaPickerActivityOverlayBase(MediaType.IMAGE)
+
+class VideoPickerActivity : MediaPickerActivityBase(MediaType.VIDEO)
+
+class VideoPickerActivityOverlay : MediaPickerActivityOverlayBase(MediaType.VIDEO) \ 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 7ce10af..0cc41fb 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -2,13 +2,12 @@ package ca.allanwang.kau.sample
import android.content.Intent
import android.os.Bundle
-import android.os.PersistableBundle
import android.view.Menu
import android.view.MenuItem
import ca.allanwang.kau.about.kauLaunchAbout
import ca.allanwang.kau.email.sendEmail
-import ca.allanwang.kau.imagepicker.kauLaunchImagePicker
-import ca.allanwang.kau.imagepicker.kauOnImagePickerResult
+import ca.allanwang.kau.imagepicker.kauLaunchMediaPicker
+import ca.allanwang.kau.imagepicker.kauOnMediaPickerResult
import ca.allanwang.kau.kpref.activity.CoreAttributeContract
import ca.allanwang.kau.kpref.activity.KPrefActivity
import ca.allanwang.kau.kpref.activity.KPrefAdapterBuilder
@@ -78,7 +77,7 @@ class MainActivity : KPrefActivity() {
"fill", "table", "east", "travel", "weight", "less", "language", "morning", "among")
}
- const val REQUEST_IMAGE = 27
+ const val REQUEST_MEDIA = 27
}
override fun kPrefCoreAttributes(): CoreAttributeContract.() -> Unit = {
@@ -164,12 +163,12 @@ class MainActivity : KPrefActivity() {
descRes = R.string.sub_item_desc
}
- plainText(R.string.gallery_showcase) {
- onClick = { _, _, _ -> kauLaunchImagePicker(ImagePickerActivity::class.java, REQUEST_IMAGE); false }
+ plainText(R.string.image_showcase) {
+ onClick = { _, _, _ -> kauLaunchMediaPicker(ImagePickerActivity::class.java, REQUEST_MEDIA); false }
}
- plainText(R.string.gallery_overlay_showcase) {
- onClick = { _, _, _ -> kauLaunchImagePicker(ImagePickerActivityOverlay::class.java, REQUEST_IMAGE); false }
+ plainText(R.string.video_overlay_showcase) {
+ onClick = { _, _, _ -> kauLaunchMediaPicker(VideoPickerActivityOverlay::class.java, REQUEST_MEDIA); false }
}
plainText(R.string.adapter_showcase) {
@@ -251,7 +250,7 @@ class MainActivity : KPrefActivity() {
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
when (requestCode) {
- REQUEST_IMAGE -> toast("${kauOnImagePickerResult(resultCode, data).size} images selected")
+ REQUEST_MEDIA -> toast("${kauOnMediaPickerResult(resultCode, data).size} items selected")
}
}
}
diff --git a/sample/src/main/res/values/strings.xml b/sample/src/main/res/values/strings.xml
index c64b623..11a897a 100644
--- a/sample/src/main/res/values/strings.xml
+++ b/sample/src/main/res/values/strings.xml
@@ -19,8 +19,8 @@
<string name="sub_item_desc">Press this to view the next subset of preferences</string>
<string name="your_email">your.email@here.com</string>
<string name="your_subject">Your subject</string>
- <string name="gallery_showcase">Gallery Showcase</string>
- <string name="gallery_overlay_showcase">Gallery Overlay Showcase</string>
+ <string name="image_showcase">Image Showcase</string>
+ <string name="video_overlay_showcase">Video Overlay Showcase</string>
<string name="adapter_showcase">Adapter Showcase</string>
<string name="about_kau">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.</string>
</resources>
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index cfb8bd1..b7bb8e4 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -6,6 +6,24 @@
<item text="" />
-->
+ <version title="v3.2.1"/>
+ <item text=":core: Remove requestLayout call from setMargin and setPadding" />
+ <item text=":core: Fix kau direction bits" />
+ <item text=":core: Greatly simplify ripple canvas and truly support transparent ripples" />
+ <item text=":core: Generalize fab transition to fade scale transition for all imageviews" />
+ <item text=":core: Create ViewPropertyAnimator.scaleXY() and View.scaleXY" />
+ <item text=":core: Create View.setOnSingleTapListener()" />
+ <item text=":core: Create rndColor, which generates a random opaque color for testing" />
+ <item text=":core: Add resettable view binding variants to Kotterknife" />
+ <item text=":core: Create lazy resettable registry" />
+ <item text=":core: Add more transitions and anims" />
+ <item text=":kpref-activity: Reduce alpha color for desc" />
+ <item text=":imagepicker: [breaking] Rename to mediapicker and add support for videos" />
+ <item text="" />
+ <item text="" />
+ <item text="" />
+ <item text="" />
+
<version title="v3.2.0"/>
<item text=":adapter: Make KauAnimator extensible" />
<item text=":imagepicker: Add uri val to ImageModel" />