### RecyclerView Preloader Setup Source: https://bumptech.github.io/glide/int/recyclerview.html Implement `RecyclerViewPreloader` to preload images for a RecyclerView. This example shows a complete setup within a Fragment, including defining preload dimensions and providing a custom `PreloadModelProvider`. ```java public final class ImagesFragment extends Fragment { // These are totally arbitrary, pick sizes that are right for your UI. private final imageWidthPixels = 1024; private final imageHeightPixels = 768; // You will need to populate these urls somewhere... private List myUrls = ...; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View result = inflater.inflate(R.layout.images_fragment, container, false); PreloadSizeProvider sizeProvider = new FixedPreloadSizeProvider(imageWidthPixels, imageHeightPixels); PreloadModelProvider modelProvider = new MyPreloadModelProvider(); RecyclerViewPreloader preloader = new RecyclerViewPreloader<>( Glide.with(this), modelProvider, sizeProvider, 10 /*maxPreload*/); RecyclerView myRecyclerView = (RecyclerView) result.findViewById(R.id.recycler_view); myRecyclerView.addOnScrollListener(preloader); // Finish setting up your RecyclerView etc. myRecylerView.setLayoutManager(...); myRecyclerView.setAdapter(...); ... return result; } private class MyPreloadModelProvider implements PreloadModelProvider { @Override @NonNull public List getPreloadItems(int position) { String url = myUrls.get(position); if (TextUtils.isEmpty(url)) { return Collections.emptyList(); } return Collections.singletonList(url); } @Override @Nullable public RequestBuilder getPreloadRequestBuilder(String url) { return Glide.with(fragment) .load(url) .override(imageWidthPixels, imageHeightPixels); } } } ``` -------------------------------- ### Lifecycle Management - start() Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.gif/-gif-drawable/start.html The start method is used to initiate or resume lifecycle-bound operations within the Glide framework. ```APIDOC ## [METHOD] start() ### Description Initiates or resumes the lifecycle-bound operations for the associated component. ### Method open fun ### Endpoint com.bumptech.glide.manager.Lifecycle.start() ``` -------------------------------- ### begin Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request/-error-request-coordinator/index.html Starts an asynchronous load for the request. ```APIDOC ## begin ### Description Starts an asynchronous load. ### Method open fun ### Endpoint begin() ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Glide RequestBuilder Example Source: https://bumptech.github.io/glide/doc/options.html Demonstrates how to obtain a RequestBuilder from Glide. This is a common starting point for more complex image loading configurations. ```java RequestBuilder requestBuilder = Glide.with(fragment); ``` -------------------------------- ### POST /disklrucache/begin Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request/-error-request-coordinator/begin.html Starts an asynchronous load operation for the DiskLruCache. ```APIDOC ## POST /disklrucache/begin ### Description Starts an asynchronous load. ### Method POST ### Endpoint /disklrucache/begin ``` -------------------------------- ### Start Request Tracking Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.manager/-request-tracker/run-request.html Starts tracking the given request. Use this method to initiate an image loading or caching operation. ```kotlin open fun runRequest(request: Request) ``` -------------------------------- ### GET /build Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.cache/-memory-size-calculator/-builder/build.html Initializes and returns a new instance of MemorySizeCalculator. ```APIDOC ## build ### Description Initializes and returns a new instance of MemorySizeCalculator. ### Method GET ### Endpoint /build ### Response #### Success Response (200) - **MemorySizeCalculator** (object) - The initialized memory size calculator instance. ``` -------------------------------- ### Start Asynchronous Section Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util.pool/-glide-trace/begin-section-async.html Initiates an asynchronous tracing section. Returns an integer representing the start of the section, which should be used to end the section. ```kotlin open fun beginSectionAsync(tag: String): Int ``` -------------------------------- ### Initialize RecyclerViewPreloader Source: https://bumptech.github.io/glide/int/recyclerview.html Setup the RecyclerViewPreloader with a size provider and model provider. ```java private final imageWidthPixels = 1024; private final imageHeightPixels = 768; private List myUrls = ...; ... PreloadSizeProvider sizeProvider = new FixedPreloadSizeProvider(imageWidthPixels, imageHeightPixels); PreloadModelProvider modelProvider = new MyPreloadModelProvider(); RecyclerViewPreloader preloader = new RecyclerViewPreloader<>( Glide.with(this), modelProvider, sizeProvider, 10 /*maxPreload*/); ``` -------------------------------- ### onLoadStarted Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request/-request-future-target/on-load-started.html Callback for when a load is started. This callback should not be invoked directly. ```APIDOC ## onLoadStarted ### Description A callback that should never be invoked directly. ### Method open ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ``` -------------------------------- ### Run Sample Projects Source: https://bumptech.github.io/glide/dev/contributing.html Commands to build and run specific sample projects. ```bash ./gradlew :samples::run ``` ```bash ./gradlew :samples:flickr:run ``` -------------------------------- ### GET /util/getElapsedMillis Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util/-log-time/get-elapsed-millis.html Calculates the elapsed time in milliseconds since a specified start time. ```APIDOC ## GET /util/getElapsedMillis ### Description Returns the time elapsed since the given logTime in millis. ### Method GET ### Parameters #### Path Parameters - **logTime** (Long) - Required - The start time of the event. ### Response #### Success Response (200) - **result** (Double) - The elapsed time in milliseconds. ``` -------------------------------- ### Lifecycle.onStart Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.manager/-lifecycle-listener/on-start.html Documentation for the onStart lifecycle callback method. ```APIDOC ## onStart ### Description Callback for when onStart is called. This method is part of the LifecycleListener interface used to track component lifecycle events. ### Method void ### Parameters None ``` -------------------------------- ### onStart Method Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.manager/-target-tracker/on-start.html Callback for when onStart is called. ```APIDOC ## onStart ### Description Callback for when onStart is called. ### Method open fun onStart() ### Endpoint N/A ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Rewind and Get Data - ByteBufferGifDecoder Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.data/-data-rewinder/rewind-and-get.html Rewinds the wrapped data back to the beginning and returns the re-wound data. Use this when you need to re-read the data from the start. ```kotlin abstract fun rewindAndGet(): T ``` -------------------------------- ### Build Project Source: https://bumptech.github.io/glide/dev/contributing.html Standard command to build the project from the root directory. ```bash ./gradlew build ``` -------------------------------- ### Get Bitmap Instance Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.bitmap/-bitmap-resource/get.html Returns an instance of the wrapped resource. This does not have to be the same instance of the wrapped resource class and in fact it is often appropriate to return a new instance for each call. For example, Drawables should only be used by a single View at a time so each call to this method for Resources that wrap Drawables should always return a new Drawable. ```kotlin open fun get(): Bitmap ``` -------------------------------- ### Request.begin() Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request/-thumbnail-request-coordinator/begin.html Starts the request process, initiating the thumbnail request followed by the full request. ```APIDOC ## begin() ### Description Starts first the thumb request and then the full request. ### Method void ### Endpoint Request.begin() ``` -------------------------------- ### Get Disk Cache (Deprecated) Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.cache/-disk-lru-cache-wrapper/index.html Get a DiskCache in the given directory and size. ```kotlin open fun get(directory: File, maxSize: Long): DiskCache ``` -------------------------------- ### Get DiskLruCache Size Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request/-request-future-target/get-size.html Callback that should never be invoked directly. Use this to get the size of the DiskLruCache. ```kotlin open fun getSize(cb: SizeReadyCallback) ``` -------------------------------- ### Clone and Navigate to Glide Repository Source: https://bumptech.github.io/glide/dev/contributing.html Initial steps to set up the local development environment by cloning the repository. ```bash git clone https://github.com//glide.git cd glide ``` -------------------------------- ### Build and Run Glide Sample Apps Source: https://bumptech.github.io/glide/ref/samples.html Commands to build or execute specific sample applications from the Glide repository. ```bash ./gradlew :samples::build ``` ```bash ./gradlew :samples::run ``` ```bash ./gradlew :samples:flickr:run ``` ```bash ./gradlew :samples:gallery:run ``` ```bash ./gradlew :samples:giphy:run ``` ```bash ./gradlew :samples:svg:run ``` ```bash ./gradlew :samples:imgur:run ``` -------------------------------- ### onLoadStarted Method Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.target/-image-view-target/on-load-started.html Sets a placeholder drawable when a load is started. ```APIDOC ## onLoadStarted ### Description Sets the given android.graphics.drawable.Drawable on the view using setImageDrawable. ### Method open ### Endpoint N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Request Example N/A ### Response #### Success Response (200) N/A #### Response Example N/A ## Parameters - **placeholder** (Drawable) - The placeholder drawable to optionally show, or null. ``` -------------------------------- ### Glide v3 Library GlideModule Example Source: https://bumptech.github.io/glide/doc/migrating.html An example of a GlideModule in Glide v3 for a library, used for registering components. ```java public class VolleyGlideModule implements GlideModule { @Override public void applyOptions(Context context, GlideBuilder builder) { // Do nothing. } @Override public void registerComponents(Context context, Glide glide) { glide.register(GlideUrl.class, InputStream.class, new VolleyUrlLoader.Factory(context)); } } ``` -------------------------------- ### POST /build Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.cache/-disk-lru-cache-factory/build.html Initializes and returns a new disk cache instance. ```APIDOC ## POST /build ### Description Returns a new disk cache, or null if no disk cache could be created. ### Method POST ### Endpoint /build ### Response #### Success Response (200) - **DiskCache** (object) - A new instance of the disk cache or null. ``` -------------------------------- ### Glide v3 GlideModule Example Source: https://bumptech.github.io/glide/doc/migrating.html An example of a GlideModule in Glide v3, used for applying options and registering components. ```java public class GiphyGlideModule implements GlideModule { @Override public void applyOptions(Context context, GlideBuilder builder) { builder.setMemoryCache(new LruResourceCache(10 * 1024 * 1024)); } @Override public void registerComponents(Context context, Glide glide) { glide.register(Api.GifResult.class, InputStream.class, new GiphyModelLoader.Factory()); } } ``` -------------------------------- ### Start Thumbnail and Full Request Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request/-thumbnail-request-coordinator/begin.html Initiates both the thumbnail and the full-size image requests. This is useful for displaying a low-resolution preview while the high-resolution image loads. ```kotlin open fun begin() ``` -------------------------------- ### Start GIF Animation from First Frame Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.gif/-gif-drawable/start-from-first-frame.html Starts the GIF animation from its first frame. This method can only be invoked when the animation is not currently running. ```kotlin open fun startFromFirstFrame() ``` -------------------------------- ### GET /getDirty Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.bitmap_recycle/-bitmap-pool-adapter/get-dirty.html Retrieves a Bitmap from the pool that may contain random data, offering better performance than standard get methods when the caller intends to overwrite the entire Bitmap. ```APIDOC ## GET /getDirty ### Description Identical to get except that any returned android.graphics.Bitmap may not have been erased and may contain random data. If no Bitmap with the requested attributes is present in the pool, a new one will be allocated. ### Parameters #### Query Parameters - **width** (Int) - Required - The width in pixels of the desired android.graphics.Bitmap. - **height** (Int) - Required - The height in pixels of the desired android.graphics.Bitmap. - **config** (Config) - Required - The android.graphics.Bitmap.Config of the desired Bitmap. ### Response #### Success Response (200) - **Bitmap** (android.graphics.Bitmap) - A Bitmap with exactly the given width, height, and config potentially containing random image data. ``` -------------------------------- ### Transition.build Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.transition/-bitmap-container-transition-factory/build.html Builds a new Transition instance based on the data source and resource loading state. ```APIDOC ## build ### Description Returns a new Transition instance. ### Method open fun ### Parameters #### Path Parameters - **dataSource** (DataSource) - Required - The com.bumptech.glide.load.DataSource the resource was loaded from. - **isFirstResource** (Boolean) - Required - True if this is the first resource to be loaded into the target. ### Response - **Transition** - A new Transition instance. ``` -------------------------------- ### Get Dirty Bitmap from Pool Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.bitmap_recycle/-bitmap-pool-adapter/get-dirty.html Use this method when you are certain you will erase the Bitmap's contents before writing new data. It is slightly more efficient than `get` but may return a Bitmap with random data. ```kotlin open fun getDirty( width: Int, height: Int, config: Config): Bitmap ``` -------------------------------- ### Apply Default Request Options in Kotlin Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-request-manager/apply-default-request-options.html Updates the default RequestOptions for all loads started with this request manager. Options applied here win over those from setDefaultRequestOptions. Modified options only apply to loads started after this method is called. ```kotlin open fun applyDefaultRequestOptions(requestOptions: RequestOptions): RequestManager ``` -------------------------------- ### Using RequestBuilder Source: https://bumptech.github.io/glide/doc/migrating.html Example of configuring a load request with thumbnails and listeners using the RequestBuilder. ```java RequestBuilder requestBuilder = Glide.with(fragment) .load(url); requestBuilder .thumbnail(Glide.with(fragment) .load(thumbnailUrl)) .listener(requestListener) .load(url) .into(imageView); ``` -------------------------------- ### Constructor: MediaStoreVideoThumbLoader Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.model.stream/-media-store-video-thumb-loader/-media-store-video-thumb-loader.html Initializes a new instance of the MediaStoreVideoThumbLoader class. ```APIDOC ## MediaStoreVideoThumbLoader ### Description Initializes the loader used to retrieve video thumbnails from the Android MediaStore. ### Method Constructor ### Parameters #### Path Parameters - **context** (Context) - Required - The Android Context used to access the MediaStore. ``` -------------------------------- ### Handle Load Failures with .error() in Glide v4.3.0+ Source: https://bumptech.github.io/glide/doc/debugging.html Use the .error() method to specify a fallback request that starts only if the primary request fails. This prevents starting new loads within Target or RequestListener callbacks. ```java Glide.with(fragment) .load(url) .error(Glide.with(fragment) .load(fallbackUrl)) .into(imageView); ``` -------------------------------- ### Initialize Glide with Application Context Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-glide/with.html Use this method for resources used outside of the normal fragment or activity lifecycle, such as in services or for notification thumbnails. Loads started with the application context will not be started or stopped based on lifecycle events. ```kotlin open fun with(context: Context): RequestManager ``` -------------------------------- ### Begin Section Format with One Argument Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util.pool/-glide-trace/begin-section-format.html Starts a new trace section with a formatted string and one argument. Use this for detailed logging of operations. ```kotlin open fun beginSectionFormat(format: String, arg1: Any) ``` -------------------------------- ### NoTransition get() Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.transition/-no-transition/get.html Returns an instance of NoTransition. ```APIDOC ## GET NoTransition.get() ### Description Returns an instance of NoTransition. ### Method GET ### Endpoint /NoTransition/get ### Response #### Success Response (200) - **Transition** (Transition) - An instance of NoTransition. ``` -------------------------------- ### Begin Section Format with Three Arguments Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util.pool/-glide-trace/begin-section-format.html Starts a new trace section with a formatted string and three arguments. Ideal for logging complex operations with detailed context. ```kotlin open fun beginSectionFormat( format: String, arg1: Any, arg2: Any, arg3: Any) ``` -------------------------------- ### GET /getInstance Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.model/-unit-model-loader/get-instance.html Retrieves an instance of the UnitModelLoader. ```APIDOC ## GET /getInstance ### Description Retrieves an instance of the UnitModelLoader for the specified type. ### Method GET ### Endpoint /getInstance ### Response #### Success Response (200) - **UnitModelLoader** (Object) - The instance of the UnitModelLoader. ``` -------------------------------- ### MediaStoreFileLoader Constructor Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.model/-media-store-file-loader/index.html Initializes a new instance of the MediaStoreFileLoader. Requires a Context to operate. ```kotlin open fun MediaStoreFileLoader(context: Context) ``` -------------------------------- ### Lifecycle.onStart Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-request-manager/on-start.html Lifecycle callback that registers for connectivity events and restarts failed or paused requests. ```APIDOC ## [METHOD] onStart ### Description Lifecycle callback that registers for connectivity events (if the android.permission.ACCESS_NETWORK_STATE permission is present) and restarts failed or paused requests. ### Method void ### Endpoint com.bumptech.glide.manager.Lifecycle.onStart() ``` -------------------------------- ### DiskLruCache.getView Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.transition/-transition/-view-adapter/get-view.html Abstract method to get the wrapped android.view.View. ```APIDOC ## GET /websites/bumptech_github_io_glide/disklrucache/view ### Description Returns the wrapped android.view.View. ### Method GET ### Endpoint /websites/bumptech_github_io_glide/disklrucache/view ### Parameters None ### Response #### Success Response (200) - **view** (View) - The wrapped android.view.View. #### Response Example ```json { "view": "" } ``` ``` -------------------------------- ### Initialize MediaStoreSignature Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.signature/-media-store-signature/index.html Constructor for creating a new MediaStoreSignature instance. ```kotlin open fun MediaStoreSignature( mimeType: String, dateModified: Long, orientation: Int) ``` -------------------------------- ### Get Wrapped View Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.target/-custom-view-target/get-view.html Returns the wrapped android.view.View. ```kotlin fun getView(): T ``` -------------------------------- ### Implement onStart Callback Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.manager/-target-tracker/on-start.html Callback for when onStart is called. This is typically used in lifecycle-aware components. ```kotlin open fun onStart() Content copied to clipboard Callback for when onStart} or onStart is called. ``` -------------------------------- ### GET read() Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.bitmap/-recyclable-buffered-input-stream/read.html Reads a single byte from the stream. ```APIDOC ## GET read() ### Description Reads a single byte from this stream and returns it as an integer in the range from 0 to 255. Returns -1 if the end of the source string has been reached. ### Method GET ### Endpoint read() ### Response - **return** (Int) - The byte read or -1 if the end of the source stream has been reached. ### Throws - **java.io.IOException** - If this stream is closed or another IOException occurs. ``` -------------------------------- ### Glide Initialization with GlideBuilder Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-glide/init.html Use this method to initialize Glide with a custom `GlideBuilder`. This is the recommended approach for setting up Glide. ```kotlin open fun init(context: Context, builder: GlideBuilder) ``` -------------------------------- ### Begin Section Format with Two Arguments Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util.pool/-glide-trace/begin-section-format.html Starts a new trace section with a formatted string and two arguments. Useful for logging operations with multiple parameters. ```kotlin open fun beginSectionFormat( format: String, arg1: Any, arg2: Any) ``` -------------------------------- ### GET /asBitmapDrawable Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.bitmap/-drawable-transformation/as-bitmap-drawable.html Retrieves a transformation for BitmapDrawable objects. ```APIDOC ## GET /asBitmapDrawable ### Description Returns a Transformation for BitmapDrawable objects. ### Method GET ### Endpoint asBitmapDrawable() ### Response #### Success Response (200) - **Transformation** - The transformation object for BitmapDrawables. ``` -------------------------------- ### GET /BitmapDrawableEncoder/getEncodeStrategy Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.bitmap/-bitmap-drawable-encoder/index.html Retrieves the encoding strategy for the BitmapDrawableEncoder. ```APIDOC ## GET /BitmapDrawableEncoder/getEncodeStrategy ### Description Returns the EncodeStrategy used by the encoder based on the provided options. ### Method GET ### Endpoint /BitmapDrawableEncoder/getEncodeStrategy ### Parameters #### Query Parameters - **options** (Options) - Required - The options to determine the strategy. ### Response #### Success Response (200) - **strategy** (EncodeStrategy) - The determined encoding strategy. ``` -------------------------------- ### Lifecycle onStart Method Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.manager/-request-manager-fragment/on-start.html Lifecycle callback method triggered when the component starts. ```kotlin open fun onStart() ``` -------------------------------- ### GET /com.bumptech.glide.disklrucache/DiskLruCache/isTerminated Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.executor/-glide-executor/is-terminated.html Checks if the DiskLruCache instance has been terminated. ```APIDOC ## GET /com.bumptech.glide.disklrucache/DiskLruCache/isTerminated ### Description Returns the termination status of the DiskLruCache instance. ### Method GET ### Endpoint com.bumptech.glide.disklrucache.DiskLruCache.isTerminated() ### Response #### Success Response (200) - **isTerminated** (Boolean) - Returns true if the cache is terminated, false otherwise. ``` -------------------------------- ### POST /transition/build Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.transition/-transition-factory/build.html The build method creates a new Transition instance based on the data source and resource state. ```APIDOC ## POST /transition/build ### Description Returns a new Transition instance to be used when loading a resource into a target. ### Method POST ### Endpoint /transition/build ### Parameters #### Query Parameters - **dataSource** (DataSource) - Required - The com.bumptech.glide.load.DataSource the resource was loaded from. - **isFirstResource** (boolean) - Required - True if this is the first resource to be loaded into the target. ### Response #### Success Response (200) - **Transition** (Object) - A new Transition instance. ``` -------------------------------- ### Constructor LruBitmapPool(maxSize, allowedConfigs) Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.bitmap_recycle/-lru-bitmap-pool/-lru-bitmap-pool.html Initializes a new LruBitmapPool with a specified maximum size and a set of allowed Bitmap configurations. ```APIDOC ## LruBitmapPool(maxSize, allowedConfigs) ### Description Constructor for LruBitmapPool. ### Parameters #### Path Parameters - **maxSize** (Long) - Required - The initial maximum size of the pool in bytes. - **allowedConfigs** (Set) - Required - A white listed set of android.graphics.Bitmap.Config that are allowed to be put into the pool. Configs not in the allowed set will be rejected. ``` -------------------------------- ### getDataClass Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.data/-data-rewinder/-factory/get-data-class.html Abstract function to get the data class. ```APIDOC ## getDataClass ### Description Abstract function to get the data class. ### Method N/A ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ### Kotlin ```kotlin abstract fun getDataClass(): Class ``` ``` -------------------------------- ### GET /com.bumptech.glide.disklrucache/DiskLruCache/edit Source: https://bumptech.github.io/glide/javadocs/4140/third_party/disklrucache/com.bumptech.glide.disklrucache/-disk-lru-cache/-value/edit.html Retrieves an editor for a specific cache entry. ```APIDOC ## GET /com.bumptech.glide.disklrucache/DiskLruCache/edit ### Description Returns an editor for this snapshot's entry. Returns null if the entry has changed since the snapshot was created or if another edit is already in progress. ### Method GET ### Endpoint com.bumptech.glide.disklrucache.DiskLruCache.edit() ### Response #### Success Response (200) - **Editor** (DiskLruCache.Editor) - An editor instance for the entry, or null if unavailable. ``` -------------------------------- ### Initialize Placeholder Source: https://bumptech.github.io/glide/javadocs/4140/integration/ktx/com.bumptech.glide.integration.ktx/-placeholder/index.html Constructor for creating a new Placeholder instance. ```kotlin fun Placeholder(status: Status, placeholder: Drawable?) ``` -------------------------------- ### Get TransitionFactory Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.transition/-no-transition/get-factory.html Returns an instance of a factory that produces NoTransitions. ```kotlin open fun getFactory(): TransitionFactory ``` -------------------------------- ### Lifecycle onStart Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.manager/-request-manager-fragment/on-start.html The onStart method is part of the LifecycleListener interface, used to trigger or resume requests when the associated lifecycle component starts. ```APIDOC ## onStart ### Description Lifecycle callback that notifies the listener that the lifecycle has started. This is typically used to resume pending requests. ### Method void ### Endpoint com.bumptech.glide.manager.LifecycleListener#onStart() ``` -------------------------------- ### GET getCurrentDrawable Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.target/-image-view-target/get-current-drawable.html Retrieves the current Drawable being displayed in the view. ```APIDOC ## GET getCurrentDrawable ### Description Returns the current android.graphics.drawable.Drawable being displayed in the view using getDrawable. ### Method GET ### Response #### Success Response (200) - **Drawable** (object) - The current drawable object being displayed. ``` -------------------------------- ### Initialize ManifestParser Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.module/-manifest-parser/-manifest-parser.html Instantiate the ManifestParser with a given Android Context. ```kotlin open fun ManifestParser(context: Context) ``` -------------------------------- ### GET getMinimumHeight Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.target/-fixed-size-drawable/get-minimum-height.html Retrieves the minimum height of the drawable or resource. ```APIDOC ## GET getMinimumHeight ### Description Returns the minimum height of the associated resource. ### Method GET ### Endpoint getMinimumHeight() ### Response #### Success Response (200) - **return** (Int) - The minimum height value. ``` -------------------------------- ### GET getIntrinsicHeight Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.target/-fixed-size-drawable/get-intrinsic-height.html Retrieves the intrinsic height of the drawable resource. ```APIDOC ## GET getIntrinsicHeight ### Description Returns the intrinsic height of the drawable in pixels. ### Method GET ### Response #### Success Response (200) - **height** (Int) - The intrinsic height of the drawable. ``` -------------------------------- ### Creating RequestOptions Source: https://bumptech.github.io/glide/doc/migrating.html Instantiating and configuring a RequestOptions object. ```java RequestOptions options = new RequestOptions() .centerCrop() .placeholder(R.drawable.placeholder) .error(R.drawable.error) .priority(Priority.HIGH); ``` -------------------------------- ### GET /request/isDone Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request/-request-future-target/is-done.html Checks the completion status of a Glide request. ```APIDOC ## GET /request/isDone ### Description Returns the current status of a request to determine if it has finished processing. ### Method GET ### Endpoint /request/isDone ### Response #### Success Response (200) - **isDone** (Boolean) - Returns true if the request is complete, false otherwise. #### Response Example { "isDone": true } ``` -------------------------------- ### Initialize DiskLruCacheFactory with path, name, and size Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.cache/-disk-lru-cache-factory/-disk-lru-cache-factory.html Creates a factory using a specific folder path, a cache name, and maximum cache size. ```kotlin open fun DiskLruCacheFactory( diskCacheFolder: String, diskCacheName: String, diskCacheSize: Long) ``` -------------------------------- ### Open DiskLruCache Source: https://bumptech.github.io/glide/javadocs/4140/third_party/disklrucache/com.bumptech.glide.disklrucache/-disk-lru-cache/open.html Initializes the cache in the specified directory. Throws an IOException if directory access fails. ```kotlin open fun open( directory: File, appVersion: Int, valueCount: Int, maxSize: Long): DiskLruCache ``` -------------------------------- ### GET /RequestCoordinator/getRoot Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request/-request-coordinator/get-root.html Retrieves the top-most parent RequestCoordinator in the hierarchy. ```APIDOC ## GET /RequestCoordinator/getRoot ### Description Returns the top most parent `RequestCoordinator`. ### Method GET ### Endpoint /RequestCoordinator/getRoot ### Response #### Success Response (200) - **root** (RequestCoordinator) - The top most parent RequestCoordinator. ``` -------------------------------- ### Transition Source: https://bumptech.github.io/glide/javadocs/4140/integration/cronet/com.bumptech.glide.integration.cronet/-chromium-url-loader/handles.html Interface for resource transitions. ```APIDOC ## Transition ### Description An interface representing the animation or transition applied when a resource is loaded. ### Method GET ### Endpoint /glide/transition ### Parameters #### Query Parameters - **target** (Target) - Required - The target to apply the transition to. - **isFirstResource** (boolean) - Required - True if this is the first resource loaded for the request. ``` -------------------------------- ### Get Cache Signature Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request/-base-request-options/signature.html Retrieves the current signature key. ```kotlin open val signature: Key ``` -------------------------------- ### Run Unit Tests Source: https://bumptech.github.io/glide/dev/contributing.html Commands to execute unit tests for the main library. ```bash ./gradlew :library:testDebugUnitTest ``` -------------------------------- ### GET /com.bumptech.glide.disklrucache/DiskLruCache/getSize Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.gif/-gif-drawable/get-size.html Retrieves the current size of the disk cache. ```APIDOC ## GET /com.bumptech.glide.disklrucache/DiskLruCache/getSize ### Description Returns the total size of the cache in bytes. ### Method GET ### Endpoint /com.bumptech.glide.disklrucache/DiskLruCache/getSize ### Response #### Success Response (200) - **size** (Int) - The total size of the cache in bytes. ``` -------------------------------- ### GET getFirstFrame Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.gif/-gif-drawable/get-first-frame.html Retrieves the first frame of a GIF as a Bitmap. ```APIDOC ## GET getFirstFrame ### Description Retrieves the first frame of a GIF as a Bitmap. ### Method GET ### Response #### Success Response (200) - **Bitmap** (object) - The first frame of the GIF as a Bitmap object. ``` -------------------------------- ### Constructor: Builder(width: Int, height: Int) Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.prefill/-pre-fill-type/-builder/-builder.html Initializes a builder using separate integers for width and height. ```APIDOC ## Builder(width: Int, height: Int) ### Description Constructor for a builder that uses the given dimensions as the dimensions of the Bitmaps to prefill. ### Parameters #### Path Parameters - **width** (Int) - Required - The width in pixels of the Bitmaps to prefill. - **height** (Int) - Required - The height in pixels of the Bitmaps to prefill. ``` -------------------------------- ### DiskLruCache get Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource/-unit-transformation/get.html Retrieves a UnitTransformation for a given type from the DiskLruCache. ```APIDOC ## GET /disk/lru/cache/get ### Description Retrieves a UnitTransformation for the given type. ### Method GET ### Endpoint /disk/lru/cache/get ### Parameters #### Path Parameters - **T** (Type) - Required - The type of the resource to be transformed. ### Response #### Success Response (200) - **UnitTransformation** (UnitTransformation) - A UnitTransformation for the given type. ``` -------------------------------- ### with(Fragment) Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-glide/with.html Begins a load with Glide tied to the lifecycle of the provided android.app.Fragment. ```APIDOC ## with(Fragment) ### Description Begin a load with Glide that will be tied to the given android.app.Fragment's lifecycle and that uses the given android.app.Fragment's default options. ### Parameters #### Path Parameters - **fragment** (Fragment) - Required - The fragment to use. ### Return - **RequestManager** - A RequestManager for the given Fragment that can be used to start a load. ### Deprecated Prefer support Fragments and with instead. See https://github.com/android/android-ktx/pull/161#issuecomment-363270555. ``` -------------------------------- ### Begin Formatted Trace Section (1 Argument) Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util.pool/-glide-trace/index.html Starts a synchronous tracing section with a formatted tag string and one argument. Useful for including dynamic information in trace tags. ```kotlin open fun beginSectionFormat( format: String, arg1: Any) ``` -------------------------------- ### GET /toURL Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.model/-glide-url/to-u-r-l.html Converts the current object to a URL representation. ```APIDOC ## GET /toURL ### Description Converts the current object to a URL representation. ### Method GET ### Endpoint /toURL ### Response #### Success Response (200) - **URL** (object) - The URL representation of the object. ``` -------------------------------- ### GET /com.bumptech.glide.disklrucache/DiskLruCache/isShutdown Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.executor/-glide-executor/is-shutdown.html Checks whether the DiskLruCache instance has been shut down. ```APIDOC ## GET /com.bumptech.glide.disklrucache/DiskLruCache/isShutdown ### Description Returns the current shutdown status of the DiskLruCache instance. ### Method GET ### Endpoint com.bumptech.glide.disklrucache.DiskLruCache.isShutdown() ### Response #### Success Response (200) - **isShutdown** (Boolean) - Returns true if the cache is shut down, false otherwise. ``` -------------------------------- ### POST /transition (TransitionFactory) Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-transition-options/transition.html Uses a TransitionFactory to build a transition for each request. ```APIDOC ## POST /transition ### Description Uses the given TransitionFactory to build a transition for each request started with these TransitionOptions. ### Parameters #### Request Body - **transitionFactory** (TransitionFactory) - Required - The factory used to build the transition. ### Response - **Returns** (CHILD) - The request builder instance. ``` -------------------------------- ### FileDescriptorFactory Constructor Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.model/-uri-loader/-file-descriptor-factory/-file-descriptor-factory.html Initializes a new FileDescriptorFactory using the provided ContentResolver. ```APIDOC ## FileDescriptorFactory ### Description Initializes a factory for creating file descriptors from content URIs. ### Method Constructor ### Parameters #### Path Parameters - **contentResolver** (ContentResolver) - Required - The ContentResolver used to open file descriptors. ``` -------------------------------- ### GET /com.bumptech.glide.disklrucache/DiskLruCache/getElementSizeInBytes Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.bitmap_recycle/-integer-array-adapter/get-element-size-in-bytes.html Retrieves the size of an element in the array in bytes. ```APIDOC ## GET /com.bumptech.glide.disklrucache/DiskLruCache/getElementSizeInBytes ### Description Returns the size of an element in the array in bytes (e.g., for int return 4). ### Method GET ### Endpoint com.bumptech.glide.disklrucache.DiskLruCache.getElementSizeInBytes() ### Response #### Success Response (200) - **size** (Int) - The size of the element in bytes. ``` -------------------------------- ### GET /getResourceClass Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine/-resource/get-resource-class.html Retrieves the class type of the wrapped resource. ```APIDOC ## GET /getResourceClass ### Description Returns the Class of the wrapped resource. ### Method GET ### Endpoint /getResourceClass ### Response #### Success Response (200) - **Class** (Class) - The class of the wrapped resource. ``` -------------------------------- ### Implement buildLoadData() with ObjectKey Source: https://bumptech.github.io/glide/tut/custom-modelloader.html Implement `buildLoadData()` to return a new `LoadData` object, including a `Key` for the disk cache and a placeholder for the `DataFetcher`. The fetcher is currently set to `null`. ```java @Nullable @Override public LoadData buildLoadData(String model, int width, int height, Options options) { return new LoadData<>(new ObjectKey(model), /*fetcher=*/ null); } ``` -------------------------------- ### Get Resource Class Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine/-resource/get-resource-class.html Returns the Class of the wrapped resource. ```kotlin abstract fun getResourceClass(): Class ``` -------------------------------- ### Initialize GlideSymbolProcessor Source: https://bumptech.github.io/glide/javadocs/4140/annotation/ksp/com.bumptech.glide.annotation.ksp/-glide-symbol-processor/-glide-symbol-processor.html Entry point for the Glide symbol processor using the provided environment. ```kotlin fun GlideSymbolProcessor(environment: SymbolProcessorEnvironment) ``` -------------------------------- ### Build a new Transition Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.transition/-transition-factory/build.html Creates a new Transition instance based on the provided data source and whether the resource is the first one being loaded. ```kotlin abstract fun build(dataSource: DataSource, isFirstResource: Boolean): Transition ``` -------------------------------- ### GET /option/get Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load/-options/get.html Retrieves the value associated with a specific Option. ```APIDOC ## GET /option/get ### Description Retrieves the value associated with a specific Option from the request options. ### Method GET ### Endpoint /option/get ### Parameters #### Query Parameters - **option** (Option) - Required - The option key to retrieve the value for. ### Response #### Success Response (200) - **value** (T) - The value associated with the provided option. ``` -------------------------------- ### Setup Context for Tests Source: https://bumptech.github.io/glide/tut/failing-test-cases.html Add a `@Before` step to create a `Context` object, which is required for most tests and helper methods. This ensures a valid context is available before each test runs. ```java package com.bumptech.glide; import android.support.test.runner.AndroidJUnit4; import com.bumptech.glide.test.ConcurrencyHelper; import com.bumptech.glide.test.TearDownGlide; import org.junit.Rule; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) public class IssueXyzTest { @Rule public final TearDownGlide tearDownGlide = new TearDownGlide(); private final ConcurrencyHelper concurrency = new ConcurrencyHelper(); private Context context; @Before public void setUp() { context = InstrumentationRegistry.getTargetContext(); } } ``` -------------------------------- ### GET /getRewinder Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-registry/get-rewinder.html Retrieves a DataRewinder for the specified data type. ```APIDOC ## GET /getRewinder ### Description Retrieves a DataRewinder for the specified data type to allow resetting data streams. ### Method GET ### Endpoint getRewinder ### Parameters #### Query Parameters - **data** (X) - Required - The data object to be rewound. ### Response #### Success Response (200) - **DataRewinder** - The rewinder instance for the provided data. ``` -------------------------------- ### Build a Video Fetcher Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.data.mediastore/-thumb-fetcher/build-video-fetcher.html Creates a new instance of a ThumbFetcher for a given context and URI. ```kotlin open fun buildVideoFetcher(context: Context, uri: Uri): ThumbFetcher ``` -------------------------------- ### GET /glide/singleton Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-glide/get.html Retrieves the singleton instance of the Glide library. ```APIDOC ## GET /glide/singleton ### Description Get the singleton instance of the Glide library. ### Method GET ### Parameters #### Path Parameters - **context** (Context) - Required - The application or activity context. ### Response #### Success Response (200) - **Glide** (Object) - The singleton instance of Glide. ``` -------------------------------- ### beginSectionAsync Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util.pool/-glide-trace/begin-section-async.html Starts an asynchronous section for tracing or performance monitoring. ```APIDOC ## beginSectionAsync ### Description Starts an asynchronous section with a specific tag for performance tracking. ### Method open fun ### Parameters #### Path Parameters - **tag** (String) - Required - The identifier for the section being started. ### Response - **Int** - Returns an integer identifier for the started section. ``` -------------------------------- ### POST /transitionUsing Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.bitmap/-bitmap-transition-options/transition-using.html Enables any Drawable-based animation to run on Bitmaps. ```APIDOC ## POST /transitionUsing ### Description Enables any Drawable-based animation to run on Bitmaps as well. ### Method POST ### Endpoint /transitionUsing ### Parameters #### Request Body - **drawableCrossFadeFactory** (TransitionFactory) - Required - The factory used to create the transition for the Drawable. ### Response #### Success Response (200) - **BitmapTransitionOptions** (Object) - Returns the configured BitmapTransitionOptions instance. ``` -------------------------------- ### Implement animate Function Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.transition/-view-property-transition/-animator/index.html Starts an animation on the specified android.view.View. ```kotlin abstract fun animate(view: View) ``` -------------------------------- ### build Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.transition/-no-transition/-no-animation-factory/build.html Builds a new Transition based on the provided data source and resource status. ```APIDOC ## POST /build ### Description Returns a new Transition. ### Method POST ### Endpoint /build ### Parameters #### Query Parameters - **dataSource** (DataSource) - Required - The com.bumptech.glide.load.DataSource the resource was loaded from. - **isFirstResource** (Boolean) - Required - True if this is the first resource to be loaded into the target. ### Request Example { "dataSource": "REMOTE", "isFirstResource": true } ### Response #### Success Response (200) - **Transition** (Transition) - Description of the transition #### Response Example { "transitionType": "fade" } ``` -------------------------------- ### Build Project with Gradle Source: https://bumptech.github.io/glide/tut/failing-test-cases.html This command builds the project using Gradle, checking for style issues and common bugs. It's a standard step for ensuring code quality and preparing for integration. ```bash ./gradlew build ``` -------------------------------- ### Constructor ManifestParser Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.module/-manifest-parser/-manifest-parser.html Initializes a new instance of the ManifestParser using the provided Android Context. ```APIDOC ## ManifestParser ### Description Initializes the ManifestParser to read Glide configuration modules from the AndroidManifest.xml file. ### Method Constructor ### Parameters #### Path Parameters - **context** (Context) - Required - The Android context used to access the application's package manager and manifest metadata. ``` -------------------------------- ### Constructor LruBitmapPool(maxSize) Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.bitmap_recycle/-lru-bitmap-pool/-lru-bitmap-pool.html Initializes a new LruBitmapPool with a specified maximum size in bytes. ```APIDOC ## LruBitmapPool(maxSize) ### Description Constructor for LruBitmapPool. ### Parameters #### Path Parameters - **maxSize** (Long) - Required - The initial maximum size of the pool in bytes. ``` -------------------------------- ### Initialize VideoBitmapDecoder with BitmapPool Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.resource.bitmap/-video-bitmap-decoder/-video-bitmap-decoder.html Use this constructor to initialize VideoBitmapDecoder with a BitmapPool. This allows for efficient bitmap reuse. ```kotlin open fun VideoBitmapDecoder(bitmapPool: BitmapPool) ``` -------------------------------- ### Resume Requests Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.manager/-request-tracker/resume-requests.html Starts any not yet completed or failed requests. ```APIDOC ## resumeRequests ### Description Starts any not yet completed or failed requests. ### Method open ### Endpoint resumeRequests() ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### CLEARED Constant Source: https://bumptech.github.io/glide/javadocs/4140/integration/ktx/com.bumptech.glide.integration.ktx/-status/-c-l-e-a-r-e-d/index.html Represents a state where a load is not started or has been cleared. ```APIDOC ## CLEARED ### Description The `CLEARED` constant indicates that an image load operation has not been initiated or has been explicitly cancelled. ### Properties - **name** (String) - The name of the constant. - **ordinal** (Int) - The ordinal value of the constant. ``` -------------------------------- ### Open Factory Constructor with Static Singleton Client Source: https://bumptech.github.io/glide/javadocs/4140/integration/okhttp/com.bumptech.glide.integration.okhttp/-ok-http-url-loader/-factory/-factory.html Use this constructor to create a new Factory that runs requests using a static singleton OkHttpClient. ```kotlin open fun Factory() ``` -------------------------------- ### Initialize ViewPreloadSizeProvider Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util/-view-preload-size-provider/index.html Constructors for initializing the provider with or without an initial View. ```kotlin open fun ViewPreloadSizeProvider() ``` ```kotlin open fun ViewPreloadSizeProvider(view: View) ``` -------------------------------- ### Get file from snapshot Source: https://bumptech.github.io/glide/javadocs/4140/third_party/disklrucache/com.bumptech.glide.disklrucache/-disk-lru-cache/-value/index.html Retrieves the file associated with the specified index. ```kotlin open fun getFile(index: Int): File ``` -------------------------------- ### GET /util/isOnMainThread Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util/-util/is-on-main-thread.html Checks if the current execution is occurring on the main thread. ```APIDOC ## isOnMainThread ### Description Returns true if the current method is called on the main thread, false otherwise. ### Method Function Call ### Response - **result** (Boolean) - True if on main thread, false otherwise. ``` -------------------------------- ### Initialize FileDescriptorAssetPathFetcher Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.data/-file-descriptor-asset-path-fetcher/-file-descriptor-asset-path-fetcher.html Constructor for the FileDescriptorAssetPathFetcher class. ```kotlin open fun FileDescriptorAssetPathFetcher(assetManager: AssetManager, assetPath: String) ``` -------------------------------- ### Initialize FileDescriptorLocalUriFetcher Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.data/-file-descriptor-local-uri-fetcher/-file-descriptor-local-uri-fetcher.html Constructor for FileDescriptorLocalUriFetcher. Requires a ContentResolver and a Uri. ```kotlin open fun FileDescriptorLocalUriFetcher(contentResolver: ContentResolver, uri: Uri) ``` -------------------------------- ### GET /disk-lru-cache/item Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util/-lru-cache/get.html Retrieves an item from the cache based on a provided key. ```APIDOC ## GET /disk-lru-cache/item ### Description Returns the item in the cache for the given key or null if no such item exists. ### Method GET ### Parameters #### Query Parameters - **key** (T) - Required - The key to check. ``` -------------------------------- ### Initialize DiskLruCacheFactory with path and size Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.load.engine.cache/-disk-lru-cache-factory/-disk-lru-cache-factory.html Creates a factory using a specific folder path and maximum cache size. ```kotlin open fun DiskLruCacheFactory(diskCacheFolder: String, diskCacheSize: Long) ``` -------------------------------- ### GET /get Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util/-glide-suppliers/-glide-supplier/get.html Retrieves the underlying resource or object from a Glide-managed component. ```APIDOC ## GET /get ### Description Retrieves the underlying resource or object from a Glide-managed component. ### Method GET ### Endpoint /get ### Response #### Success Response (200) - **T** (Object) - The resource or object being retrieved. ``` -------------------------------- ### GET /disklrucache/available Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util/-exception-passthrough-input-stream/available.html Retrieves the number of bytes currently available in the cache. ```APIDOC ## GET /disklrucache/available ### Description Returns the number of bytes currently available in the cache. ### Method GET ### Endpoint /disklrucache/available ### Response #### Success Response (200) - **available** (Int) - The number of bytes available. ``` -------------------------------- ### Initialize FixedPreloadSizeProvider Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.util/-fixed-preload-size-provider/index.html Constructor for creating a new instance with specific width and height dimensions. ```kotlin open fun FixedPreloadSizeProvider(width: Int, height: Int) ``` -------------------------------- ### Glide Size Management Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.target/-simple-target/index.html Methods for getting and removing size callbacks. ```APIDOC ## Glide Size Management ### getSize #### Description Immediately calls the given callback with the sizes given in the constructor. #### Parameters - **cb** (SizeReadyCallback) - The callback to be invoked with the size information. ### removeCallback #### Description Removes the given callback from the pending set if it's still retained. #### Parameters - **cb** (SizeReadyCallback) - The callback to remove. ``` -------------------------------- ### Glide Initialization Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-glide/init.html Provides information on how to initialize the Glide library. It includes a deprecated method and the current recommended method. ```APIDOC ## Glide Initialization ### Description Initializes the Glide library. The `init(context: Context, builder: GlideBuilder)` method is the current recommended way to initialize Glide, providing a `GlideBuilder` for configuration. The `init(glide: Glide)` method is deprecated and should not be used in new code. ### Method `open fun init(context: Context, builder: GlideBuilder)` ### Endpoint N/A (This is a library initialization method, not an API endpoint) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin val glideBuilder = GlideBuilder() // Configure glideBuilder as needed Glide.init(context, glideBuilder) ``` ### Response #### Success Response (200) N/A (Initialization methods typically do not return a value in this context) #### Response Example None ### Deprecated Method ## @Deprecated open fun init(glide: Glide) ### Description This method is deprecated. Use `init(context: Context, builder: GlideBuilder)` to get a singleton compatible with Glide's generated API. This method will be removed in a future version of Glide. ### Method `@Deprecated open fun init(glide: Glide)` ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```kotlin // Deprecated usage - do not use in new code // Glide.init(glideInstance) ``` ### Response #### Success Response (200) N/A #### Response Example None ``` -------------------------------- ### GET /target/getSize Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.target/-target/get-size.html Retrieves the size of the target by invoking the provided callback. ```APIDOC ## GET /target/getSize ### Description A method to retrieve the size of this target. The implementation must call the provided callback once the size is determined. ### Method GET ### Parameters #### Path Parameters - **cb** (SizeReadyCallback) - Required - The callback that must be called when the size of the target has been determined ``` -------------------------------- ### TransitionOptions Class Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide/-transition-options/index.html API documentation for the TransitionOptions class and its methods for configuring load transitions. ```APIDOC ## TransitionOptions ### Description A base class for setting a transition to use on a resource when a load completes. ### Parameters - **CHILD** - The implementation of this class to return to chain methods. - **TranscodeType** - The type of resource that will be animated. ### Functions - **clone()** - Returns a copy of the current TransitionOptions instance. - **dontTransition()** - Removes any existing animation put on the builder. - **transition(transitionFactory: TransitionFactory)** - Uses the given TransitionFactory to build a transition for each request. - **transition(animator: ViewPropertyTransition.Animator)** - Sets an animator to run. - **transition(viewAnimationId: Int)** - Sets an android.view.animation resource ID. ``` -------------------------------- ### GET getSize Source: https://bumptech.github.io/glide/javadocs/4140/library/com.bumptech.glide.request.target/-simple-target/get-size.html Retrieves the size of the target by invoking the provided callback. ```APIDOC ## getSize ### Description Immediately calls the given callback with the sizes given in the constructor. ### Parameters #### Path Parameters - **cb** (SizeReadyCallback) - Required - The callback that must be called when the size of the target has been determined ```