package com.example.defenseapplication.liveVideo


import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.recyclerview.widget.LinearLayoutManager
import com.example.defenseapplication.databinding.LinkedUserSearchActivityBinding
import com.gyf.immersionbar.ImmersionBar

//搜索
class LinkedUserSearchActivity : AppCompatActivity() {

    private lateinit var binding: LinkedUserSearchActivityBinding

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = LinkedUserSearchActivityBinding.inflate(layoutInflater)
        setContentView(binding.root)

        ImmersionBar.with(this)
            .statusBarDarkFont(true)
            .titleBar(binding.topBar)
            .init()

        initListener()
        initData()
    }

    private fun initListener() {
        binding.ivBack.setOnClickListener {
            finish()
        }

        binding.btnSearch.setOnClickListener {
            initData()
        }
    }

    private fun initData() {
        val searchText = binding.etSearch.text.toString().trim()

        binding.rvSearchResult.layoutManager = LinearLayoutManager(this)

    }
}