java - Where is the proper place to put code that saves objects to sharedpreference file -


i guess generic object oriented question, coming conclusion don't think enough in terms of objects.

i have 2 classes, person class , people class. reading , writing these (from , sharedperferencesfile) several activities. right have persistdata class handles reading , writing. when want read or write these guys instance of persistdata class , call methods like, persistdata.write(person); or persistdata.write(people); way this, or should move read , write code person , people class?

i use class call settingsprovider, calling new settingsprovider(this).getperson(); , new settingsprovider(this).setperson(person); yes, how it.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -