Reputation: 33
Am developing A Malayalam-> English dictionary app in android .how can i do this stuff? can anyone please help me.which is the best method to create a dictionary?..all answers are highly appreciative..
Upvotes: 1
Views: 4594
Reputation: 10073
Will your database fit in the limited memory of the device? If so, then go with some sort of Map as suggested above.
Otherwise, it gets complicated. I would put your dictionary into an sqlite3 database and access the database from your app. For performance improvement, I would cache each word locally in a HashMap once it's been looked up. You can get clever and use WeakHashMap instead, which will purge entries from the cache as memory gets tight. (Caveat: does Android implement WeakHashMap?)
Finally, consider implementing a content provider backed up by the above-mentioned sqlite3 database. Then your dictionary is easily accessible by multiple clients and the database only needs to be opened once, by the content provider.
Upvotes: 0
Reputation: 885
you can either use hashmap or dictionary class. which use key/value pair concept. to read more about that click the link below-
Upvotes: 1
Reputation: 121971
A Map
implementation seems the obvious choice for a dictionary, where the key is the Malayalm word and the value is the English word.
Upvotes: 4