This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apply plugin: 'com.android.application' | |
android.applicationVariants.all { variant -> | |
task "copyDependencies${variant.name.capitalize()}"() { | |
outputs.upToDateWhen { false } | |
doLast { | |
println "Executing copyDependencies${variant.name.capitalize()}" | |
variant.getCompileClasspath().each { fileDependency -> | |
def sourcePath = fileDependency.absolutePath | |
def destinationPath = project.projectDir.path + "/build/dependencies/${variant.name}/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed class TabbedListState | |
class InProgressState : TabbedListState() | |
class FinishedState : TabbedListState() | |
data class ErrorState(val errorMessage: String, | |
val errorColor: Int) : TabbedListState() | |
data class ListState(val listElements: List<Element>, | |
val totalItems: Int, | |
val currentTabId: Int, | |
val tabs: List<TabElement>) : TabbedListState() | |
data class OfflineState(val listElements: List<Element>) : TabbedListState() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override fun onStart() { | |
viewModel.tabbedListLiveData.observe(this, Observer { | |
when (it) { | |
is ErrorState -> { | |
showProgress(false) | |
showErrorView(it.errorMessage, it.errorColor) | |
} | |
is InProgressState -> showProgress(true) | |
is OfflineState -> { |