gpt4 book ai didi

Android AlertDialog 在某些设备上不显示整个 setMessage

转载 作者:行者123 更新时间:2023-11-29 16:16:00 28 4
gpt4 key购买 nike

这是一个奇怪的案例,最近才引起我的注意。我有一个 Activity 在创建时显示 AlertDialog 以警告用户要完成他们需要重新启动的过程。在我的设备 (Galaxy Nexus) 上,它显示得很好。最近才引起我的注意,在许多其他设备上它只显示几个字就被切断了。

        AlertDialog.Builder builder = new AlertDialog.Builder(ReportActivity.this);
builder.setTitle("Finished!");
builder.setMessage("Due to the different storage mediums across the various Android devices this app may eb used for, "
+"I've decided not to force a media rescan because depending on your device, "
+"it may or may not even be possible. "
+"This means that you will need to reboot your device or unmount/mount your sdcard in the Settings app before most players will pull in all the information for the songs."
+"\n Please reboot or rescan before claiming that the app did not work.")
.setCancelable(false)
.setPositiveButton("Dismiss", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
dialog.dismiss();
lv1.setAdapter(new ResultsAdapter(ReportActivity.this, results));
}
});

AlertDialog alert = builder.create();
alert.show();

Galaxy Nexus

Motorola Photon

最佳答案

与其使用 setMessage(),不如尝试 setView(),提供您自己的 TextView,您可以在其中控制显示的行数显示。

关于Android AlertDialog 在某些设备上不显示整个 setMessage,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9542284/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com