package com.xyzshell.myphoneinfo.dashboard

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.xyzshell.myphoneinfo.R
import com.xyzshell.myphoneinfo.databinding.ActivitySensorEachBinding
import com.xyzshell.myphoneinfo.dialog.CustomPopView

class SensorEachActivity : AppCompatActivity() {
    companion object{
        const val TOP_TITLE = "title"
    }
    private lateinit var customPopView: CustomPopView
    private lateinit var binding: ActivitySensorEachBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = ActivitySensorEachBinding.inflate(layoutInflater)
        setContentView(binding.root)
        val stringExtra = intent.getStringExtra(TOP_TITLE)
        binding.title.text = stringExtra
        binding.imgBack.setOnClickListener {
            finish()
        }
        customPopView =CustomPopView(this,4,callback = {text->

        })
        binding.imageTool.setOnClickListener {
            customPopView.show(binding.imageTool)
        }
        initText()
    }

    private fun initText() {
        binding.infoText1.textTitle.text = getString(R.string.manufacturer)
        binding.infoText2.textTitle.text = getString(R.string.model)
        binding.infoText3.textTitle.text = getString(R.string.resolution)
        binding.infoText4.textTitle.text = getString(R.string.maximum_range)
        binding.infoText5.textTitle.text = getString(R.string.power)
        binding.infoText6.textTitle.text = getString(R.string.wakeup_sensor)
    }
}