[android-developers] Re: over my head with data please help
Or, you could first categorize the items and present them hierarchically with a ListView like this http://i28.tinypic.com/vhb15h.jpg so that users can expand and collapse the hierarchy to select entries intuitively. Good lucks! Kyara On Mar 31, 9:45 am, dr123 [EMAIL PROTECTED] wrote: thank you anthony, that's what i did there was no other way... i have the user type in some letters and then try a LIKE %string% search... I hope this also help others cause the country/city thing is something common. On 31 Μαρ, 18:22, acopernicus [EMAIL PROTECTED] wrote: Here's an excellent ListView example with code for paging through large #'s of items. It's very similar to the music list in iTunes on the iPhone. http://devtcg.blogspot.com/2008/03/custom-android-list-view-widget-to... Given that you have 18,000 entries though, I recommend a search field with auto-population of options based on queries back to the server. I.e. have user type a letter and then display only cities beginning with that letter. Best of luck, Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: over my head with data please help
thank you anthony, that's what i did there was no other way... i have the user type in some letters and then try a LIKE %string% search... I hope this also help others cause the country/city thing is something common. On 31 Μαρ, 18:22, acopernicus [EMAIL PROTECTED] wrote: Here's an excellent ListView example with code for paging through large #'s of items. It's very similar to the music list in iTunes on the iPhone. http://devtcg.blogspot.com/2008/03/custom-android-list-view-widget-to... Given that you have 18,000 entries though, I recommend a search field with auto-population of options based on queries back to the server. I.e. have user type a letter and then display only cities beginning with that letter. Best of luck, Anthony --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: over my head with data please help
and second and most important: i can't find a way to press the r key for example and the box transfers me to the first city which starts with r This particular issue of not being able to select a list item with a shortcut key, r in your case, is being worked on. It will be fixed in a future release of the SDK. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: over my head with data please help
i did it with digit's suggestion xmlrpc and a few characters to narrow the search. thanks for the support ps this spinner fix is very important...you hear me google guys?:) On 29 Μαρ, 07:51, Megha Joshi [EMAIL PROTECTED] wrote: and second and most important: i can't find a way to press the r key for example and the box transfers me to the first city which starts with r This particular issue of not being able to select a list item with a shortcut key, r in your case, is being worked on. It will be fixed in a future release of the SDK. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: over my head with data please help
The database has around 2 million records. as a text file it's more than half the disk space of the android. On 29 Μαρ, 01:12, Diego Pino [EMAIL PROTECTED] wrote: I think you should rather store your data on a local sqlite database, and access to it via a ContentProvider. You can use the method onKeyDown(int keyCode, KeyEvent event) to catch a key press event. You could then, query your data to retrieve a brief set of cities (set a LIMIT on your query) and populate the Spinner using and ArrayAdapter. Just an idea... On Mar 28, 11:05 pm, dr123 [EMAIL PROTECTED] wrote: Hi, i'm again the guy with the 8mb question. actually it's not 8mb it's a little larger but here is my problem to which i can't get any solution. I need to have the user choose his country and then populate something with all the cities of the country. In order to be exact, i have a database with 18000 cities for greece only for example. Going through that kind of text or html file is not feasible as it would have to take extreme space and memory. I tried two solutions: first one is having the database on my server and collecting the data through xmlrpc. this fails cause the data is bigger than the kxmlrpclitent can hold (or some other limitation but in the debugger it only gets a couple of hundred cities or so). the second one is better (i think): i open up a php page on my server with webkit that has all the cities and i can easily see them with a normal browser. *BUT*: the android browser (at least the one that opens with a new intent and a uri) translates the html combobox into something like a spinner. this is extremely slowly generated (i wait for minutes before it opens up and have to press the button 2-3 times) and second and most important: i can't find a way to press the r key for example and the box transfers me to the first city which starts with r. Noone can scroll down a list with 18000 cities. I know i should get something with less cities but first of all that's the only database that has all the cities (i wouldn't want only the 10 bigger cities cause in the united states for example that would also be some thousands). My app which is going for the challenge (i'm in a hurr) is a social app *depends* on good geographical selection (not gps , i know). any help *very* appreciated --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: over my head with data please help
keep in mind that a desktop browser has a *lot* more memory and a lot more CPU than the one running on a cellphone 2008/3/28 dr123 [EMAIL PROTECTED]: trie seems nice but the challenge is in two weeks :) i don't try to populate the spinner with 18000 entries, i have them on my web page...but i find it strange that the browser from android has such a hard time reading the select box which a normal browser can read. xmmm On 29 Μαρ, 01:59, Digit [EMAIL PROTECTED] wrote: You should use XMLrpc to only retrieve a small number of cities, based on the characters that the user has already typed, like what Google suggests implements. trying to read 18000 entries from the server is not going to work or even be fast. trying to populate a spinner with 18000 entries is insane, not only is it bad UI but a waste of resources. if you absolutely want to store the data on the device, you should consider a packed binary format that's amenable to lookups and serial access. I guess that a trie would be very appropriate here (seehttp:// en.wikipedia.org/wiki/Trie) 2008/3/28 dr123 [EMAIL PROTECTED]: The database has around 2 million records. as a text file it's more than half the disk space of the android. On 29 Μαρ, 01:12, Diego Pino [EMAIL PROTECTED] wrote: I think you should rather store your data on a local sqlite database, and access to it via a ContentProvider. You can use the method onKeyDown(int keyCode, KeyEvent event) to catch a key press event. You could then, query your data to retrieve a brief set of cities (set a LIMIT on your query) and populate the Spinner using and ArrayAdapter. Just an idea... On Mar 28, 11:05 pm, dr123 [EMAIL PROTECTED] wrote: Hi, i'm again the guy with the 8mb question. actually it's not 8mb it's a little larger but here is my problem to which i can't get any solution. I need to have the user choose his country and then populate something with all the cities of the country. In order to be exact, i have a database with 18000 cities for greece only for example. Going through that kind of text or html file is not feasible as it would have to take extreme space and memory. I tried two solutions: first one is having the database on my server and collecting the data through xmlrpc. this fails cause the data is bigger than the kxmlrpclitent can hold (or some other limitation but in the debugger it only gets a couple of hundred cities or so). the second one is better (i think): i open up a php page on my server with webkit that has all the cities and i can easily see them with a normal browser. *BUT*: the android browser (at least the one that opens with a new intent and a uri) translates the html combobox into something like a spinner. this is extremely slowly generated (i wait for minutes before it opens up and have to press the button 2-3 times) and second and most important: i can't find a way to press the r key for example and the box transfers me to the first city which starts with r. Noone can scroll down a list with 18000 cities. I know i should get something with less cities but first of all that's the only database that has all the cities (i wouldn't want only the 10 bigger cities cause in the united states for example that would also be some thousands). My app which is going for the challenge (i'm in a hurr) is a social app *depends* on good geographical selection (not gps , i know). any help *very* appreciated --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---