alertdialogの透明度の設定
960 ワード
次のようになります.
キーコード:
Builder builder = new AlertDialog.Builder(getSherlockActivity());
builder.setTitle(title);
builder.setPositiveButton(R.string.rating_continue,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
}
});
builder.setNegativeButton(R.string.wispr_cancel,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton) {
/* User clicked cancel so do some stuff */
}
});
final AlertDialog dialog = builder.create();
dialog.show();
Window window = dialog.getWindow();
WindowManager.LayoutParams lp = window.getAttributes();
lp.alpha = 0.8f;
window.setAttributes(lp);
キーコード:
Window window = dialog.getWindow();
WindowManager.LayoutParams lp = window.getAttributes();
lp.alpha = 0.8f;
window.setAttributes(lp);