Skip to content

Instantly share code, notes, and snippets.

@muzafakar
Created October 14, 2019 14:42
Show Gist options
  • Save muzafakar/a9863a95dc8039853b01b7a7be3a790f to your computer and use it in GitHub Desktop.
Save muzafakar/a9863a95dc8039853b01b7a7be3a790f to your computer and use it in GitHub Desktop.
class OnBoardingItemFragment : Fragment() {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? =
inflater.inflate(R.layout.fragment_on_boarding_item, container, false)
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
arguments?.let {
val animationId = it.getInt(LOTTIE)
lavOnBoarding.setAnimation(animationId)
val text = it.getInt(TEXT)
tvOnBoarding.text = getString(text)
}
}
companion object {
const val LOTTIE = "Lottie"
const val TEXT = "Text"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment