从的EditText android系统将数据添加到列表视图 [英] add data from edittext to listview in android
本文介绍了从的EditText android系统将数据添加到列表视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个添加按钮,文本框叫的EditText和一个ListView。当我点击添加按钮当前数据的EditText应该移动到列表视图。我怎样才能做到这一点?
I have an add button, a textbox called edittext, and a listview. When I click the add button data currently in edittext should move to list view. How can I make this happen?
推荐答案
- 设置的 ArrayAdapter<串GT; 您
的ListView - 使用插入的方法
ArrayAdapter从移动字符串
要的EditText的ListView - http://developer.android.com/reference/android/widget/ ArrayAdapter.html
- set ArrayAdapter<String> for your ListView
- use insert method of ArrayAdapter for move string from EditText to ListView
- http://developer.android.com/reference/android/widget/ArrayAdapter.html
这篇关于从的EditText android系统将数据添加到列表视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文