|
1 | 1 | package com.lmy.smartrefreshlayout; |
2 | 2 |
|
3 | 3 | import android.graphics.Color; |
4 | | -import android.support.annotation.NonNull; |
5 | | -import android.view.Display; |
6 | 4 | import android.view.View; |
7 | 5 |
|
8 | 6 | import com.facebook.react.bridge.Arguments; |
|
13 | 11 | import com.facebook.react.uimanager.ThemedReactContext; |
14 | 12 | import com.facebook.react.uimanager.ViewGroupManager; |
15 | 13 | import com.facebook.react.uimanager.annotations.ReactProp; |
16 | | -import com.facebook.react.uimanager.annotations.ReactPropGroup; |
17 | 14 | import com.facebook.react.uimanager.events.RCTEventEmitter; |
18 | 15 | import com.lmy.header.AnyHeader; |
19 | | -import com.scwang.smartrefresh.header.waveswipe.DisplayUtil; |
20 | 16 | import com.scwang.smartrefresh.layout.api.RefreshFooter; |
21 | 17 | import com.scwang.smartrefresh.layout.api.RefreshHeader; |
22 | | -import com.scwang.smartrefresh.layout.api.RefreshInternal; |
23 | 18 | import com.scwang.smartrefresh.layout.api.RefreshLayout; |
24 | 19 | import com.scwang.smartrefresh.layout.constant.RefreshState; |
25 | | -import com.scwang.smartrefresh.layout.listener.OnLoadMoreListener; |
26 | | -import com.scwang.smartrefresh.layout.listener.OnMultiPurposeListener; |
27 | 20 | import com.scwang.smartrefresh.layout.listener.OnRefreshListener; |
28 | 21 | import com.scwang.smartrefresh.layout.listener.SimpleMultiPurposeListener; |
29 | 22 | import com.scwang.smartrefresh.layout.util.DensityUtil; |
@@ -130,9 +123,9 @@ public void setPureScroll(ReactSmartRefreshLayout view,boolean pureScroll){ |
130 | 123 | * @param view |
131 | 124 | * @param primaryColor |
132 | 125 | */ |
133 | | - @ReactProp(name = "primaryColor") |
134 | | - public void setPrimaryColor(ReactSmartRefreshLayout view,String primaryColor){ |
135 | | - view.setPrimaryColors(Color.parseColor(primaryColor)); |
| 126 | + @ReactProp(name = "primaryColor",defaultInt = Color.TRANSPARENT) |
| 127 | + public void setPrimaryColor(ReactSmartRefreshLayout view, int primaryColor){ |
| 128 | + view.setPrimaryColors(primaryColor); |
136 | 129 | } |
137 | 130 | /** |
138 | 131 | * 设置headerHeight |
|
0 commit comments