Pregunta de carga de palabras del Diccionario de búsqueda de Android

I'm stepping through the android Searchable Dictionary example, and I can't find the place where it actually loads the words into the sqlite db. I would think it happens in the onCreate method of, but this never seems to be called. And yet the app works!

Also, I couldn't get it to work at all until I commented out lines 41-42 of strings.xml, which was giving me this error:

Description Resource Path Location Type error: Found tag where is expected strings.xml /SearchableDictionary/res/values line 41 Android AAPT Problem

TIA, Joel

Ha! So it looks like onCreate is only called when the db is first created, as it was the first time I ran the app. I deleted the db manually and it was recreated next time I ran the app:

from within adb shell: rm /data/data/

I still don't know why the strings.xml file causes an error, but I'm moving on :)

preguntado el 08 de enero de 11 a las 19:01

1 Respuestas

Just for clarification is this the same source, you're talking about? If yes, then indeed it does load in onCreate() method, which is for their initial setup, though I can't help you with the xml. Good luck

Respondido el 08 de enero de 11 a las 23:01

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.