package com.quansu.heifengwuliu.widget

import android.content.Context
import android.util.AttributeSet
import android.view.LayoutInflater
import android.widget.EditText
import android.widget.ImageView
import android.widget.TextView
import androidx.databinding.DataBindingUtil
import com.quansu.heifengwuliu.R
import com.quansu.heifengwuliu.databinding.WidgetSearchBinding
import com.ysnows.base.view.BView
import com.ysnows.base.view.BaseView

/**
 * 搜索的布局
 *Created by shihuiyun
 *on 2020/9/16
 */
class SearchView(context: Context, attrs: AttributeSet) :BaseLinearLayout(context,attrs) {
    private var binding: WidgetSearchBinding? = null
    private var view: BView? = null
    init {
        init(context)

    }
    private fun init(context: Context) {
        if (context is BaseView) {
            view = context as BView
        }
        binding = DataBindingUtil.inflate(LayoutInflater.from(context), R.layout.widget_search, this, true)
    }

    fun getEtName(): EditText? {
        return binding!!.etName
    }

    fun getIvDelete(): ImageView? {
        return binding!!.ivDelete
    }

    fun getTvSearch(): TextView? {
        return binding!!.tvSearch

    }
}
