DataBinding 正则展示

    

fragment 中使用databinding
override fun onCreateView(
inflater: LayoutInflater,
container: ViewGroup?,
savedInstanceState: Bundle?
): View? {
binding = DataBindingUtil.inflate(
LayoutInflater.from(context),
R.layout.fragment_text, null, false
)
binding?.lifecycleOwner = this
binding?.tlTop?.addTab(binding?.tlTop?.newTab()!!.setText("视频"))
binding?.tlTop?.addTab(binding?.tlTop?.newTab()!!.setText("播单"))
return binding?.root
}

你可能感兴趣的:(DataBinding 正则展示)