Skip to content

GIF

Cet article s’applique aux intégrations qui utilisent les fragments ou les vues de carte de contenu par défaut du SDK Braze pour afficher les cartes de contenu.

Integrating a custom image library

Step 1: Creating the image loader delegate

The Image Loader delegate must implement the following methods:

The integration example below is taken from the Glide integration sample app included with the Braze Android SDK.

Step 2: Setting the image loader delegate

The Braze SDK will use any custom image loader set with setBrazeImageLoader . We recommend setting the custom image loader in a custom application subclass:

Custom Image Loading with Jetpack Compose

To override image loading with Jetpack Compose, you can pass in a value to imageComposable. This function will take a Card and render the image and the modifiers needed. Alternatively, you can use customCardComposer of ContentCardsList to render the entire card.

In the following example, Glide’s Compose library is used for the cards listed in the imageComposable function:

CETTE PAGE A-T-ELLE ÉTÉ UTILE?
New Stuff!