android:自定义dialog高度问题

自定义dialog高度无法通过xml重设
解决办法:
dialog.show();

    WindowManager m1 = this.getWindowManager();
    ll_dialog.measure(0,0);
    int height = ll_dialog.getMeasuredHeight();
    WindowManager.LayoutParams params =      
    dialog.getWindow().getAttributes();   
    params.height = height;
    dialog.getWindow().setAttributes(params);

你可能感兴趣的:(android:自定义dialog高度问题)