开发者

How to create many lists on Android?

开发者 https://www.devze.com 2022-12-15 19:07 出处:网络
I a开发者_高级运维m trying to create a to-do list application on Android.I am stuck because at the moment I don\'t know the way to create many to-do lists.

I a开发者_高级运维m trying to create a to-do list application on Android. I am stuck because at the moment I don't know the way to create many to-do lists.

I have created the GUI for one list, using ListView. Entries of the list are added by the user when running the application.

In particular, I don't know how to pass a list object if i create new one.


Probably the simplest way would be set new data set adapter with setAdapter() method, but depending on Your app requirements changing updating dataset could be better option ( http://developer.android.com/reference/android/widget/ListAdapter.html).

If You need have all list and only change them diuring runtime it could be good idea to have multiple listview and change only their visibility (I suggest using tabs http://developer.android.com/resources/tutorials/views/hello-tabwidget.html)

0

精彩评论

暂无评论...
验证码 换一张
取 消