I have a number of dialogs in a application where a custom view is used. Prior to Android 4 the height and width of these dialogs are adapting as I would expect according to the content. In an Andorid 4 emulator this behavior has changed. It looks like the width will stretch to accomodate content but it has a minimum size below which it will not go. I can make a dialog wider but for narrow content the dialog box will not reduce as I would expect. My content is therefore showing in the left side of an overwide dialog box. All works perfectly on 3.0. I have tried:
dialog.setContentView(R.layout.help_dialog);
dialog.getWindow().setLayout(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
这没有任何效果。 标题的内容也不迫使方言延伸。 任何想法都受到高度赞赏。