aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com
diff options
context:
space:
mode:
authorAllan Wang <me@allanwang.ca>2021-09-13 21:29:58 -0700
committerAllan Wang <me@allanwang.ca>2021-09-13 21:29:58 -0700
commitf5c5b17040c9469904ab25c7d348a865764d4aa2 (patch)
tree998a95ffede7e6d7f2963e11872f71b9d635b759 /app/src/main/kotlin/com
parent47fcc3a2947be85a57086f7621ef1bdfcbd8a404 (diff)
downloadfrost-f5c5b17040c9469904ab25c7d348a865764d4aa2.tar.gz
frost-f5c5b17040c9469904ab25c7d348a865764d4aa2.tar.bz2
frost-f5c5b17040c9469904ab25c7d348a865764d4aa2.zip
Test remaining activities
Diffstat (limited to 'app/src/main/kotlin/com')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt10
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt21
2 files changed, 17 insertions, 14 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
index e3b607a3..b8a71fa1 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt
@@ -227,11 +227,11 @@ class ImageActivity : KauBaseActivity() {
setState(FabStates.SHARE)
}
imagePhoto.setOnImageEventListener(object :
- SubsamplingScaleImageView.DefaultOnImageEventListener() {
- override fun onImageLoadError(e: Exception) {
- loadError(e)
- }
- })
+ SubsamplingScaleImageView.DefaultOnImageEventListener() {
+ override fun onImageLoadError(e: Exception) {
+ loadError(e)
+ }
+ })
activityThemer.setFrostColors {
themeWindow = false
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt
index 817eebe1..02b7fb9d 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt
@@ -28,6 +28,7 @@ import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentPagerAdapter
import androidx.viewpager.widget.ViewPager
import ca.allanwang.kau.internal.KauBaseActivity
+import ca.allanwang.kau.kotlin.lazyUi
import ca.allanwang.kau.utils.blendWith
import ca.allanwang.kau.utils.color
import ca.allanwang.kau.utils.fadeScaleTransition
@@ -82,14 +83,16 @@ class IntroActivity :
lateinit var binding: ActivityIntroBinding
private var barHasNext = true
- val fragments = listOf(
- IntroFragmentWelcome(),
- IntroFragmentTheme(),
- IntroAccountFragment(),
- IntroTabTouchFragment(),
- IntroTabContextFragment(),
- IntroFragmentEnd()
- )
+ private val fragments by lazyUi {
+ listOf(
+ IntroFragmentWelcome(),
+ IntroFragmentTheme(),
+ IntroAccountFragment(),
+ IntroTabTouchFragment(),
+ IntroTabContextFragment(),
+ IntroFragmentEnd()
+ )
+ }
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
@@ -130,7 +133,7 @@ class IntroActivity :
/**
* Transformations are mainly handled on a per view basis
- * This sifies it by making the first fragment fade out as the second fragment comes in
+ * This makes the first fragment fade out as the second fragment comes in
* All fragments are locked in position
*/
override fun transformPage(page: View, position: Float) {