Skip to content

Commit a57ba49

Browse files
committed
RefreshLayout add primaryColor
1 parent 86f001d commit a57ba49

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

android/src/main/java/com/lmy/smartrefreshlayout/SmartRefreshLayoutManager.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,15 @@ public Map<String, Integer> getCommandsMap() {
8080
);
8181
}
8282

83+
/**
84+
* 通过RefreshLayout设置主题色
85+
* @param view
86+
* @param primaryColor
87+
*/
88+
@ReactProp(name = "primaryColor")
89+
public void setPrimaryColor(ReactSmartRefreshLayout view,String primaryColor){
90+
view.setPrimaryColors(Color.parseColor(primaryColor));
91+
}
8392
/**
8493
* 设置headerHeight
8594
* @param view

0 commit comments

Comments
 (0)