[6.7.0] wsit
This commit is contained in:
@@ -5,6 +5,8 @@ import android.util.AttributeSet
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import com.mogo.eagle.core.function.api.och.IOchFunctionCall
|
||||
import com.mogo.eagle.core.function.call.och.CallerOchFunctionCallManager
|
||||
import com.mogo.eagle.core.function.hmi.R
|
||||
import kotlinx.android.synthetic.main.view_bone_container.view.clBoneBiz
|
||||
import kotlinx.android.synthetic.main.view_bone_container.view.clBoneTab
|
||||
@@ -14,7 +16,11 @@ class BoneContainerView @JvmOverloads constructor(
|
||||
context: Context,
|
||||
attrs: AttributeSet? = null,
|
||||
defStyleAttr: Int = 0
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr) {
|
||||
) : ConstraintLayout(context, attrs, defStyleAttr), IOchFunctionCall {
|
||||
|
||||
companion object{
|
||||
private const val TAG = "BoneContainerView"
|
||||
}
|
||||
|
||||
init {
|
||||
LayoutInflater.from(context).inflate(R.layout.view_bone_container, this, true)
|
||||
@@ -23,6 +29,16 @@ class BoneContainerView @JvmOverloads constructor(
|
||||
|
||||
private var logOut: (() -> Unit)? = null
|
||||
|
||||
override fun onAttachedToWindow() {
|
||||
super.onAttachedToWindow()
|
||||
CallerOchFunctionCallManager.addListener(TAG, this)
|
||||
}
|
||||
|
||||
override fun onDetachedFromWindow() {
|
||||
super.onDetachedFromWindow()
|
||||
CallerOchFunctionCallManager.removeListener(TAG)
|
||||
}
|
||||
|
||||
private fun initView() {
|
||||
clBoneTab.loginOut {
|
||||
logOut?.invoke()
|
||||
|
||||
Reference in New Issue
Block a user