0
내 AlertDialog에 테마를 추가 한 후 매우 작아졌습니다. 대화 상자의 크기를 기본값으로 변경하는 방법은 무엇입니까?Android AlertDialog 크기 테마
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.AppCompatAlertDialogStyle);
내 AlertDialog에 테마를 추가 한 후 매우 작아졌습니다. 대화 상자의 크기를 기본값으로 변경하는 방법은 무엇입니까?Android AlertDialog 크기 테마
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.AppCompatAlertDialogStyle);
원하는 것은 대화 상자를 다시 설정하는 것입니다.
AlertDialog.Builder
에 build()
메소드를 호출 한 후에 호출 할 수있다 : 600, 400 폭과 높이이다
alertDialog.getWindow().setLayout(600, 400);
.
아니면 화면으로 설정하고 싶은 경우,이 코드는 다음과 같습니다이
WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
lp.copyFrom(d.getWindow().getAttributes());
lp.width = WindowManager.LayoutParams.MATCH_PARENT;
lp.height = WindowManager.LayoutParams.MATCH_PARENT;
alertDialogd.show();
alertDialog.getWindow().setAttributes(lp);
작동하지 않습니다! – XxGoliathusxX