package com.zswc.creativity.vmodel


import android.app.Application
import android.view.inputmethod.EditorInfo
import androidx.databinding.Bindable
import com.zswc.creativity.BR
import com.ysnows.base.base.BRRepository
import com.ysnows.base.base.BRViewModel

open abstract class SearchVModel(application: Application) : BRViewModel<BRRepository>(application) {
    @Bindable
    var k: String = ""
        set(value) {
            field = value
            notifyPropertyChanged(BR.k)
        }

    fun onAction(actionId: Int): Boolean {
        if (actionId == EditorInfo.IME_ACTION_SEARCH) {
            firstReq()
        }
        return false
    }

}
