aboutsummaryrefslogtreecommitdiff
path: root/sample/src/main/kotlin/ca/allanwang
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2018-01-01 23:22:51 -0500
committerAllan Wang <me@allanwang.ca>2018-01-01 23:22:51 -0500
commit71f5dc2f7ce5b8183421586e6a77be65040a4dff (patch)
treefedd18e271463ce2430637a9913e8470e84181ce /sample/src/main/kotlin/ca/allanwang
parentf94d6f9694973c2a323e565794d948002593df0a (diff)
downloadkau-71f5dc2f7ce5b8183421586e6a77be65040a4dff.tar.gz
kau-71f5dc2f7ce5b8183421586e6a77be65040a4dff.tar.bz2
kau-71f5dc2f7ce5b8183421586e6a77be65040a4dff.zip
Format everything and use reified generics
Diffstat (limited to 'sample/src/main/kotlin/ca/allanwang')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt2
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt11
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt1
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt2
4 files changed, 8 insertions, 8 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 2ba3366..c0f928f 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/AnimActivity.kt
@@ -50,7 +50,7 @@ class AnimActivity : KauBaseActivity() {
}
override fun onBackPressed() {
- startActivity(MainActivity::class.java, bundleBuilder = {
+ startActivity<MainActivity>(bundleBuilder = {
withSlideOut(this@AnimActivity)
})
}
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 e735b38..6784705 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -162,22 +162,23 @@ class MainActivity : KPrefActivity() {
}
plainText(R.string.image_showcase) {
- onClick = { kauLaunchMediaPicker(ImagePickerActivity::class.java, REQUEST_MEDIA) }
+ onClick = { kauLaunchMediaPicker<ImagePickerActivity>(REQUEST_MEDIA) }
}
plainText(R.string.video_overlay_showcase) {
- onClick = { kauLaunchMediaPicker(VideoPickerActivityOverlay::class.java, REQUEST_MEDIA) }
+ onClick = { kauLaunchMediaPicker<VideoPickerActivityOverlay>(REQUEST_MEDIA) }
}
plainText(R.string.adapter_showcase) {
- onClick = { startActivity(AdapterActivity::class.java, bundleBuilder = {
+ onClick = {
+ startActivity<AdapterActivity>(bundleBuilder = {
withSceneTransitionAnimation(this@MainActivity)
})
}
}
plainText(R.string.kau_about_app) {
- onClick = { kauLaunchAbout(AboutActivity::class.java) }
+ onClick = { kauLaunchAbout<AboutActivity>() }
}
header(R.string.long_prefs)
@@ -268,7 +269,7 @@ class MainActivity : KPrefActivity() {
backgroundColor(KPrefSample.bgColor)
positiveColor(KPrefSample.accentColor)
}
- R.id.action_settings -> startActivity(AnimActivity::class.java)
+ R.id.action_settings -> startActivity<AnimActivity>()
R.id.action_email -> sendEmail(R.string.your_email, R.string.your_subject)
else -> return super.onOptionsItemSelected(item)
}
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt
index 8853c86..6060245 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/SampleApp.kt
@@ -1,7 +1,6 @@
package ca.allanwang.kau.sample
import android.app.Application
-import ca.allanwang.kau.logging.KL
/**
* Created by Allan Wang on 2017-06-08.
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt
index da088cf..bc2d4a4 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/SwipeActivity.kt
@@ -15,7 +15,7 @@ import ca.allanwang.kau.utils.*
private const val SWIPE_EDGE = "swipe_edge"
fun Activity.startActivityWithEdge(flag: Int) {
- startActivity(SwipeActivity::class.java) {
+ startActivity<SwipeActivity> {
putExtra(SWIPE_EDGE, flag)
}
}