Braze List Adapter
Default adapter used to display cards and log card impressions for the Braze news feed.
This allows the stream to reuse cards when they go out of view. IMPORTANT - When you add a new card, be sure to add the new view type and update the view count here A card generates an impression once per viewing per open ListView. If a card is viewed more than once in a particular ListView, it generates only one impression. If closed an reopened, a card will again generate an impression. This also takes into account the case of a card being off-screen in the ListView. The card only generates an impression when it actually scrolls onto the screen. IMPORTANT - You must call resetCardImpressionTracker() whenever the ListView is displayed. This will ensure that cards that come into view will be tracked according to the description above. Adding and removing cards to and from the adapter should be done using the following synchronized methods: add, clearclear(), replaceFeedFunctions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Helper method to batch set cards to visually read after either an up or down scroll of the feed.
Link copied to clipboard
open fun createFromResource(context: Context, textArrayResId: Int, textViewResId: Int): ArrayAdapter<CharSequence>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Be sure to keep view count in sync with the number of card types in the stream.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Resets the list of viewed cards.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard