안드로이드 AlertDialog 위치, 크기 조정 꾸미기 관련
=================================
=================================
=================================
//xml 에서 레이아웃을 읽어 들여온다.
View popupView = View.inflate(act, R.layout.cchatpopup, null);
AlertDialog _ab = new AlertDialog.Builder(act)
.setTitle("대화지원") //타이틀 제목
.setView(popupView) //읽여들여온 레이아웃 부찻
.setPositiveButton("확인", new DialogInterface.OnClickListener() //확인버튼추가
{
public void onClick(DialogInterface dialog, int which)
{
// TODO Auto-generated method stub
//onMsgBox("qwe", 1);
dialog.dismiss();
}
})
.show();
// AlertDialog 에서 위치 크기 수정
LayoutParams params = _ab.getWindow().getAttributes();
params.x = 300;
params.y = 50;
params.width = 300;
_ab.getWindow().setAttributes(params);
=================================
=================================
=================================