All Downloads are FREE. Search and download functionalities are using the official Maven repository.

androidMain.tech.skot.core.components.SKFrameViewProxy.kt Maven / Gradle / Ivy

There is a newer version: 1.2.9
Show newest version
package tech.skot.core.components

import android.widget.FrameLayout
import androidx.fragment.app.Fragment
import tech.skot.view.live.MutableSKLiveData

class SKFrameViewProxy(
        override val screens: Set>,
        screenInitial: SKScreenViewProxy<*>?
) : SKComponentViewProxy(), SKFrameVC {

    private val screenLD = MutableSKLiveData(screenInitial)
    override var screen: SKScreenVC?
        get() = screenLD.value
        set(value) = screenLD.postValue(value as SKScreenViewProxy<*>)



    override fun bindTo(activity: SKActivity, fragment: Fragment?, binding: FrameLayout) =
            SKFrameView(this, activity, fragment, binding, screens).apply {
                screenLD.observe {
                    onScreen(it)
                }
            }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy