Dialog如何覆盖状态栏全屏显示
Component component = LayoutScatter.getInstance(context).parse(ResourceTable.Layout_layout_dialog, null, false);
Button button = (Button) component.findComponentById(ResourceTable.Id_btn_close);
button.setClickedListener(new Component.ClickedListener() {
@Override
public void onClick(Component component) {
commonDialog.destroy();
}
});
commonDialog.setSize(ComponentContainer.LayoutConfig.MATCH_PARENT, ComponentContainer.LayoutConfig.MATCH_PARENT);
commonDialog.setContentCustomComponent(component);
commonDialog.setTransparent(true);
commonDialog.setAlignment(LayoutAlignment.TOP);
commonDialog.siteKeyboardCallback(new IDialog.KeyboardCallback() {
@Override
public boolean clickKey(IDialog iDialog, KeyEvent keyEvent) {
return true;
}
});
commonDialog.show();
把状态栏直接隐藏掉就可以了
在你的AbilitySlice的onStart()方法里面加上这句话
getWindow().addFlags(WindowManager.LayoutConfig.MARK_FULL_SCREEN);
如果不想显示标题栏 可以再config.js里面添加如下配置即可