Removed unused AndroidX lifecycle (only crashes on Android 4)

This commit is contained in:
dankito 2020-10-10 01:33:57 +02:00
parent d892e5e0ef
commit faf3a76734
3 changed files with 0 additions and 18 deletions

View File

@ -159,7 +159,6 @@ dependencies {
implementation "androidx.navigation:navigation-fragment:$androidXNavigationVersion"
implementation "androidx.navigation:navigation-ui:$androidXNavigationVersion"
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation "androidx.navigation:navigation-fragment-ktx:$androidXNavigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$androidXNavigationVersion"
}

View File

@ -10,7 +10,6 @@ import android.widget.ImageButton
import androidx.appcompat.app.AlertDialog
import androidx.appcompat.widget.SearchView
import androidx.fragment.app.Fragment
import androidx.lifecycle.ViewModelProviders
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.fragment_home.*
@ -40,8 +39,6 @@ class HomeFragment : Fragment() {
}
private lateinit var homeViewModel: HomeViewModel
private lateinit var mnitmBalance: MenuItem
private lateinit var mnitmSearchTransactions: MenuItem
@ -77,7 +74,6 @@ class HomeFragment : Fragment() {
}
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
homeViewModel = ViewModelProviders.of(this).get(HomeViewModel::class.java)
val rootView = inflater.inflate(R.layout.fragment_home, container, false)
// val textView: TextView = root.findViewById(R.id.text_home)
// homeViewModel.text.observe(this, Observer {

View File

@ -1,13 +0,0 @@
package net.dankito.banking.ui.android.home
import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
class HomeViewModel : ViewModel() {
private val _text = MutableLiveData<String>().apply {
value = "This is home Fragment"
}
val text: LiveData<String> = _text
}