From d5c8382775c1f5908541488c9add4a0940dbb683 Mon Sep 17 00:00:00 2001 From: Xiao Mei Date: Mon, 24 Feb 2025 20:10:46 -0800 Subject: [PATCH] Add support of refreshProgressBarBackgroundColor Summary: Add refreshProgressBarBackgroundColor for Litho LazyList Reviewed By: nicholeic Differential Revision: D70109658 fbshipit-source-id: c633413f06b3effc5c068f61e978ec4c6c572545 --- .../com/facebook/litho/widget/collection/LazyCollection.kt | 2 ++ .../kotlin/com/facebook/litho/widget/collection/LazyGrid.kt | 2 ++ .../kotlin/com/facebook/litho/widget/collection/LazyList.kt | 2 ++ .../com/facebook/litho/widget/collection/LazyStaggeredGrid.kt | 2 ++ 4 files changed, 8 insertions(+) diff --git a/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyCollection.kt b/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyCollection.kt index ef1a9303c5..c033d40dee 100644 --- a/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyCollection.kt +++ b/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyCollection.kt @@ -73,6 +73,7 @@ class LazyCollection( private val scrollBarStyle: Int? = null, private val recyclerViewId: Int? = null, private val overScrollMode: Int? = null, + private val refreshProgressBarBackgroundColor: Int? = null, private val refreshProgressBarColor: Int? = null, private val touchInterceptor: LithoRecyclerView.TouchInterceptor? = null, private val itemTouchListener: RecyclerView.OnItemTouchListener? = null, @@ -187,6 +188,7 @@ class LazyCollection( .scrollBarStyle(scrollBarStyle) .recyclerViewId(recyclerViewId) .overScrollMode(overScrollMode) + .refreshProgressBarBackgroundColor(refreshProgressBarBackgroundColor) .refreshProgressBarColor(refreshProgressBarColor) .touchInterceptor(touchInterceptor) .itemTouchListener(itemTouchListener) diff --git a/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyGrid.kt b/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyGrid.kt index 8a996e6f2f..9c2da073f8 100644 --- a/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyGrid.kt +++ b/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyGrid.kt @@ -51,6 +51,7 @@ inline fun ResourcesScope.LazyGrid( scrollBarStyle: Int? = null, recyclerViewId: Int? = null, overScrollMode: Int? = null, + refreshProgressBarBackgroundColor: Int? = null, refreshProgressBarColor: Int? = null, touchInterceptor: LithoRecyclerView.TouchInterceptor? = null, itemTouchListener: RecyclerView.OnItemTouchListener? = null, @@ -115,6 +116,7 @@ inline fun ResourcesScope.LazyGrid( scrollBarStyle, recyclerViewId, overScrollMode, + refreshProgressBarBackgroundColor, refreshProgressBarColor, touchInterceptor, itemTouchListener, diff --git a/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyList.kt b/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyList.kt index c1ded54890..45d66c357e 100644 --- a/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyList.kt +++ b/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyList.kt @@ -54,6 +54,7 @@ inline fun ResourcesScope.LazyList( scrollBarStyle: Int? = null, recyclerViewId: Int? = null, overScrollMode: Int? = null, + refreshProgressBarBackgroundColor: Int? = null, refreshProgressBarColor: Int? = null, touchInterceptor: LithoRecyclerView.TouchInterceptor? = null, itemTouchListener: RecyclerView.OnItemTouchListener? = null, @@ -121,6 +122,7 @@ inline fun ResourcesScope.LazyList( scrollBarStyle, recyclerViewId, overScrollMode, + refreshProgressBarBackgroundColor, refreshProgressBarColor, touchInterceptor, itemTouchListener, diff --git a/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyStaggeredGrid.kt b/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyStaggeredGrid.kt index a25b733115..e6909940da 100644 --- a/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyStaggeredGrid.kt +++ b/litho-widget-kotlin/src/main/kotlin/com/facebook/litho/widget/collection/LazyStaggeredGrid.kt @@ -51,6 +51,7 @@ inline fun ResourcesScope.LazyStaggeredGrid( scrollBarStyle: Int? = null, recyclerViewId: Int? = null, overScrollMode: Int? = null, + refreshProgressBarBackgroundColor: Int? = null, refreshProgressBarColor: Int? = null, touchInterceptor: LithoRecyclerView.TouchInterceptor? = null, itemTouchListener: RecyclerView.OnItemTouchListener? = null, @@ -113,6 +114,7 @@ inline fun ResourcesScope.LazyStaggeredGrid( scrollBarStyle, recyclerViewId, overScrollMode, + refreshProgressBarBackgroundColor, refreshProgressBarColor, touchInterceptor, itemTouchListener,