mirror of https://github.com/lizongying/my-tv.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
37 lines
1.1 KiB
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.LoadingBinding
|
|
|
|
class LoadingFragment : Fragment() {
|
|
private var _binding: LoadingBinding? = null
|
|
private val binding get() = _binding!!
|
|
|
|
override fun onCreateView(
|
|
inflater: LayoutInflater, container: ViewGroup?,
|
|
savedInstanceState: Bundle?
|
|
): View {
|
|
_binding = LoadingBinding.inflate(inflater, container, false)
|
|
|
|
val application = requireActivity().applicationContext as MyTVApplication
|
|
|
|
binding.bar.layoutParams.width = application.px2Px(binding.bar.layoutParams.width)
|
|
binding.bar.layoutParams.height = application.px2Px(binding.bar.layoutParams.height)
|
|
|
|
(activity as MainActivity).fragmentReady(TAG)
|
|
return binding.root
|
|
}
|
|
|
|
override fun onDestroyView() {
|
|
super.onDestroyView()
|
|
_binding = null
|
|
}
|
|
|
|
companion object {
|
|
private const val TAG = "LoadingFragment"
|
|
}
|
|
} |