INNER CODE UNIT · Kotlin

notifyAdapterItemRangeChanged

mikepenz/FastAdapter · fastadapter/src/main/java/com/mikepenz/fastadapter/FastAdapter.kt:784

    open fun notifyAdapterItemRangeChanged(position: Int, itemCount: Int, payload: Any? = null) {
        // handle our extensions
        for (ext in extensionsCache.values) {
            ext.notifyAdapterItemRangeChanged(position, itemCount, payload)
        }
        if (payload == null) {
            notifyItemRangeChanged(position, itemCount)
        } else {
            notifyItemRangeChanged(position, itemCount, payload)
        }
    }

    /**
     * Util function which recursively iterates over all items and subItems of the given adapter.
     * It executes the given `predicate` on every item and will either stop if that function returns true, or continue (if stopOnMatch is false)
     *
     * @param predicate   the predicate to run on every item, to check for a match or do some changes (e.g. select)
     * @param stopOnMatch defines if we should stop iterating after the first match

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…