如何使用android studio在edittext和spinner中显示值 [英] How to display value from edittext to spinner using android studio

查看:304
本文介绍了如何使用android studio在edittext和spinner中显示值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试使用Android Studio将值从EditText显示到Spinner。我已经做了好几次但是无法将值从EditTextView传递给Spinner。



我尝试了什么:



.......................................

I have been trying to display values from EditText to Spinner using Android Studio. I have done several times but unable to pass values from EditTextView to to Spinner.

What I have tried:

.......................................

推荐答案

您需要创建一个 ArrayAdapter(T),然后从编辑文本中将其打包。然后将其传递给微调器。请参阅 https://www.codeproject.com/KB/android/ [ ^ ]例如。
You need to create a ArrayAdapter(T), and poulate it from the edit text. You then pass that to the spinner. See https://www.codeproject.com/KB/android/[^] for examples.


这篇关于如何使用android studio在edittext和spinner中显示值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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