aboutsummaryrefslogtreecommitdiff
path: root/sample/src
diff options
context:
space:
mode:
Diffstat (limited to 'sample/src')
-rw-r--r--sample/src/main/AndroidManifest.xml7
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt62
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePicker.kt11
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/ImagePickerActivity.kt8
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt4
-rw-r--r--sample/src/main/play/contactEmail1
-rw-r--r--sample/src/main/play/defaultLanguage1
-rw-r--r--sample/src/main/play/en-CA/listing/fulldescription3
-rw-r--r--sample/src/main/play/en-CA/listing/shortdescription1
-rw-r--r--sample/src/main/play/en-CA/listing/title1
-rw-r--r--sample/src/main/play/en-CA/whatsnew1
-rw-r--r--sample/src/main/res/mipmap-hdpi/ic_launcher.pngbin3418 -> 2316 bytes
-rw-r--r--sample/src/main/res/mipmap-hdpi/ic_launcher_round.pngbin4208 -> 0 bytes
-rw-r--r--sample/src/main/res/mipmap-mdpi/ic_launcher.pngbin2206 -> 0 bytes
-rw-r--r--sample/src/main/res/mipmap-mdpi/ic_launcher_round.pngbin2555 -> 0 bytes
-rw-r--r--sample/src/main/res/mipmap-xhdpi/ic_launcher.pngbin4842 -> 3053 bytes
-rw-r--r--sample/src/main/res/mipmap-xhdpi/ic_launcher_round.pngbin6114 -> 0 bytes
-rw-r--r--sample/src/main/res/mipmap-xxhdpi/ic_launcher.pngbin7718 -> 4750 bytes
-rw-r--r--sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.pngbin10056 -> 0 bytes
-rw-r--r--sample/src/main/res/mipmap-xxxhdpi/ic_launcher.pngbin10486 -> 6480 bytes
-rw-r--r--sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.pngbin14696 -> 0 bytes
-rw-r--r--sample/src/main/res/values/strings.xml4
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml15
23 files changed, 46 insertions, 73 deletions
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">
<activity
android:name=".MainActivity"
- android:label="@string/title_activity_main"
+ android:label="@string/app_name"
android:theme="@style/AppTheme.NoActionBar.Transparent">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -32,6 +32,9 @@
android:name=".ImagePickerActivity"
android:theme="@style/Kau.ImagePicker" />
<activity
+ android:name=".ImagePickerActivityOverlay"
+ android:theme="@style/Kau.ImagePicker.Overlay" />
+ <activity
android:name=".AdapterActivity"
android:theme="@style/Kau.Translucent.SlideBottom" />
</application>
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<PermissionCheckbox>()
- 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 <a href="https://allanwang.github.io/KAU/">KAU</a>, or Kotlin Android Utils.
+
+The project is open sourced on <a href="https://github.com/AllanWang/KAU">github</a> \ 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
--- a/sample/src/main/res/mipmap-hdpi/ic_launcher.png
+++ b/sample/src/main/res/mipmap-hdpi/ic_launcher.png
Binary files 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
--- a/sample/src/main/res/mipmap-hdpi/ic_launcher_round.png
+++ /dev/null
Binary files 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
--- a/sample/src/main/res/mipmap-mdpi/ic_launcher.png
+++ /dev/null
Binary files 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
--- a/sample/src/main/res/mipmap-mdpi/ic_launcher_round.png
+++ /dev/null
Binary files 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
--- a/sample/src/main/res/mipmap-xhdpi/ic_launcher.png
+++ b/sample/src/main/res/mipmap-xhdpi/ic_launcher.png
Binary files 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
--- a/sample/src/main/res/mipmap-xhdpi/ic_launcher_round.png
+++ /dev/null
Binary files 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
--- a/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
+++ b/sample/src/main/res/mipmap-xxhdpi/ic_launcher.png
Binary files 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
--- a/sample/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
+++ /dev/null
Binary files 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
--- a/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png
+++ b/sample/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Binary files 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
--- a/sample/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
+++ /dev/null
Binary files 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 @@
<resources>
- <string name="app_name">KPrefs</string>
- <string name="title_activity_main">MainActivity</string>
+ <string name="app_name">KAU</string>
<string name="header">This is a header</string>
<string name="desc">This is a description</string>
<string name="checkbox_1">Checkbox 1</string>
@@ -21,6 +20,7 @@
<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="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 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 @@
<item text="" />
-->
- <version title="v3.1"/>
- <item text=":core: Allow for nullable throwables when logging" />
- <item text="" />
- <item text="" />
+ <version title="v3.1.1"/>
+ <item text=":imagepicker: Add uri val to ImageModel" />
+ <item text=":imagepicker: Create bindings and overlay activity" />
+ <item text="Add showcase app to play store" />
<item text="" />
<item text="" />
<item text="" />
<item text="" />
+ <version title="v3.1.0"/>
+ <item text=":core: Allow for nullable throwables when logging" />
+ <item text=":core: Remove some extra DSL annotations" />
+ <item text=":kpref-activity: Bring down to minSdk 19 and fix compatibility" />
+ <item text=":adapter: Update readme for iitems and animators" />
+ <item text=":about: Move strings to private" />
+
<version title="v3.0"/>
<item text=":core: Add setPadding[x]" />
<item text=":core: [breaking] Replace update[x]Margin to setMargin[x]" />