AndroidUtil - README
"AndroidUtil" is an Android-library, which provides various utility classes for use in Android app development. The library currently provides the following features:
- The class
BitmapUtilprovides methods, which allow to create and edit bitmaps, e.g. clipping them. - The class
DisplayUtilprovides methods, which are related to a device's display metrics, e.g. converting DP values to pixel values and vice versa. - The class
ElevationUtilprovides methods, which can be used to emulate elevations of views on pre-Lollipop devices. The viewElevationShadowViewcan be used to easily visualize such an elevation within a layout. - The class
AppUtilprovides methods, which allow to start system apps. - The class
PermissionUtilprovides methods, which allow to handle runtime permissions. - The class
ViewUtilprovides methods, which allow to handle views. - The class
FileUtilprovides methods, which allow to handle files. - The class
ThreadUtilprovides methods, which allow to handle threads. - The class
ArrayUtilprovides methods, which allow to handle arrays. - The view
UnfocusableToolbarextends the AppCompat support library'sToolbarto enable touch events to be passed to other views in the event processing chain. - The view
SquareImageViewimplements anImageViewwhose height is enforced to be equal to its width. - The view
ScrimInsetsLayoutimplements a layout, which allows to show aDrawablein the insets, which are passed to itsfitSystemWindows-method. This can for example be used to implement a navigation drawer, which appears to be located behind the device's status bar. - The view
HeaderAndFooterGridViewextends the Android SDK'sGridViewwith the functionality to add header and footer views. - The view
ExpandableGridViewextends theHeaderAndFooterGridViewwith the ability to show multiple groups, which can be expanded to show their children. - The view
HeaderAndFooterRecyclerViewextends the RecyclerView Support library'sRecyclerViewwith the functionality to add header and footer views. - The class
AbstractSavedStatecan be used as a base class for storing the state of views. It is identical to the Android SDK's classandroid.view.AbsSavedState, but uses a custom class loader and is therefore suited for being used in library projects. - The class
Loggerallows to write log messages to Logcat. By applying a log level, log messages can be filtered depending on their priority. - The class
ViewHolderandAbstractViewHolderAdapterallow to use the view holder pattern in custom adapter implementations. - The class
DragHelperallows to measure the distance and speed of drag gestures. - The classes
ViewRecyclerandAttachedViewRecyclerallow to cache views in order to reuse them instead of inflating new instances. - The class
AbstractDataBinderallows to asynchronously load data in order to display it by using recyclable views.
This library depends on the library JavaUtil that provides additional utility classes.
License Agreement
This project is distributed under the Apache License version 2.0. For further information about this license agreement's content please refer to its full version, which is available at http://www.apache.org/licenses/LICENSE-2.0.txt.
Prior to version 1.4.3 this library was distributed under the GNU Lesser General Public License version 3.0 (GLPLv3).
Download
The latest release of this library can be downloaded as a zip archive from the download section of the project's Github page, which is available here. Furthermore, the library's source code is available as a Git repository, which can be cloned using the URL https://github.com/michael-rapp/AndroidUtil.git.
Alternatively, the library can be added to your Android app as a Gradle dependency by adding the following to the module's build.gradle file:
dependencies {
compile 'com.github.michael-rapp:android-util:2.1.0'
}
Contact information
For personal feedback or questions feel free to contact me via the mail address, which is mentioned on my Github profile. If you have found any bugs or want to post a feature request, please use the bugtracker to report them.