Skip to content

Instantly share code, notes, and snippets.

@kobeumut
Created September 8, 2017 14:21
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 kobeumut/87419aac0550f9d08343b2d5d37384eb to your computer and use it in GitHub Desktop.
Save kobeumut/87419aac0550f9d08343b2d5d37384eb to your computer and use it in GitHub Desktop.
Add custom or absent view groups to Anko DSL
inline fun ViewManager.lottieAnimationView() = lottieAnimationView {}
inline fun ViewManager.lottieAnimationView(theme: Int = 0, init: LottieAnimationView.() -> Unit) = ankoView({ LottieAnimationView(it) }, theme, init)
//then use it
frameLayout {
lottieAnimationView()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment