This library contains a mixture of small helper classes, functions and views useful for Android projects.
- ArrayExtensions – Provides a Kotlin extension function for checking whether an
Arraycontains any of the elements of another array. - CollectionExtensions – Provides a Kotlin extension function for checking whether a
Collectioncontains any of the elements of another collection. - ImmutableList – Provides a helper method for creating immutable copies of
java.util.Listinstances - ImmutableMap – Provides a helper method for creating immutable copies of
java.util.Mapinstances. - ImmutableSet – Provides a helper method for creating immutable copies of
java.util.Setinstances. - ListExtensions – Provides a Kotlin extension function for joining a
ListofStringobjects into a singleStringobject.
- Colors – Provides a number of Kotlin extension functions for converting between different colour representations.
- Dimensions – Provides a number of Kotlin extension functions for converting between different dimension units.
- Themes – Provides a number of Kotlin extension functions for getting colours such as the primary text colour out of the theme.
- DialogFragmentExtensions – Provides a Kotlin extension function which allows a
DialogFragmentto be shown even after the activity's state has been saved.
- NetworkInspector – Provides helper methods for checking the state of the network.
- StreamCopier – Provides an easy method for copying the contents of an input stream to an output stream.
- StringInputStream – Provides an easy method for reading in the contents of an input stream and converting it to a
Stringinstance. - StringOutputStream – Provides an easy method for writing a
Stringinstance to an output stream.
- CharSequenceExtensions – Provides a number of Kotlin extension functions for the
CharSequenceclass. - SpannableExtensions – Provides a number of Kotlin extension functions for adding spans to an
android.text.Spannableinstance. - SpannableStringBuilderExtensions – Provides a number of Kotlin extension functions for adding spans to an
android.text.SpannableStringBuilderinstance.
- RecyclerViewExtensions – Provides Kotlin extension functions for drawing a colored divider or a vertical gap between items in a
RecyclerView. - SimpleTouchListener – An implementation of the
android.view.View.OnTouchListenerinterface that simply reports when aandroid.view.Viewis touched down and when the touch is subsequently released or canceled. - SpinnerLookalikeView – An extension of the
android.widget.FrameLayoutclass that looks like anandroid.widget.Spinnerview.
To use the above utilities within your app simply add the following repository and dependency declaration in the build.gradle file of your Android project:
repositories { mavenCentral() } dependencies { implementation 'com.tazkiyatech:android-utils:0.2.5' }