I am using the Room database from Android architecture component. So for LiveData
I am implementing the LifecycleRegistryOwner
interface in my activity. As there is alternative solution to use LifeCyceActivity
but my activity is already extending BaseActivity
so I can't do it.
What is alternative of LifecycleRegistryOwner
?
As seen in docs
This interface was deprecated in API level 1.0.0.
Use android.support.v7.app.AppCompatActivity which extends LifecycleOwner, so there are no use cases for this class.
Which means, that if your activity is a descendent of AppCompatActivity
, than it already implements LifecycleOwner
interface.
These changes are introduced in support libs version 26.1.0.
From the docs :
This interface was deprecated in API level 1.0.0.
Use android.support.v7.app.AppCompatActivity which extends LifecycleOwner, so there are no use cases for this class.
Link here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With