Skip to content

Instantly share code, notes, and snippets.

@Takhion
Last active April 10, 2019 13:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Takhion/2e1bee245aa22429f77ea60b92126df9 to your computer and use it in GitHub Desktop.
Save Takhion/2e1bee245aa22429f77ea60b92126df9 to your computer and use it in GitHub Desktop.
Expose `ViewModel.clear()`
@file:Suppress("PackageDirectoryMismatch")
package android.arch.lifecycle
fun ViewModel.clear() = clear()
package com.example
import android.arch.lifecycle.ViewModel
import android.arch.lifecycle.clear
fun test(viewModel: ViewModel) {
viewModel.clear()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment