[JavaScript] 纯文本查看 复制代码 //尝试启动悬浮框
console.show();
var field = runtime.console.class.getDeclaredField("mConsoleFloaty");
field.setAccessible(true);
mConsoleFloaty = field.get(runtime.console);
mConsoleFloaty.expandedView.parent
.getChildAt(1)
.getChildAt(0)
.getChildAt(0)
.setBackgroundColor(colors.parseColor("#eeeeee"));
mConsoleFloaty.expandedView.parent
.getChildAt(1)
.getChildAt(0)
.getChildAt(1)
.setBackgroundColor(colors.parseColor("#eeeeee"));
let parent = mConsoleFloaty.expandedView.parent;
var inputView = parent.findViewById(context.getResources().getIdentifier("input", "id", context.getPackageName()));
var buttonView = parent.findViewById(context.getResources().getIdentifier("submit", "id", context.getPackageName()));
ui.run(function () {
inputView.setVisibility(8);
buttonView.setVisibility(8);
});
console.verbose("调整大小...");;
sleep(100);
console.setSize(500,300);
console.verbose("调整位置...");
sleep(100);
console.setPosition(800,device.height/500);
console.info("调整完毕"); 我想知道下面这个UI,如何修改后可以有透明效果。
|