我将遵循本文第https://proandroiddev.com/detecting-when-an-android-app-backgrounds-in-2018-4b5a94977d5c条来实现android lifecycle,但这是一个在java上具有应用程序类的遗留应用程序.
我如何用java实现这个kotlin代码?
private val lifecycleListener: SampleLifecycleListener by lazy {
SampleLifecycleListener()
}
I feel that is a dumb question, but I'm not familiar with lazy initialization and I'm not sure how to search this question, any "lazy theory link" will be welcome also.