2021-07-15 16:45:25 +00:00
|
|
|
package com.lagradost.cloudstream3.ui.download
|
2021-04-30 17:20:15 +00:00
|
|
|
|
|
|
|
import android.os.Bundle
|
|
|
|
import android.view.LayoutInflater
|
|
|
|
import android.view.View
|
|
|
|
import android.view.ViewGroup
|
|
|
|
import android.widget.TextView
|
|
|
|
import androidx.fragment.app.Fragment
|
|
|
|
import androidx.lifecycle.Observer
|
|
|
|
import androidx.lifecycle.ViewModelProvider
|
|
|
|
import com.lagradost.cloudstream3.R
|
|
|
|
|
2021-07-15 16:45:25 +00:00
|
|
|
class DownloadFragment : Fragment() {
|
2021-04-30 17:20:15 +00:00
|
|
|
|
2021-07-15 16:45:25 +00:00
|
|
|
private lateinit var notificationsViewModel: DownloadViewModel
|
2021-04-30 17:20:15 +00:00
|
|
|
|
|
|
|
override fun onCreateView(
|
|
|
|
inflater: LayoutInflater,
|
|
|
|
container: ViewGroup?,
|
|
|
|
savedInstanceState: Bundle?
|
|
|
|
): View? {
|
|
|
|
notificationsViewModel =
|
2021-07-15 16:45:25 +00:00
|
|
|
ViewModelProvider(this).get(DownloadViewModel::class.java)
|
2021-04-30 17:20:15 +00:00
|
|
|
val root = inflater.inflate(R.layout.fragment_notifications, container, false)
|
|
|
|
val textView: TextView = root.findViewById(R.id.text_notifications)
|
|
|
|
notificationsViewModel.text.observe(viewLifecycleOwner, Observer {
|
|
|
|
textView.text = it
|
|
|
|
})
|
|
|
|
return root
|
|
|
|
}
|
|
|
|
}
|