diff options
author | Allan Wang <me@allanwang.ca> | 2019-12-26 16:49:06 -0800 |
---|---|---|
committer | Allan Wang <me@allanwang.ca> | 2019-12-26 16:49:06 -0800 |
commit | 6779b1118d9fd2f1e659679d9f2cad3127d0c822 (patch) | |
tree | a85a14a15b3cbd3a4f1bca16d414d91d3e817c1f /app/src/main/kotlin/com/pitchedapps/frost/enums | |
parent | 42a23c00ae98a0e4a6f493b7d6ce9a23d717e5f6 (diff) | |
download | frost-6779b1118d9fd2f1e659679d9f2cad3127d0c822.tar.gz frost-6779b1118d9fd2f1e659679d9f2cad3127d0c822.tar.bz2 frost-6779b1118d9fd2f1e659679d9f2cad3127d0c822.zip |
Switch to viewbinding and styles and prepare layout wrapper
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/enums')
-rw-r--r-- | app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt b/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt index a3a4c1a4..92aa93ab 100644 --- a/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt +++ b/app/src/main/kotlin/com/pitchedapps/frost/enums/MainActivityLayout.kt @@ -24,23 +24,20 @@ import com.pitchedapps.frost.utils.Prefs */ enum class MainActivityLayout( val titleRes: Int, - val layoutRes: Int, val backgroundColor: () -> Int, val iconColor: () -> Int ) { TOP_BAR(R.string.top_bar, - R.layout.activity_main, { Prefs.headerColor }, { Prefs.iconColor }), BOTTOM_BAR(R.string.bottom_bar, - R.layout.activity_main_bottom_tabs, { Prefs.bgColor }, { Prefs.textColor }); companion object { val values = values() // save one instance - operator fun invoke(index: Int) = values[index] + operator fun invoke(index: Int) = values.getOrElse(index) { TOP_BAR } } } |