diff options
author | Allan Wang <me@allanwang.ca> | 2018-12-24 00:21:21 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-24 00:21:21 -0500 |
commit | c45b30e28f451699f3be828a1201260ed27e321e (patch) | |
tree | 59770f7f001c1488299d0680aa7edd2135bc45ca /app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt | |
parent | 9a40780c3baffcef381e4575f7c28b4b5fb4a56b (diff) | |
download | frost-c45b30e28f451699f3be828a1201260ed27e321e.tar.gz frost-c45b30e28f451699f3be828a1201260ed27e321e.tar.bz2 frost-c45b30e28f451699f3be828a1201260ed27e321e.zip |
Update/bindview (#1258)
* Update bindview for FrostVideoViewer
* Remove more bindview usages
* Fix compilation problems
* Remove custom drawer header
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt index 42630d79..3e40b6ba 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/intro/IntroFragmentTheme.kt @@ -2,34 +2,29 @@ package com.pitchedapps.frost.intro import android.os.Bundle import android.view.View -import ca.allanwang.kau.utils.bindViewResettable import ca.allanwang.kau.utils.scaleXY import com.pitchedapps.frost.R import com.pitchedapps.frost.activities.IntroActivity import com.pitchedapps.frost.enums.Theme import com.pitchedapps.frost.utils.Prefs +import kotlinx.android.synthetic.main.intro_theme.* /** * Created by Allan Wang on 2017-07-28. */ class IntroFragmentTheme : BaseIntroFragment(R.layout.intro_theme) { - val light: View by bindViewResettable(R.id.intro_theme_light) - val dark: View by bindViewResettable(R.id.intro_theme_dark) - val amoled: View by bindViewResettable(R.id.intro_theme_amoled) - val glass: View by bindViewResettable(R.id.intro_theme_glass) - val themeList - get() = listOf(light, dark, amoled, glass) + get() = listOf(intro_theme_light, intro_theme_dark, intro_theme_amoled, intro_theme_glass) - override fun viewArray(): Array<Array<out View>> = arrayOf(arrayOf(title), arrayOf(light, dark), arrayOf(amoled, glass)) + override fun viewArray(): Array<Array<out View>> = arrayOf(arrayOf(title), arrayOf(intro_theme_light, intro_theme_dark), arrayOf(intro_theme_amoled, intro_theme_glass)) override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - light.setThemeClick(Theme.LIGHT) - dark.setThemeClick(Theme.DARK) - amoled.setThemeClick(Theme.AMOLED) - glass.setThemeClick(Theme.GLASS) + intro_theme_light.setThemeClick(Theme.LIGHT) + intro_theme_dark.setThemeClick(Theme.DARK) + intro_theme_amoled.setThemeClick(Theme.AMOLED) + intro_theme_glass.setThemeClick(Theme.GLASS) val currentTheme = Prefs.theme - 1 if (currentTheme in 0..3) themeList.forEachIndexed { index, v -> v.scaleXY = if (index == currentTheme) 1.6f else 0.8f } |