Android: fix coordinator unit do not transform from dp

This commit is contained in:
pengfei.zhou 2023-06-21 19:10:33 +08:00 committed by jingpeng
parent 8e4bcd0519
commit fffd5a9a3f

View File

@ -202,9 +202,9 @@ public class CoordinatorPlugin extends DoricJavaPlugin {
String callbackId = argument.getProperty("onScrolledInterval").asString().value();
final DoricPromise currentPromise = new DoricPromise(getDoricContext(), callbackId);
JSArray observingInterval = argument.getProperty("observingInterval").asArray();
final List<Float> interval = new ArrayList<>();
final List<Integer> interval = new ArrayList<>();
for (int i = 0; i < observingInterval.size(); i++) {
interval.add(observingInterval.get(i).asNumber().toFloat());
interval.add(DoricUtils.dp2px(observingInterval.get(i).asNumber().toFloat()));
}
JSValue inclusive = argument.getProperty("inclusive");