如何自定义在Android AlertDialog列表项 [英] How to customize the list items in an Android AlertDialog

查看:131
本文介绍了如何自定义在Android AlertDialog列表项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要显示多行不同的文本样式使用AlertDialog列表中的每个项目,但不能罚款任何例子。

I want to show multiple lines with different text styles for each item in a list using AlertDialog, but can't fine any example.

有谁知道如何自定义AlertDialog的项目?或者,我真的要与这一个ListView创建活动?

Does anyone know how to customize the items of an AlertDialog? Or do I really have to create an Activity with a ListView for this?

推荐答案

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

Use setAdapter() on AlertDialog.Builder to supply your own custom ListAdapter for your list.

这篇关于如何自定义在Android AlertDialog列表项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆