package com.xty.server.act

import android.text.Html
import android.view.View
import com.alibaba.android.arouter.facade.annotation.Route
import com.xty.base.act.IBaseAct
import com.xty.common.arouter.ARouterUrl
import com.xty.network.model.GuidBean
import com.xty.server.databinding.ActGuidDetailBinding
import com.xty.server.databinding.ActGuildBinding


/**
 * 富文本加载
 * 指南详情
 */
@Route(path = ARouterUrl.GUIDE_DETAIL)
class GuidDetailAct: IBaseAct() {
    val binding by lazy{ActGuidDetailBinding.inflate(layoutInflater)}
    override fun setLayout()=binding.root
    override fun initData() {
        super.initData()
        isDarkBar=true

        intent.extras?.let {
            var bean=it.getSerializable("bean") as GuidBean
            binding.title.mTvTitle.text=bean.name
            binding.mContent.text=Html.fromHtml(bean.content)
        }
    }

    override fun initView() {
        super.initView()
        statusBar(binding.title.mView)
        binding.title.mIvBack.setOnClickListener { finish() }
    }
}