Removed unused AndroidX lifecycle (only crashes on Android 4)
This commit is contained in:
parent
d892e5e0ef
commit
faf3a76734
|
@ -159,7 +159,6 @@ dependencies {
|
||||||
|
|
||||||
implementation "androidx.navigation:navigation-fragment:$androidXNavigationVersion"
|
implementation "androidx.navigation:navigation-fragment:$androidXNavigationVersion"
|
||||||
implementation "androidx.navigation:navigation-ui:$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-fragment-ktx:$androidXNavigationVersion"
|
||||||
implementation "androidx.navigation:navigation-ui-ktx:$androidXNavigationVersion"
|
implementation "androidx.navigation:navigation-ui-ktx:$androidXNavigationVersion"
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,6 @@ import android.widget.ImageButton
|
||||||
import androidx.appcompat.app.AlertDialog
|
import androidx.appcompat.app.AlertDialog
|
||||||
import androidx.appcompat.widget.SearchView
|
import androidx.appcompat.widget.SearchView
|
||||||
import androidx.fragment.app.Fragment
|
import androidx.fragment.app.Fragment
|
||||||
import androidx.lifecycle.ViewModelProviders
|
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
import kotlinx.android.synthetic.main.fragment_home.*
|
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 mnitmBalance: MenuItem
|
||||||
|
|
||||||
private lateinit var mnitmSearchTransactions: MenuItem
|
private lateinit var mnitmSearchTransactions: MenuItem
|
||||||
|
@ -77,7 +74,6 @@ class HomeFragment : Fragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
|
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 rootView = inflater.inflate(R.layout.fragment_home, container, false)
|
||||||
// val textView: TextView = root.findViewById(R.id.text_home)
|
// val textView: TextView = root.findViewById(R.id.text_home)
|
||||||
// homeViewModel.text.observe(this, Observer {
|
// homeViewModel.text.observe(this, Observer {
|
||||||
|
|
|
@ -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
|
|
||||||
}
|
|
Loading…
Reference in New Issue