Skip to content

Instantly share code, notes, and snippets.

@yoobi
yoobi / CustomClass.kt
Created September 30, 2022 19:54
Difference between DisposableEffect and DefaultLifecycleObserver
class CustomClass(
private val text: String,
private val lifecycleOwner: LifecycleOwner
): DefaultLifecycleObserver {
init {
lifecycleOwner.lifecycle.addObserver(this)
}
override fun onCreate(owner: LifecycleOwner) {
@yoobi
yoobi / CustomGlide.kt
Last active April 29, 2020 09:19
TLS 1.2 for Retrofit, Glide and Exoplayer // https://stackoverflow.com/q/61459509
/* Important:
You'll need to add these implentation in your gradle
implementation 'com.github.bumptech.glide:annotations:4.11.0'
implementation('com.github.bumptech.glide:okhttp3-integration:4.11.0'){
exclude group: 'glide-parent'
}
*/