diff options
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/ImageActivity.kt | 10 | ||||
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/activities/IntroActivity.kt | 21 |
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) { |