用的EditText和微调对话框对话框、EditText

2023-09-06 03:37:54 作者:种一只萝莉

我有一个按钮,会弹出上点击一个对话框。

I have a button that pops up with a dialog box on click.

我想要的对话框有一个的EditText 微调对话框内。

I want the dialog box to have an EditText and a Spinner inside the dialog box.

我不知道我怎么会设置查看吧,我有$ C $下的 AlertDialog 和它的作品,它只是的EditText 微调,我需要把里面的话,我可以得到与应用程序的code中的其余部分。

I don't know how I'd set the view for it, I have the code for an AlertDialog and it works, it's just the EditText and Spinner that I need to place inside it then I can get on with the rest of the app's code.

请能有人告诉我,我怎么会添加的EditText 微调吗?

Please can someone show me how I'd add an EditText and Spinner please?

推荐答案

两个选择,我能想到的:

Two options I can think of:

1)使用 AlertDialog 的setView方法。

2)创建一个活动

android:theme="@android:style/Theme.Dialog"

AndroidManifest

一把手应该更容易做,而排名第二的会给你更多的灵活性。

Number one should be easier to do while number two will give you more flexibility.