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
package com.aidanvii7.mvvm | |
class UserViewModel(val firstName: String, val lastName: String) |
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
package com.aidanvii.extensions | |
fun Any.logD(message: String) = Logger.d(javaClass.simpleName, message) | |
interface LoggerDelegate { | |
fun d(tag: String, message: String) | |
} | |
interface CompositeLoggerDelegate : LoggerDelegate { | |
fun attachDelegate(delegate: LoggerDelegate) |
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
package com.aidanvii.extensions | |
import android.util.SparseArray | |
import java.util.* | |
val SparseArray<*>.max: Int get () = size() - 1; | |
inline fun <V> SparseArray<V>.forEachValue(action: (V) -> Unit): SparseArray<V> { | |
for (index in 0..max) { | |
val key = keyAt(index) |
NewerOlder