Dialog表示
1669 ワード
ロックスクリーン上の弾枠
方法1:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
方法2:
//mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
Dialogは下部に表示されます
方法1:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED
| WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
方法2:
//mDialog.getWindow().setType(WindowManager.LayoutParams.TYPE_KEYGUARD_DIALOG);
Dialogは下部に表示されます
Window window = dialog.getWindow();
window.setGravity(Gravity.BOTTOM);
WindowManager m = getWindowManager();
Display d = m.getDefaultDisplay(); // 、
WindowManager.LayoutParams p = dialog.getWindow().getAttributes(); //
p.width = d.getWidth(); //
dialog.getWindow().setAttributes(p); //