aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2017-08-02 16:21:49 -0700
committerGitHub <noreply@github.com>2017-08-02 16:21:49 -0700
commit53382b44bb7ab7ccb559e96fd1f93c47020878ee (patch)
tree79c1862992f458ac52c1910b3a2e0c01cb7d5a5a /sample
parent7d894be6de118357ec908d2d171b6152ce67307d (diff)
downloadkau-53382b44bb7ab7ccb559e96fd1f93c47020878ee.tar.gz
kau-53382b44bb7ab7ccb559e96fd1f93c47020878ee.tar.bz2
kau-53382b44bb7ab7ccb559e96fd1f93c47020878ee.zip
Improve video prefetching (#17)
* Create base activity and add thumbnails to media picker * Add checker to see if requested permission is inside the manifest * Add faq parser with tests * Add kpref testers and expose sp * Test jitpack sample exclusion * Test caching * Improve glide caching
Diffstat (limited to 'sample')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt13
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml9
2 files changed, 13 insertions, 9 deletions
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 abf44d8..cd86d38 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
@@ -1,11 +1,11 @@
package ca.allanwang.kau.sample
import android.os.Bundle
-import android.support.v7.app.AppCompatActivity
+import ca.allanwang.kau.internal.KauBaseActivity
import ca.allanwang.kau.logging.KL
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.PERMISSION_CAMERA
import ca.allanwang.kau.permissions.kauRequestPermissions
import ca.allanwang.kau.swipe.SWIPE_EDGE_LEFT
import ca.allanwang.kau.swipe.kauSwipeOnCreate
@@ -23,7 +23,7 @@ import com.mikepenz.fastadapter.commons.adapters.FastItemAdapter
* Activity for animations
* Now also showcases permissions
*/
-class AnimActivity : AppCompatActivity() {
+class AnimActivity : KauBaseActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -32,7 +32,8 @@ class AnimActivity : AppCompatActivity() {
adapter.add(listOf(
PERMISSION_ACCESS_COARSE_LOCATION,
- PERMISSION_ACCESS_FINE_LOCATION
+ PERMISSION_ACCESS_FINE_LOCATION,
+ PERMISSION_CAMERA
).map { PermissionCheckbox(it) })
adapter.withOnClickListener { _, _, item, _ ->
KL.d("Perm Click")
@@ -62,8 +63,4 @@ class AnimActivity : AppCompatActivity() {
startActivitySlideOut(MainActivity::class.java)
}
- override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
- super.onRequestPermissionsResult(requestCode, permissions, grantResults)
- kauOnRequestPermissionsResult(permissions, grantResults)
- }
} \ No newline at end of file
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index 59d51c2..615f467 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -6,7 +6,14 @@
<item text="" />
-->
- <version title="v3.2.1"/>
+ <version title="v3.2.2"/>
+ <item text=":core: Add simple KauBaseActivity so that activities extending AppCompatActivity can have some default kau helpers implemented" />
+ <item text=":core: The permission manager will now notify you if you try to request a permission that isn\'t added to your manifest" />
+ <item text=":core: Create faq parser" />
+ <item text="Begin writing android tests" />
+ <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" />