-6

我正在使用 android 中的圣经项目并在 web 上有更多 30000 文本行。我想使用 dom 解析来解析该数据并插入到数据库中。这里的问题是它需要超过 15 分钟才能得到响应,然后解析然后填入数据库。填入数据库后。我使用查询方法显示数据。所以用户被阻塞了 15 分钟,这是非常糟糕的印象。如何减少解析和插入数据库的时间。

4

1 回答 1

0

If you really want to parse and store into the database so better way is to load in some range like 0-50-100-150 or 0-100-200.

So You can achieve this by using ListView with load Button. You can make it like it will load automatically while scrolling to position say 50 or 100 what ever its up to you.

Or else you while scrolling the a footer will be added to the ListView at the end i.e say 50 0r 100.

For reference go through the following link.

https://github.com/shontauro/android-pulltorefresh-and-loadmore

http://www.androidhive.info/2012/03/android-listview-with-load-more-button/

Hope this will help you to achieve your requirement.

Many Thanks.

于 2013-03-05T07:23:03.670 回答