android - Seeking guidance: data storage decision -


i apologize in advance if question broad or "it-depends."

basically, need make decision how store , access data in app. app works flashcards; "front" of card presents topic , "back" presents details/explanation. @ first seemed sqlite database work best type of structure (and maybe is, don't know) because data static , model works rows , columns structure of db. (btw, of now, i'm using opencsv parse csv files containing cards. thought easier sqlite...)

my issue (finally) want able display images of data items. cards, example, should display corresponding image. can sqlite db? like, have 1 column store path image....? maybe i'm asking basic, haven't seen many examples have sense of design options out there.

i might confused how dynamically change views based on whether there image available. maybe that's issue of dynamically creating imageview source file db points to...

in summary, i'd appreciate guidance on how can fetch , display text data along images when they're available, whether in sqlite or other way.

thanks!

if data being shipped app, i'd suggest keeping stored resources. can have string arrays topics , details, , can store images either drawable resources or assets. in latter case, store asset names string array resource. (in former case, you'd have build map each card resource identifier. is, unfortunately, 1 area in android resources architecture doesn't shine.)

if want use sqlite, has blob fields in store images themselves, or int fields in store image resource identifiers. take @ searchable dictionary sample project how build sqlite data base resource data.


Comments