Replaced 'fun getLifecycle' with 'val lifecycle'
This commit is contained in:
parent
65a8bb31ce
commit
ee44d8aa89
|
|
@ -12,7 +12,7 @@ dependencies {
|
||||||
constraints {
|
constraints {
|
||||||
implementation("androidx.appcompat:appcompat") {
|
implementation("androidx.appcompat:appcompat") {
|
||||||
version {
|
version {
|
||||||
require '1.0.2'
|
require '2.6.0'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -69,12 +69,13 @@ open class ViewController<TActivity : FragmentActivity, TState : Parcelable>(
|
||||||
|
|
||||||
val view: View = creationContext.inflater.inflate(layoutRes, creationContext.container, false)
|
val view: View = creationContext.inflater.inflate(layoutRes, creationContext.container, false)
|
||||||
|
|
||||||
|
override val lifecycle: Lifecycle
|
||||||
|
get() = fragment.viewLifecycleOwner.lifecycle
|
||||||
|
|
||||||
init {
|
init {
|
||||||
lifecycle.addObserver(LifecycleLoggingObserver(this))
|
lifecycle.addObserver(LifecycleLoggingObserver(this))
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getLifecycle(): Lifecycle = fragment.viewLifecycleOwner.lifecycle
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Look for a child view with the given id. If this view has the given id, return this view.
|
* Look for a child view with the given id. If this view has the given id, return this view.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue