feat: modular add test case

This commit is contained in:
pengfei.zhou
2021-05-13 16:26:48 +08:00
committed by osborn
parent c27a9bd672
commit 546af79534
14 changed files with 358 additions and 57 deletions

View File

@@ -59,7 +59,7 @@ public class ModalPlugin extends DoricJavaPlugin {
gravity = gravityVal.asNumber().toInt();
}
Toast toast = Toast.makeText(getDoricContext().getContext(),
jsObject.getProperty("msg").asString().value(),
msg,
Toast.LENGTH_SHORT);
if ((gravity & Gravity.TOP) == Gravity.TOP) {
toast.setGravity(Gravity.TOP | Gravity.CENTER_HORIZONTAL, 0, DoricUtils.dp2px(50));
@@ -67,7 +67,6 @@ public class ModalPlugin extends DoricJavaPlugin {
toast.setGravity(Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL, 0, DoricUtils.dp2px(50));
} else {
toast.setGravity(Gravity.CENTER | Gravity.CENTER_HORIZONTAL, 0, 0);
}
toast.show();
} catch (Exception e) {