Umm, have you tried adding elements to the top/bottom of the list when the user starts scrolling up or down? That should work. And initially, query and fetch, say, 10 results from your DB based on the "search string". And keep adding elements to the top or bottom of the list accordingly.
On Sun, Nov 7, 2010 at 5:06 AM, Rutton <[email protected]> wrote: > Sure, I can do this. I am working on implementing a dictionary. The > dictionary-database is a file that has an index, where each entry > points to a concrete database record. What I do now is to search the > index for a word, then get the result that points a database record > with the dictionary-data. Well, this record information can simply be > displayed. But I want something different (and therefore I ask here). > I would like to display the Index (with the words from a to z) in a > scrollable fashion starting with the before found index. > > Consider: Search for "Monkey". > Result -> indexPosition = 12345 > Move forwards to indexPosition 12344 > or > Move backwards to indexPosition 12346. > > This "moving forwards/backwards" from an initial position works in a > unit test. There, I start with the last index-entry and move backwards > to the beginning. Why it not works with a ListView/ListAdapter is, > that this "moving forwards/backwards" is implemented recursively. > So, what not works is the default ListView behaviour: > > Consider: Search for "Monkey". > Result -> indexPosition = 12345 > Start accessing the dataset at index position 0 > That results in a StackOverflow, because of the recursive > implementation. > > I ask myself, what to do now. I can do a simple solution and just > displaying what is in the found record and display that. Or to ask, > for a working solution that can be scrolled on display through the > index. > > Cheers, > Rutton. > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

