package com.tools.device.devcheck.dashboard

import android.content.Intent
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.tools.device.devcheck.R
import com.tools.device.devcheck.databinding.ActivityTextBinding
import com.tools.device.devcheck.databinding.ActivityToolsBinding

class TextActivity : AppCompatActivity() {
    private lateinit var binding: ActivityTextBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding=ActivityTextBinding.inflate(layoutInflater)
        setContentView(binding.root)
       initView()
        initClick()
    }

    private fun initClick() {
        binding.toolItem5.root.setOnClickListener {
            intent=Intent(this, ColorsActivity::class.java)
            startActivity(intent)
        }
    }

    private fun initView(){
        binding.toolItem1.ivIcon.setImageResource(R.drawable.flash)
        binding.toolItem1.tvLabel.text=getString(R.string.flashlight)
        binding.toolItem1.ivEnd.setImageResource(R.drawable.vector)

        binding.toolItem2.ivIcon.setImageResource(R.drawable.vibration)
        binding.toolItem2.tvLabel.text=getString(R.string.vibration)
        binding.toolItem2.ivEnd.setImageResource(R.drawable.vector)

        binding.toolItem3.ivIcon.setImageResource(R.drawable.button)
        binding.toolItem3.tvLabel.text=getString(R.string.buttons)
        binding.toolItem3.ivEnd.setImageResource(R.drawable.vector)

        binding.toolItem4.ivIcon.setImageResource(R.drawable.multi)
        binding.toolItem4.tvLabel.text=getString(R.string.multitouch)
        binding.toolItem4.ivEnd.setImageResource(R.drawable.vector)

        binding.toolItem5.ivIcon.setImageResource(R.drawable.display)
        binding.toolItem5.tvLabel.text=getString(R.string.displays)
        binding.toolItem5.ivEnd.setImageResource(R.drawable.vector)

        binding.toolItem6.ivIcon.setImageResource(R.drawable.back)
        binding.toolItem6.tvLabel.text=getString(R.string.backlight)
        binding.toolItem6.ivEnd.setImageResource(R.drawable.vector)

        binding.toolItem7.ivIcon.setImageResource(R.drawable.light)
        binding.toolItem7.tvLabel.text=getString(R.string.light_sensor)
        binding.toolItem7.ivEnd.setImageResource(R.drawable.vector)

        binding.toolItem8.ivIcon.setImageResource(R.drawable.proxi)
        binding.toolItem8.tvLabel.text=getString(R.string.proximity)
        binding.toolItem8.ivEnd.setImageResource(R.drawable.vector)

        binding.toolItem9.ivIcon.setImageResource(R.drawable.acceler)
        binding.toolItem9.tvLabel.text=getString(R.string.accelerometer)
        binding.toolItem9.ivEnd.setImageResource(R.drawable.vector)
    }
}