This module contains different extensions and utilities to improve working with UI.
- AnimatorExtensions (originally based on Ktx Animator)
- ViewAnimationsExtensions, provides extension functions to create easy animations.
imageView reavealTo otherImageView- ViewPropertyAnimator, the same as
AnimatorExtensionsbut forViewPropertyAnimator.
imageView.animate().alpha(1f).doOnEnd{}- DividerItemDecoration
DividerItemDecoration is a RecyclerView.ItemDecoration that can be used as a divider
between items of a android.support.v7.widget.LinearLayoutManager
It supports android.support.v7.widget.LinearLayoutManager.VERTICAL orientation.
Can be used with custom divider drawable.
Also provides ability to notify if decoration for last item in list is needed.
See sample usage
- EditTextExtensions, provides functions to work with different
InputFiltersin easy way
editText.applyFilterOnlyDigits()- KeyboardExtensions, provide functions to show and hide keyboard
editText.showKeyboard()
//or
activity.showKeyboard()-
ScreenExtensions, provides a set of functions to convert
pxtodporspin both way. See sample usage -
ViewExtensions, provides set of extensions for
View.
someView.hide()
someView.show()
someView.toggleView(true)
- WindowExtensions, provides extensions to set
fitsSystemWindowsfor window content view, and set status bar color.
window.setStatusBarColor(Color.RED)FragmentManagerExtensions provides set of extensions to quick and easy adding, replacing fragments.
fragmentManager.addScreen(SomeFragment.newInstance(),R.id.fragmentContainer)QuickToastExtensions provides few methods to quick show any string as toast.
"Some toast message".showToast(context)Contains custom widgets:TextView,EditText, Button, and Switch
that can work with custom typeface.
For full list of functions and classes, please look to the source code, or view documentation.