I am using a Alert dialog that must be shown on the whole screen, and the height will not depends on the length of text. But I am getting problem in showing text. I am using the below code:
AlertDialog.Builder adb = new AlertDialog.Builder(getParent());
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.width = WindowManager.LayoutParams.FILL_PARENT;
lp.height = WindowManager.LayoutParams.FILL_PARENT;
adb.setTitle("Alert");
adb.setCancelable(true);
adb.setNeutralButton(android.R.string.ok,
new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int whichButton){
}
});
adb.setMessage(ConfigClass.MSG_USER_INFO_EMPOWEREDON);
Dialog d = adb.setView(new View(this)).create();
lp.copyFrom(d.getWindow().getAttributes());
d.getWindow().setAttributes(lp);
d.show();
Please let me know what I am missing.