用的EditText和微调对话框 [英] Dialog box with EditText and Spinner

查看:110
本文介绍了用的EditText和微调对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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 的<一个href="http://developer.android.com/reference/android/app/AlertDialog.html#setView%28android.view.View%29">setView方法。

2)创建一个活动

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

AndroidManifest

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

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

这篇关于用的EditText和微调对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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