package com.ytpm.hydtw.activity

import android.os.Bundle
import androidx.fragment.app.FragmentActivity
import com.gyf.immersionbar.ImmersionBar
import com.ytpm.hydtw.databinding.ActivityZixunInfoBinding

class ZizunInfoActivity : FragmentActivity() {

    private lateinit var binding: ActivityZixunInfoBinding
    private var title: String = ""
    private var content: String = ""

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

        ImmersionBar.with(this)
            .transparentStatusBar()
            .statusBarDarkFont(true)
            .titleBar(binding.bar)
            .init()

        setContentView(binding.root)

        title = intent.getStringExtra("title").toString()
        content = intent.getStringExtra("content").toString()

        initView()
    }

    private fun initView() {

        binding.back.setOnClickListener {
            finish()
        }

        binding.title.text = title
        binding.content.text = content
    }
}