Util
A collection of assorted utility classes.
Functions
Link copied to clipboard
Throws an java.lang.IllegalArgumentException if called on the main thread.
Link copied to clipboard
Throws an java.lang.IllegalArgumentException if called on a thread other than the main thread.
Link copied to clipboard
Link copied to clipboard
Null-safe equivalent of
a.equals(b)
.Link copied to clipboard
Creates a java.util.Queue of the given size using Glide's preferred implementation.
Link copied to clipboard
Returns the in memory size of the given Bitmap in bytes.
open fun getBitmapByteSize( width: Int, height: Int, config: Config): Int
Content copied to clipboard
Returns the in memory size of android.graphics.
Link copied to clipboard
Returns the number of bytes required to store each pixel of a Bitmap with the given
config
.Link copied to clipboard
Returns the allocated byte size of the given bitmap.
Link copied to clipboard
Returns a copy of the given list that is safe to iterate over and perform actions that may modify the original list.
Link copied to clipboard
Link copied to clipboard
Returns
true
if called on a background thread, false
otherwise.Link copied to clipboard
Returns
true
if called on the main thread, false
otherwise.Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Posts the given
runnable
to the UI thread using a shared Handler.Link copied to clipboard
Removes the given
runnable
from the UI threads queue if it is still queued.Link copied to clipboard
Returns the hex string of the given byte array representing a SHA256 hash.