package com.example.defenseapplication.liveVideo

import android.content.Intent
import android.os.Bundle
import android.view.animation.AccelerateDecelerateInterpolator
import android.widget.ImageView
import android.widget.Toast
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.example.defenseapplication.R
import com.example.defenseapplication.databinding.SettingsActivityBinding
import com.example.defenseapplication.databinding.VoiceSettingsActivityBinding
import com.gyf.immersionbar.ImmersionBar

//语音设置
class VoiceSettingsActivity : AppCompatActivity() {

    private lateinit var binding: VoiceSettingsActivityBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = VoiceSettingsActivityBinding.inflate(layoutInflater)
        setContentView(binding.root)

        // ImmersionBar核心调用,沉浸式
        ImmersionBar.with(this)
            .statusBarDarkFont(true)
            .titleBar(binding.topBar)
            .init()

        binding.swWarningVoice.setOnCheckedChangeListener  { _, isChecked ->
            when(isChecked) {
                true -> {
                    // 打开开关业务逻辑
                }

                false -> {
                    // 关闭开关业务逻辑
                }
            }
        }
        binding.rlWarningContent.setOnClickListener {
            val intent= Intent(this, WarningVoiceContentActivity::class.java)
            startActivity(intent)
        }
        binding.ivBack.setOnClickListener {
            finish()
        }
    }

}