diff options
author | Allan Wang <me@allanwang.ca> | 2017-07-31 23:02:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-31 23:02:01 -0700 |
commit | 48213d0b427c478865c75fee912ff1ae8bbaffb5 (patch) | |
tree | 7aef1d8400fc3403ee5a40aba945f33a95319359 /sample | |
parent | 8a4e9fd44dfbcf58aa7ab63167dcbdf8752db7d0 (diff) | |
download | kau-48213d0b427c478865c75fee912ff1ae8bbaffb5.tar.gz kau-48213d0b427c478865c75fee912ff1ae8bbaffb5.tar.bz2 kau-48213d0b427c478865c75fee912ff1ae8bbaffb5.zip |
Major update to core and kotterknife; create mediapicker (#15)
* Readme
* Fix kau direction bits
* Truly support transparent ripples
* Update changelog
* Test rect as base
* Replace fab transition with generic fade scale transition
* Add scalexy func
* Add scaleXY
* Add arguments to fadeScaleTransition
* Clean up ink indicator
* Create setOnSingleTapListener
* Fix lint and add rndColor
* Create kotterknife resettables
* Add readme and missing object
* Create lazy resettable registered
* Update core docs
* Opt for separate class for resettable registry
* Clean up resettable registry
* Rename functions
* Add ripple callback listener
* Adjust kprefactivity desc color
* Add more transitions
* Add delete keys option
* Add instrumentation tests
* switch id
* Revert automatic instrumental tests
* Generify imagepickercore and prepare video alternative
* Create working video picker
* Address possible null issue
* Update searchview
* Make layouts public
* Add changelog test
* Update logo link
* Add custom color gif
Diffstat (limited to 'sample')
-rw-r--r-- | sample/build.gradle | 2 | ||||
-rw-r--r-- | sample/src/main/AndroidManifest.xml | 10 | ||||
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt | 13 | ||||
-rw-r--r-- | sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt | 17 | ||||
-rw-r--r-- | sample/src/main/res/values/strings.xml | 4 | ||||
-rw-r--r-- | sample/src/main/res/xml/kau_changelog.xml | 18 |
6 files changed, 46 insertions, 18 deletions
diff --git a/sample/build.gradle b/sample/build.gradle index 3350b3b..d20a972 100644 --- a/sample/build.gradle +++ b/sample/build.gradle @@ -84,7 +84,7 @@ dependencies { compile project(':core-ui') compile project(':kpref-activity') compile project(':searchview') - compile project(':imagepicker') + compile project(':mediapicker') androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) 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" /> |