Skip to content

Latest commit

 

History

History
79 lines (65 loc) · 2.41 KB

File metadata and controls

79 lines (65 loc) · 2.41 KB

Core UI

This module contains different extensions and utilities to improve working with UI.

Animation

  • AnimatorExtensions (originally based on Ktx Animator)
  • ViewAnimationsExtensions, provides extension functions to create easy animations.
imageView reavealTo otherImageView
  • ViewPropertyAnimator, the same as AnimatorExtensions but for ViewPropertyAnimator.
imageView.animate().alpha(1f).doOnEnd{}

Decor

  • 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

Extensions

  • EditTextExtensions, provides functions to work with different InputFilters in 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 px to dp or sp in both way. See sample usage

  • ViewExtensions, provides set of extensions for View.

someView.hide()
someView.show()
someView.toggleView(true)
  • WindowExtensions, provides extensions to set fitsSystemWindows for window content view, and set status bar color.
window.setStatusBarColor(Color.RED)

Fragments

FragmentManagerExtensions provides set of extensions to quick and easy adding, replacing fragments.

fragmentManager.addScreen(SomeFragment.newInstance(),R.id.fragmentContainer)

Toast

QuickToastExtensions provides few methods to quick show any string as toast.

"Some toast message".showToast(context)

Widgets

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.