【发布时间】:2013-10-24 12:02:08
【问题描述】:
突然间,我的应用程序中的所有警报对话框和列表视图都变为内联显示文本。 此问题出现在 Android 2.x 上。 在 android 4.x 上一切都很好。 我使用actionbarsherlock。 我不对对话框使用自定义布局。 不知道哪里有问题:-(
AlertDialog 错误:http://imgur.com/E2yuEIF ListView 错误:http://imgur.com/zYzOry5
创建一个对话框:
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setMessage(R.string.is_check)
.setCancelable(false).setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
go2check();
}})
.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
});
AlertDialog alert = builder.create();
alert.show();
这个问题与 android 2.x 上的 alertdialogs、listviews、progressbars、buttons 等有关......
【问题讨论】:
-
请添加一些你的代码的sn-p
-
我添加了一个代码。但是我对所有的 aletdialogs、progressbars 和 listviews 都有这个问题。
-
all alertdialogs and listviews in my app became to show text inline是什么意思?看不出图片有什么问题... -
任何组件(线性布局、按钮、对话框等)中的文本都不会在新行传输。它显示了如何一行。未放置在该行中的文本隐藏在右边缘。
-
我进入了 AndroidManifest 行:android:theme="@style/android:Theme.Holo" 一切都很好。谢谢大家。
标签: android android-listview android-dialog