31 lines
1.0 KiB
Kotlin
31 lines
1.0 KiB
Kotlin
package com.lagradost.cloudstream3.ui.notifications
|
|
|
|
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
|
|
|
|
class NotificationsFragment : Fragment() {
|
|
|
|
private lateinit var notificationsViewModel: NotificationsViewModel
|
|
|
|
override fun onCreateView(
|
|
inflater: LayoutInflater,
|
|
container: ViewGroup?,
|
|
savedInstanceState: Bundle?
|
|
): View? {
|
|
notificationsViewModel =
|
|
ViewModelProvider(this).get(NotificationsViewModel::class.java)
|
|
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
|
|
}
|
|
} |