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 DictionaryDatabase.java, 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
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/com.example.android.searchabledict/databases/dictionary
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
Just for clarification is this http://developer.android.com/resources/samples/SearchableDictionary/src/com/example/android/searchabledict/DictionaryDatabase.html 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