gpt4 book ai didi

android - 如何自定义 Android AlertDialog 中的列表项

转载 作者:塔克拉玛干 更新时间:2023-11-02 20:24:43 29 4
gpt4 key购买 nike

我想使用 AlertDialog 为列表中的每个项目显示具有不同文本样式的多行,但无法找到任何示例。

有谁知道如何自定义 AlertDialog 的项目?或者我真的必须为此创建一个带有 ListView 的 Activity 吗?

最佳答案

AlertDialog.Builder 上使用 setAdapter() 为您的列表提供您自己的自定义 ListAdapter

关于android - 如何自定义 Android AlertDialog 中的列表项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3594331/

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