AndroidUtil

Contains various utility classes for use in Android app development.

License

License

GroupId

GroupId

com.github.michael-rapp
ArtifactId

ArtifactId

android-util
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

aar
Description

Description

AndroidUtil
Contains various utility classes for use in Android app development.
Project URL

Project URL

https://github.com/michael-rapp/AndroidUtil
Source Code Management

Source Code Management

https://github.com/michael-rapp/AndroidUtil.git

Download android-util

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.michael-rapp/android-util/ -->
<dependency>
    <groupId>com.github.michael-rapp</groupId>
    <artifactId>android-util</artifactId>
    <version>2.1.0</version>
    <type>aar</type>
</dependency>
// https://jarcasting.com/artifacts/com.github.michael-rapp/android-util/
implementation 'com.github.michael-rapp:android-util:2.1.0'
// https://jarcasting.com/artifacts/com.github.michael-rapp/android-util/
implementation ("com.github.michael-rapp:android-util:2.1.0")
'com.github.michael-rapp:android-util:aar:2.1.0'
<dependency org="com.github.michael-rapp" name="android-util" rev="2.1.0">
  <artifact name="android-util" type="aar" />
</dependency>
@Grapes(
@Grab(group='com.github.michael-rapp', module='android-util', version='2.1.0')
)
libraryDependencies += "com.github.michael-rapp" % "android-util" % "2.1.0"
[com.github.michael-rapp/android-util "2.1.0"]

Dependencies

compile (5)

Group / Artifact Type Version
com.github.michael-rapp : java-util jar 2.5.0
androidx.annotation » annotation jar 1.1.0
androidx.appcompat » appcompat jar 1.1.0
androidx.legacy » legacy-support-v4 jar 1.0.0
androidx.recyclerview » recyclerview jar 1.1.0

Project Modules

There are no modules declared in this project.

AndroidUtil - README

API-Level License Donate

"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 BitmapUtil provides methods, which allow to create and edit bitmaps, e.g. clipping them.
  • The class DisplayUtil provides methods, which are related to a device's display metrics, e.g. converting DP values to pixel values and vice versa.
  • The class ElevationUtil provides methods, which can be used to emulate elevations of views on pre-Lollipop devices. The view ElevationShadowView can be used to easily visualize such an elevation within a layout.
  • The class AppUtil provides methods, which allow to start system apps.
  • The class PermissionUtil provides methods, which allow to handle runtime permissions.
  • The class ViewUtil provides methods, which allow to handle views.
  • The class FileUtil provides methods, which allow to handle files.
  • The class ThreadUtil provides methods, which allow to handle threads.
  • The class ArrayUtil provides methods, which allow to handle arrays.
  • The view UnfocusableToolbar extends the AppCompat support library's Toolbar to enable touch events to be passed to other views in the event processing chain.
  • The view SquareImageView implements an ImageView whose height is enforced to be equal to its width.
  • The view ScrimInsetsLayout implements a layout, which allows to show a Drawable in the insets, which are passed to its fitSystemWindows-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 HeaderAndFooterGridView extends the Android SDK's GridView with the functionality to add header and footer views.
  • The view ExpandableGridView extends the HeaderAndFooterGridView with the ability to show multiple groups, which can be expanded to show their children.
  • The view HeaderAndFooterRecyclerView extends the RecyclerView Support library's RecyclerView with the functionality to add header and footer views.
  • The class AbstractSavedState can be used as a base class for storing the state of views. It is identical to the Android SDK's class android.view.AbsSavedState, but uses a custom class loader and is therefore suited for being used in library projects.
  • The class Logger allows to write log messages to Logcat. By applying a log level, log messages can be filtered depending on their priority.
  • The class ViewHolder and AbstractViewHolderAdapter allow to use the view holder pattern in custom adapter implementations.
  • The class DragHelper allows to measure the distance and speed of drag gestures.
  • The classes ViewRecycler and AttachedViewRecycler allow to cache views in order to reuse them instead of inflating new instances.
  • The class AbstractDataBinder allows 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.

Versions

Version
2.1.0
2.0.2
2.0.1
2.0.0
1.21.0
1.20.3
1.20.2
1.20.1
1.20.0
1.19.0
1.18.3
1.18.2
1.18.1
1.18.0
1.17.2
1.17.1
1.17.0
1.16.0
1.15.4
1.15.3
1.15.2
1.15.1
1.15.0
1.14.0
1.13.0
1.12.3
1.12.2
1.12.1
1.12.0
1.11.1
1.11.0
1.10.1
1.10.0
1.9.0
1.8.1
1.8.0
1.7.0
1.6.1
1.6.0
1.5.0
1.4.11
1.4.10
1.4.9
1.4.8
1.4.7
1.4.6
1.4.5
1.4.4
1.4.3
1.4.2
1.4.1
1.4.0
1.3.2
1.3.1
1.3.0
1.2.4
1.2.3
1.2.2
1.2.1
1.2.0
1.1.0
1.0.0