如何创建自定义字幕和一些按钮对话框自定义、对话框、字幕、按钮

2023-09-06 22:32:08 作者:哆啦只是个梦

看看这个图片

如何创建这样一个对话框?有2行字幕和三个不同的按钮。

How do I create such a dialog? Having 2 line subtitle and three distinctive buttons.

推荐答案

我觉得这幅画是用其定义在一个XML文件,然后添加到对话框通过调用setContenView一个对话框()创建的。

I think this picture was created with a dialog which was defined in a XML file and then added to the dialog by calling setContenView().

的方法的描述如下: http://developer.android.com/guide/topics/ui/dialogs html的#CustomDialog

The method is described here: http://developer.android.com/guide/topics/ui/dialogs.html#CustomDialog

这不就是为你工作?如果不是我想你将不得不延长对话框类,并实现自己的。

isn't this working for you? If not I think you would have to extend the Dialog class and implement your own.