package com.yidian.yac.newscontent.ui

import android.os.Bundle
import androidx.core.os.bundleOf
import com.yidian.yac.newscontent.R
import kotlinx.android.synthetic.main.fragment_channel.*

class ChannelFragment:AChannelFragment() {
    companion object{
        private const val CHANNEL_NAME = "CHANNEL_NAME"
        fun newInstance(name:String):AChannelFragment{
            val fragment = ChannelFragment()
            val args = bundleOf(Pair(CHANNEL_NAME,name))
            fragment.arguments = args
            return fragment
        }
    }

    override val contentViewId: Int
        get() = R.layout.fragment_channel

    override fun init(savedInstanceState: Bundle?) {
        super.init(savedInstanceState)
        channelName = arguments?.getString(CHANNEL_NAME)?:"ChannelFragment"
        tv_channelName.text = channelName
    }
}