mirror of
https://github.com/lizongying/my-tv.git
synced 2026-11-22 03:16:29 +08:00
add ysp
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.lizongying.mytv
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.fragment.app.Fragment
|
||||
import com.lizongying.mytv.databinding.InfoBinding
|
||||
|
||||
class InfoFragment : Fragment() {
|
||||
private var _binding: InfoBinding? = null
|
||||
private val binding get() = _binding!!
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater, container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
_binding = InfoBinding.inflate(inflater, container, false)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
fun setInfo(info: TV) {
|
||||
binding.textView.text = info.title
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
super.onDestroyView()
|
||||
_binding = null
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val TAG = "InfoFragment"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user