关于listview的问题? [英] Question about listview?

查看:84
本文介绍了关于listview的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在学习Android应用程序开发,我想创建一个小应用程序,它将从2个文本字段(文本字段是项目和数量)中获取数据并将其插入列表。



所以这个列表应该有两列。



用户可以输入他想要的任意数量的项目,因此列表应该是动态的。他/她也应该能够在输入数据的同时编辑列表。



后来(因为我一直在学习),我想把每个项目都带进去列表,并将其输入数据库。



所以我的问题是,ListView是我应该使用的最好的小部件还是有更好/更容易的??br />


希望我的问题很明确。提前致谢



我尝试了什么:



尝试使用ListView但不完全确定它是否是将物品带入数据库时​​的最佳选择。

尝试使用GridView但无法使其动态

I am learning android app development and I want to make a small app which will take data from 2 text fields (text fields are item and amount) and insert it into a list.

So this list should have two columns.

The user can enter any amount of items he wants so the list should be dynamic. He/she should also be able to edit the list while entering data into it.

Later on (as I keep learning), I want to take each item in this list, and enter it into a Database.

So my question is, is ListView the best widget which I should use or is there a better/easier one?

Hope my question is clear. Thanks in advance

What I have tried:

Tried using ListView but not entirely sure if its the best option when taking items into database.
Tried using GridView but wasnt able to make it dynamic

推荐答案

要对问题给出明确的答案并不容易。最适合您的方法是阅读 http://www.codeproject上的一些文章。 com / KB / android / #Android +教程+竞赛 [ ^ ](特别是Peter Leow的任何内容),并为自己尝试一些不同的选项。这样你就可以更好地看到哪个视图控件提供了你想要的外观和感觉。还有很多数据库样本可以帮助您。
It is not easy to give a definitive answer to your question. The best option for you is to go and read some of the articles at http://www.codeproject.com/KB/android/#Android+Tutorial+Contest[^] (especially anything by Peter Leow), and try a few different options for yourself. That way you can see better which view control gives the look and feel that you want. There are also plenty of database samples to help you.


这篇关于关于listview的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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