Question on loading search dictionary on Android

I go for example in the search dictionary for Android, and I can not find the place where it really loads the words in sqlite db. I would think that this happens in the onCreate DictionaryDatabase.java method, but this does not seem to be called. And still the application works!

Also, I couldn't get it to work at all until I commented out lines 41-42 of the strings.xml file that gave me this error:

Description Resource path location type error: tag found, where the string strings.xml / SearchableDictionary / res / values ​​is expected 41 AAPT problem for Android

TIA, Joel

Ha! This way, it seems that onCreate is only called when db is created, since this was the first time I ran the application. I uninstalled db manually and it was restored the next time I started the application:

from adb shell: rm / data / data / com.example.android.searchabledict / databases / dictionary

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

+3
source share
1 answer

For clarification only, is this http://developer.android.com/resources/samples/SearchableDictionary/src/com/example/android/searchabledict/DictionaryDatabase.html the same source you are talking about? If yes, then it is really loaded in the onCreate () method, which is for their initial configuration, although I can not help you with xml. Good luck.

0

Source: https://habr.com/ru/post/1784295/


All Articles